Skip to content

Commit

Permalink
Let ctrl-o,space and then "make" exec make
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Nov 4, 2024
1 parent 3e0ea87 commit ae01627
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions v2/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ func (e *Editor) CommandToFunction(c *vt100.Canvas, tty *vt100.TTY, status *Stat
inserttime
insertdateandtime
quit
runmake
save
savequit
savequitclear
Expand Down Expand Up @@ -293,6 +294,10 @@ func (e *Editor) CommandToFunction(c *vt100.Canvas, tty *vt100.TTY, status *Stat
e.InsertString(c, dateString+" "+timeString)
e.addSpace = true
},
runmake: func() {
workDir := filepath.Dir(e.filename)
quitExecShellCommand(tty, workDir, "make")
},
save: func() { // save the current file
e.UserSave(c, tty, status)
},
Expand Down Expand Up @@ -368,6 +373,8 @@ func (e *Editor) CommandToFunction(c *vt100.Canvas, tty *vt100.TTY, status *Stat
functionID = inserttime
case "insertdateandtime", "dateandtime", "dt", "dati", "datim":
functionID = insertdateandtime
case "make":
functionID = runmake
case "qs", "byes", "cus", "exitsave", "quitandsave", "quitsave", "qw", "saq", "saveandquit", "saveexit", "saveq", "savequit", "savq", "sq", "wq", "↑", "c:23": // ctrl-w, if the user keeps holding down ctrl
functionID = savequit
case "s", "sa", "sav", "save", "w", "ww", "↓", "c:19": // ctrl-s, if the user keeps holding down ctrl
Expand Down

0 comments on commit ae01627

Please sign in to comment.