The following vi keys are supported for navigating and editing, after setting
vi Mode in the options.
| a | insert after cursor |
| b | move left one word |
| e | move word right end |
| g | start of document |
| h | move left |
| i | insert before cursor |
| j | move down |
| k | move up |
| l | move right |
| n | repeat the most recent search, in the same direction |
| o | insert after line |
| p | put after cursor |
| q | stop macro recording |
| u | undo |
| v | enter visual mode |
| w | move right one word |
| x | delete |
| space | right one character |
| A | insert after end of line |
| B | left one word (same as b) |
| C | change to end of line |
| D | delete line right |
| E | word right end (same as e) |
| G | goto end or line number if prefixed |
| H | goto first line of the screen |
| I | insert at begin |
| J | join lines |
| L | goto last line of the screen |
| M | goto middle line of the screen |
| N | repeat the most recent search, in the opposite direction from original search |
| O | insert before line |
| P | put before cursor |
| R | replace many chars, enters overtype mode |
| V | enter visual line mode |
| W | right one word (same as w) |
| X | delete backwards |
| / | next occurrence |
| ? | previous occurrence |
| . | repeat last action |
| ; | repeat last find char |
| ~ | toggle case |
| $ | end of line |
| 0,^ | begin of line |
| { | paragraph up, in visual mode adds to selection |
| } | paragraph down, in visual mode adds to selection |
| ( | paragraph up, in visual mode adds to selection (same as {) |
| ) | paragraph down, in visual mode adds to selection (same as }) |
| [ | move to previous "{...}" section |
| ] | move to next "{...}" section |
| % | matching brace, in visual mode selects with matching brace |
| # | previous occurrence of word under cursor |
| * | next occurrence of word under cursor |
| + | move to first character on the next line |
| - | move to first character on the previous line |
| | | goto column number specified by prefix |
| tab | indents selection |
| TAB | dedents selection |
| ESC | escape deselects, goes back to normal mode |
|
| ctrl b | page up |
| ctrl e | increment word under cursor |
| ctrl f | page down |
| ctrl g | shows filename and state |
| ctrl j | decrement word under cursor |
| ctrl p | scroll up |
| ctrl q | scroll down |
| ctrl r? | inserts contents of register ? |
| ctrl r% | inserts contents of % register, or copies contents to
clipboard if not in insert mode |
| ctrl r= | enters register calculation mode |
| cc | change line |
| cw | change word |
| dd | delete line or selection |
| de | delete word (to end of word) |
| d0 | delete line left |
| d$ | delete line right |
| dgg | delete from start of the file until current line |
| dG | delete from current line until end of the file |
| dw | delete word |
| f? | find next character |
| F? | find previous character |
| gg | goto begin |
| m? | mark current line (one letter marker) |
| qx | record macro x |
| qX | record macro x (appends to x) |
| @x | plays back macro x (register) |
| @Xx@ | plays back macro Xx (several characters) |
| @@ | plays back last macro |
| r? | replace current character only |
| t? | find next character, caret before pos |
| T? | find previous character, caret before pos |
| yw | yank word |
| yy | yank line or selection |
| ZZ | save and quit |
| zc | fold close |
| zo | fold open |
| zE | fold disable |
| zf | fold enable |
| '? | goto marker ? |
| "x | prepares register x for p, yy, yw, de, dd, dw, d0, d$ |
| "X | appends contents of yy, yw, de, dd, dw, d0, d$ to register x |
| >> | increase indent for current line, selection or visual area |
| << | decrease indent for current line, selection or visual area |
|
| :.= | current line |
| :$ | goto end of document |
| :close | closes current document |
| :d | delete current line |
| :e | edit (show select file dialog) |
| :e * | edit file * (with tab expansion) |
| :n | next |
| :prev | previous |
| :q | quit unless modified |
| :q! | quit forced |
| :r * | insert contents of file * below cursor |
| :r !command | executes command and inserts output below cursor |
| :[range]> | increase indent for range |
| :[range]< | decrease indent for range |
| :[range]d | delete range |
| :[range]mx | move range to destination address x |
| :[range]s/p/r/[flags] | substitutes in range p by r using flags |
| :[range]!command | filters range, range is used as input for command, output replaces range |
| :reg | shows registers |
| :set ic | sets ignore case |
| :set ic! | sets match case |
| :set list | shows whitespace |
| :set list! | hides whitespace |
| :set nu | shows line numbers |
| :set nu! | hides line numbers |
| :set syntax=lexer | sets lexer |
| :set ts=no | sets tabstop at every no |
| :set tabstop=no | sets tabstop at every no |
| :syntax on | use syntax highlighting |
| :syntax off | stops syntax highlighting |
| :w | save |
| :w * | save to file * |
| :x | save and quit |
| :y | yank current line |
| :!command | executes command and shows output |
| :g// | remove all markers |
| :g/pattern/d | delete lines containing pattern |
| :g/pattern/ | mark lines containing pattern |
| :g/pattern/p | print lines containing pattern, the lines are put on
a new tab pane called Print |
| :g/pattern/s/replacement | substitute pattern by replacement |
|
[range]
| % | entire document |
| * | visible area |
| '<,'> | visual (selected) area |
| . | current line only |
| x,y | line x to y
(x,y can be a ., $, marker, or line no) |
[register]
| . | insert register | last inserted text |
| 0 | yank register | 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 |
[flags]
| i | ignore case |
| c | ask for confirmation |
| g | global, otherwise only first match on line |
When substituting you can use & or \0 to represent the target,
and \U to convert to uppercase and \L to convert to lowercase.
You can use a $ to match a line end, e.g. %s/$/EOL appends the string EOL
at the end of each line. Merging is not yet possible using a \n target,
you can create a macro for that.
You can use ~ to match against a previous replacement string.
Most commands can be prefixed with a multidigit number, that takes care of
repeating that command the number specified.
Replace uses regular expressions from scintilla:
| . | 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.