rename 'cmd-delete-word' to 'cmd-delete-unix-word'

This commit is contained in:
Gokcehan 2018-05-14 01:19:26 +03:00
parent 0c672fef6f
commit afefc30a67
4 changed files with 42 additions and 42 deletions

2
doc.go
View File

@ -67,7 +67,7 @@ keybindings:
cmd-end (default '<c-e>' and '<end>')
cmd-delete-beg (default '<c-u>')
cmd-delete-end (default '<c-k>')
cmd-delete-word (default '<c-w>')
cmd-delete-unix-word (default '<c-w>')
cmd-put (default '<c-y>')
cmd-transpose (default '<c-t>')
cmd-interrupt (default '<c-c>')

View File

@ -71,7 +71,7 @@ keybindings:
cmd-end (default '<c-e>' and '<end>')
cmd-delete-beg (default '<c-u>')
cmd-delete-end (default '<c-k>')
cmd-delete-word (default '<c-w>')
cmd-delete-unix-word (default '<c-w>')
cmd-put (default '<c-y>')
cmd-transpose (default '<c-t>')
cmd-interrupt (default '<c-c>')

View File

@ -593,7 +593,7 @@ func (e *callExpr) eval(app *app, args []string) {
app.ui.cmdBuf = app.ui.cmdAccRight
app.ui.cmdAccRight = nil
}
case "cmd-delete-word":
case "cmd-delete-unix-word":
ind := strings.LastIndex(strings.TrimRight(string(app.ui.cmdAccLeft), " "), " ") + 1
app.ui.cmdBuf = app.ui.cmdAccLeft[ind:]
app.ui.cmdAccLeft = app.ui.cmdAccLeft[:ind]

View File

@ -138,7 +138,7 @@ func init() {
gOpts.cmdkeys["<c-e>"] = &callExpr{"cmd-end", nil, 1}
gOpts.cmdkeys["<c-u>"] = &callExpr{"cmd-delete-beg", nil, 1}
gOpts.cmdkeys["<c-k>"] = &callExpr{"cmd-delete-end", nil, 1}
gOpts.cmdkeys["<c-w>"] = &callExpr{"cmd-delete-word", nil, 1}
gOpts.cmdkeys["<c-w>"] = &callExpr{"cmd-delete-unix-word", nil, 1}
gOpts.cmdkeys["<c-y>"] = &callExpr{"cmd-put", nil, 1}
gOpts.cmdkeys["<c-t>"] = &callExpr{"cmd-transpose", nil, 1}
gOpts.cmdkeys["<c-c>"] = &callExpr{"cmd-interrupt", nil, 1}