Capitalize modes in code comments and documentation (#2054)
* Capitalize modes in documentation * Capitalize modes in code comments
This commit is contained in:
1 parent
f27d82b391
commit
c7b59d27ce
5 files changed
+16
-16
No files matched your search
@@ -1301,9 +1301,9 @@ Command `cmap` is used to bind a key on the command line to a command line comma
|
||||
|
||||
You can delete an existing binding by leaving the expression empty:
|
||||
|
||||
map gh # deletes 'gh' mapping in normal and visual mode
|
||||
nmap v # deletes 'v' mapping in normal mode
|
||||
vmap o # deletes 'o' mapping in visual mode
|
||||
map gh # deletes 'gh' mapping in Normal and Visual mode
|
||||
nmap v # deletes 'v' mapping in Normal mode
|
||||
vmap o # deletes 'o' mapping in Visual mode
|
||||
cmap <c-g> # deletes '<c-g>' mapping
|
||||
|
||||
Command `cmd` is used to define a custom command:
|
||||
|
||||
@@ -1435,9 +1435,9 @@ command or any other command:
|
||||
|
||||
You can delete an existing binding by leaving the expression empty:
|
||||
|
||||
map gh # deletes 'gh' mapping in normal and visual mode
|
||||
nmap v # deletes 'v' mapping in normal mode
|
||||
vmap o # deletes 'o' mapping in visual mode
|
||||
map gh # deletes 'gh' mapping in Normal and Visual mode
|
||||
nmap v # deletes 'v' mapping in Normal mode
|
||||
vmap o # deletes 'o' mapping in Visual mode
|
||||
cmap <c-g> # deletes '<c-g>' mapping
|
||||
|
||||
Command cmd is used to define a custom command:
|
||||
|
||||
@@ -2346,8 +2346,8 @@ func (e *callExpr) eval(app *app, args []string) {
|
||||
app.nav.selectionInd++
|
||||
}
|
||||
}
|
||||
// resetting visual mode here instead of inside `normal()`
|
||||
// allows us to use visual mode inside search, find etc.
|
||||
// resetting Visual mode here instead of inside `normal()`
|
||||
// allows us to use Visual mode inside search, find etc.
|
||||
dir.visualAnchor = -1
|
||||
normal(app)
|
||||
case "visual-unselect":
|
||||
|
||||
@@ -1250,9 +1250,9 @@ cmap <a\-i> set incsearch!
|
||||
You can delete an existing binding by leaving the expression empty:
|
||||
.IP
|
||||
.EX
|
||||
map gh # deletes \(aqgh\(aq mapping in normal and visual mode
|
||||
nmap v # deletes \(aqv\(aq mapping in normal mode
|
||||
vmap o # deletes \(aqo\(aq mapping in visual mode
|
||||
map gh # deletes \(aqgh\(aq mapping in Normal and Visual mode
|
||||
nmap v # deletes \(aqv\(aq mapping in Normal mode
|
||||
vmap o # deletes \(aqo\(aq mapping in Visual mode
|
||||
cmap <c\-g> # deletes \(aq<c\-g>\(aq mapping
|
||||
.EE
|
||||
.PP
|
||||
|
||||
@@ -276,7 +276,7 @@ func init() {
|
||||
gOpts.numberfmt = "\033[33m"
|
||||
gOpts.tagfmt = "\033[31m"
|
||||
|
||||
// normal and visual mode
|
||||
// Normal and Visual mode
|
||||
keys := map[string]expr{
|
||||
"k": &callExpr{"up", nil, 1},
|
||||
"<up>": &callExpr{"up", nil, 1},
|
||||
@@ -352,20 +352,20 @@ func init() {
|
||||
"gh": &callExpr{"cd", []string{"~"}, 1},
|
||||
}
|
||||
|
||||
// insert bindings that apply to both normal & visual mode first
|
||||
// insert bindings that apply to both Normal & Visual mode first
|
||||
gOpts.nkeys = maps.Clone(keys)
|
||||
// now add normal mode specific ones
|
||||
// now add Normal mode specific ones
|
||||
gOpts.nkeys["<space>"] = &listExpr{[]expr{&callExpr{"toggle", nil, 1}, &callExpr{"down", nil, 1}}, 1}
|
||||
gOpts.nkeys["V"] = &callExpr{"visual", nil, 1}
|
||||
gOpts.nkeys["v"] = &callExpr{"invert", nil, 1}
|
||||
|
||||
// now do the same for visual mode
|
||||
// now do the same for Visual mode
|
||||
gOpts.vkeys = maps.Clone(keys)
|
||||
gOpts.vkeys["<esc>"] = &callExpr{"visual-discard", nil, 1}
|
||||
gOpts.vkeys["V"] = &callExpr{"visual-accept", nil, 1}
|
||||
gOpts.vkeys["o"] = &callExpr{"visual-change", nil, 1}
|
||||
|
||||
// command line mode bindings can be assigned directly
|
||||
// Command-line mode bindings can be assigned directly
|
||||
gOpts.cmdkeys = map[string]expr{
|
||||
"<space>": &callExpr{"cmd-insert", []string{" "}, 1},
|
||||
"<esc>": &callExpr{"cmd-escape", nil, 1},
|
||||
|
||||
Reference in new issue
Block a user