The following vi keys are supported for navigating and editing, after setting vi Mode in the options. Most keys follow the open group specifations for vi and ex
|
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Each motion command can be prefixed with a multidigit number, that takes care of repeating that command the number specified, and by a c, d, y character that changes, deletes or yanks the specified motion.
Where:
[1addr]
A single line address
| chars | range |
|---|---|
| . | current line |
| $ | last line |
| 'character | line that contains mark character |
| line no | line number |
[2addr]
Two addresses specifying an inclusive range of lines.
| chars | range |
|---|---|
| % | entire document |
| * | visible area |
| '<,'> | visual (selected) area |
| [1addr],[1addr] | inclusive range of lines |
[buffer]
| name | purpose | explanation |
|---|---|---|
| . | insert register | last inserted text |
| 0 | yank register (or unnamed buffer) | last yank value |
| 1 - 9 | delete registers | queue of 9 last deleted values |
| a - z | standard registers | normal register |
| * | clipboard register | contents of clipboard |
| % | filename register | current filename |
| _ | black hole register | anything written to it is not kept |
[Calculation mode]
| operator | description |
|---|---|
| + | add |
| - | subtract |
| * | multiply |
| / | divide |
| < | shift left |
| > | shift right |
| . | current line |
| $ | line count |
| % | modulo |
| | | bitwise or |
| & | bitwise and |
| ^ | bitwise xor |
[Edit Options]
all set commands can be entered as modeline as well, at begin or end of file
| command | purpose |
|---|---|
| :set ac | toggles auto complete |
| :set ai | toggles auto indentation |
| :set aw | toggles auto write |
| :set eb | toggles error bells |
| :set el | toggles edge line |
| :set ic | toggles ignore case |
| :set mw | toggles match words |
| :set nu | toggles line numbers |
| :set readonly | toggles readonly |
| :set showmode | toggles showing vi mode |
| :set sm | toggles show match |
| :set sws | toggles whitespace |
| :set ut | toggles use tabs |
| :set wm | toggles wrap margin |
| :set ws | toggles wrap scan |
| :set dir=dir | sets dir |
| :set ec=no | sets edge column |
| :set report=no | sets reported lines |
| :set sw=no | sets indentation |
| :set sy=lexer | sets lexer |
| :set ts=no | sets tabstop at every no |
Replace uses regular expressions from std::regex
| char | purpose |
|---|---|
| . | Matches any character |
| \( | This marks the start of a region for tagging a match. |
| \) | This marks the end of a tagged region. |
| \n | Where n is 1 through 9 refers to the first through ninth tagged region when replacing. For example, if the search string was Fred\([1-9]\)XXX and the replace string was Sam\1YYY, when applied to Fred2XXX this would generate Sam2YYY. \0 refers to all of the matching text. |
| \< | This matches the start of a word using Scintilla's definitions of words. |
| \> | This matches the end of a word using Scintilla's definition of words. |
| \x | This allows you to use a character x that would otherwise have a special meaning. For example, \[ would be interpreted as [ and not as the start of a character set. |
| [...] | This indicates a set of characters, for example, [abc] means any of the characters a, b or c. You can also use ranges, for example [a-z] for any lower case character. |
| [^...] | The complement of the characters in the set. For example, [^A-Za-z] means any character except an alphabetic character. |
| ^ | This matches the start of a line (unless used inside a set, see above). |
| $ | This matches the end of a line. |
| * | This matches 0 or more times. For example, Sa*m matches Sm, Sam, Saam, Saaam and so on. |
| + | This matches 1 or more times. For example, Sa+m matches Sam, Saam, Saaam and so on. |
Regular expressions will only match ranges within a single line, never matching over multiple lines.