2016-06-23 11:26:20 +03:00
## Key
:white_check_mark: - command done
2016-09-09 17:59:40 +03:00
:white_check_mark: :star: - command done with VS Code specific customization
:warning: - some variations of the command are not supported
:running: work in progress
2016-06-23 11:26:20 +03:00
2016-06-30 20:15:23 +03:00
:arrow_down: - command is low priority; open an issue (or thumbs up the relevant issue) if you want to see it sooner
2016-06-30 04:01:41 +03:00
2016-06-23 12:51:31 +03:00
:x: - command impossible with current VSCode API
:1234: - command accepts numeric prefix
2016-06-23 21:33:48 +03:00
## Roadmap
2016-07-26 11:26:38 +03:00
These are the big Vim features, put generally in the order in which we plan to implement them.
2016-06-23 21:33:48 +03:00
2016-07-26 11:26:38 +03:00
Status | Command
2016-06-23 21:33:48 +03:00
---|--------
:white_check_mark: | Normal Mode
:white_check_mark: | Insert Mode
:white_check_mark: | Visual Mode
:white_check_mark: | Visual Line Mode
:white_check_mark: | Number Prefixes
:white_check_mark: | . Operator
2016-06-23 21:34:40 +03:00
:warning: | Searching with / and ?
2016-07-26 11:26:38 +03:00
:white_check_mark: | Correct Undo/Redo
2016-07-06 08:04:17 +03:00
:warning: | Command Remapping
:warning: | Marks
2016-08-09 13:17:27 +03:00
:white_check_mark: | Text Objects
:white_check_mark: | Visual Block Mode
2016-08-11 13:42:40 +03:00
:warning: | Replace Mode
2016-08-09 13:17:27 +03:00
| Multiple Select Mode
2016-06-23 21:33:48 +03:00
| Macros
2016-07-26 11:26:38 +03:00
:warning: | Buffer/Window/Tab
2016-06-23 21:33:48 +03:00
2016-07-26 11:26:38 +03:00
Now follows an exhaustive list of every known Vim command that we could find.
2016-06-23 21:33:48 +03:00
2016-06-23 11:13:23 +03:00
## Left-right motions
Status | Command | Description
---|--------|------------
2016-06-23 11:30:57 +03:00
:white_check_mark: |:1234: h | left (also: CTRL-H, BS, or Left key)
:white_check_mark: |:1234: l | right (also: Space or Right key)
:white_check_mark: | 0 | to first character in the line (also: Home key)
2016-06-23 11:25:37 +03:00
:white_check_mark: | ^ | to first non-blank character in the line
2016-06-23 11:30:57 +03:00
:white_check_mark: |:1234: $ | to the last character in the line (N-1 lines lower) (also: End key)
2016-08-02 10:07:36 +03:00
:white_check_mark: | g0 | to first character in screen line (differs from "0" when lines wrap)
:white_check_mark: | g^ | to first non-blank character in screen line (differs from "^" when lines wrap)
:white_check_mark: |:1234: g$ | to last character in screen line (differs from "$" when lines wrap)
:white_check_mark: | gm | to middle of the screen line
2016-06-23 12:48:33 +03:00
:white_check_mark: |:1234: \| | to column N (default: 1)
2016-06-23 11:25:37 +03:00
:white_check_mark: |:1234: f{char} | to the Nth occurrence of {char} to the right
:white_check_mark: |:1234: F{char} | to the Nth occurrence of {char} to the left
:white_check_mark: |:1234: t{char} | till before the Nth occurrence of {char} to the right
:white_check_mark: |:1234: T{char} | till before the Nth occurrence of {char} to the left
2016-09-03 20:38:49 +03:00
:white_check_mark: |:1234: ; | repeat the last "f", "F", "t", or "T" N times
:white_check_mark: |:1234: , | repeat the last "f", "F", "t", or "T" N times in opposite direction
2016-06-23 11:13:23 +03:00
## Up-down motions
Status | Command | Description
---|--------|------------
2016-06-23 11:30:57 +03:00
:white_check_mark: | :1234: k | up N lines (also: CTRL-P and Up)
:white_check_mark: | :1234: j | up N lidown N lines (also: CTRL-J, CTRL-N, NL, and Down)
2016-06-23 13:05:13 +03:00
:white_check_mark: | :1234: - | up N lines, on the first non-blank character
:white_check_mark: | :1234: + | down N lines, on the first non-blank character (also: CTRL-M and CR)
:white_check_mark: | :1234: _ | down N-1 lines, on the first non-blank character
2016-06-23 13:05:45 +03:00
:white_check_mark: | :1234: G | goto line N (default: last line), on the first non-blank character
:white_check_mark: | :1234: gg | goto line N (default: first line), on the first non-blank character
:white_check_mark: | :1234: % | goto line N percentage down in the file; N must be given, otherwise it is the |%| command
2016-08-02 10:07:36 +03:00
:white_check_mark: | :1234: gk | up N screen lines (differs from "k" when line wraps)
:white_check_mark: | :1234: gj | own N screen lines (differs from "j" when line wraps)
2016-06-23 11:13:23 +03:00
## Text object motions
Status | Command | Description
---|--------|------------
2016-06-23 11:25:37 +03:00
:white_check_mark: | :1234: w | N words forward
:white_check_mark: | :1234: W | N blank-separated |WORD|s forward
:white_check_mark: | :1234: e | N words forward to the end of the Nth word
:white_check_mark: | :1234: E | N words forward to the end of the Nth blank-separated |WORD|
:white_check_mark: | :1234: b | N words backward
:white_check_mark: | :1234: B | N blank-separated |WORD|s backward
:white_check_mark: | :1234: ge | N words backward to the end of the Nth word
:white_check_mark: | :1234: gE | N words backward to the end of the Nth blank-separated |WORD|
2016-06-27 10:29:20 +03:00
:white_check_mark: | :1234: ) | N sentences forward
:white_check_mark: | :1234: ( | N sentences backward
2016-06-23 11:25:37 +03:00
:white_check_mark: | :1234: } | N paragraphs forward
:white_check_mark: | :1234: { | N paragraphs backward
2016-08-02 10:11:31 +03:00
:white_check_mark: | :1234: ]] | N sections forward, at start of section
:white_check_mark: | :1234: [[ | N sections backward, at start of section
:white_check_mark: | :1234: ][ | N sections forward, at end of section
:white_check_mark: | :1234: [] | N sections backward, at end of section
2016-06-29 08:41:58 +03:00
:white_check_mark: | :1234: [( | N times back to unclosed '('
:white_check_mark: | :1234: [{ | N times back to unclosed '{'
2016-06-30 20:15:23 +03:00
:arrow_down: | :1234: [m | N times back to start of method (for Java)
:arrow_down: | :1234: [M | N times back to end of method (for Java)
2016-06-29 08:41:58 +03:00
:white_check_mark: | :1234: ]) | N times forward to unclosed ')'
:white_check_mark: | :1234: ]} | N times forward to unclosed '}'
2016-06-30 20:15:23 +03:00
:arrow_down: | :1234: ]m | N times forward to start of method (for Java)
:arrow_down: | :1234: ]M | N times forward to end of method (for Java)
:arrow_down: | :1234: [# | N times back to unclosed "#if" or "#else"
:arrow_down: | :1234: ]# | N times forward to unclosed "#else" or "#endif"
2016-08-02 10:11:31 +03:00
:arrow_down: | :1234: [* | N times back to start of a C comment "/*"
:arrow_down: | :1234: ]* | N times forward to end of a C comment "*/"
2016-06-23 11:13:23 +03:00
2016-08-15 08:16:14 +03:00
## Pattern searches
2016-09-09 17:59:40 +03:00
Status | Command | Description | Note
---|--------|------------|------------------
:white_check_mark: :star: | :1234: `/{pattern}[/[offset]]<CR>` | search forward for the Nth occurrence of {pattern} | Currently we only support JavaScript Regex but not Vim's in-house Regex engine.
:white_check_mark: :star: | :1234: `?{pattern}[?[offset]]<CR>` | search backward for the Nth occurrence of {pattern} | Currently we only support JavaScript Regex but not Vim's in-house Regex engine.
:warning: | :1234: `/<CR>` | repeat last search, in the forward direction | {count} is not supported.
:warning: | :1234: `?<CR>` | repeat last search, in the backward direction | {count} is not supported.
:warning: | :1234: n | repeat last search | {count} is not supported.
:warning: | :1234: N | repeat last search, in opposite direction | {count} is not supported.
2016-08-15 08:16:14 +03:00
:white_check_mark: | :1234: * | search forward for the identifier under the cursor
:white_check_mark: | :1234: # | search backward for the identifier under the cursor
2016-09-09 17:59:40 +03:00
:arrow_down: | :1234: g* | like "*", but also find partial matches
:arrow_down: | :1234: g# | like "#", but also find partial matches
2016-08-15 08:16:14 +03:00
:white_check_mark: | gd | goto local declaration of identifier under the cursor
2016-09-09 17:59:40 +03:00
:arrow_down: | gD | goto global declaration of identifier under the cursor
2016-08-15 08:16:14 +03:00
## Marks and motions
Status | Command | Description
---|--------|------------------------------
:white_check_mark: | m{a-zA-Z} | mark current position with mark {a-zA-Z}
2016-09-09 17:59:40 +03:00
:white_check_mark:| `{a-z} | go to mark {a-z} within current file
:white_check_mark:| `{A-Z} | go to mark {A-Z} in any file
:white_check_mark:| `{0-9} | go to the position where Vim was previously exited
:arrow_down:| `` | go to the position before the last jump
:arrow_down:| `" | go to the position when last editing this file
:arrow_down:| `[ | go to the start of the previously operated or put text
:arrow_down:| `] | go to the end of the previously operated or put text
:arrow_down:| `< | go to the start of the (previous) Visual area
:arrow_down:| `> | go to the end of the (previous) Visual area
:arrow_down:| `. | go to the position of the last change in this file
:arrow_down:| '{a-zA-Z0-9[]'"< >.} | same as `, but on the first non-blank in the line
:arrow_down:| :marks | print the active marks
:arrow_down:| :1234: CTRL-O | go to Nth older position in jump list
:arrow_down:| :1234: CTRL-I | go to Nth newer position in jump list
:arrow_down:| :ju[mps] | print the jump list
2016-08-15 08:16:14 +03:00
2016-06-23 11:13:23 +03:00
## Various motions
Status | Command | Description
---|--------|------------------------------
2016-06-23 11:25:37 +03:00
:white_check_mark: | % | find the next brace, bracket, comment, or "#if"/ "#else"/"#endif" in this line and go to its match
2016-08-02 10:07:36 +03:00
:white_check_mark: |:1234: H | go to the Nth line in the window, on the first non-blank
:white_check_mark: | M | go to the middle line in the window, on the first non-blank
:white_check_mark: |:1234: L | go to the Nth line from the bottom, on the first non-blank
2016-09-09 17:59:40 +03:00
:arrow_down:|:1234: go | go to Nth byte in the buffer
:arrow_down:|:[range]go[to] [off] | go to [off] byte in the buffer
2016-06-23 11:13:23 +03:00
2016-08-15 08:16:14 +03:00
## Using tags
Status | Command | Description
---|--------|------------------------------
2016-09-09 17:59:40 +03:00
:arrow_down:| :ta[g][!] {tag} | jump to tag {tag}
:arrow_down:| :[count]ta[g][!] | jump to [count]'th newer tag in tag list
:arrow_down:| CTRL-] | jump to the tag under cursor, unless changes have been made
:arrow_down:| :ts[elect][!] [tag] | list matching tags and select one to jump to
:arrow_down:| :tj[ump][!] [tag] | jump to tag [tag] or select from list when there are multiple matches
:arrow_down:| :lt[ag][!] [tag] | jump to tag [tag] and add matching tags to the location list
:arrow_down:| :tagsa | print tag list
:arrow_down:| :1234: CTRL-T | jump back from Nth older tag in tag list
:arrow_down:| :[count]po[p][!] | jump back from [count]'th older tag in tag list
:arrow_down:| :[count]tn[ext][!] | jump to [count]'th next matching tag
:arrow_down:| :[count]tp[revious][!] | jump to [count]'th previous matching tag
:arrow_down:| :[count]tr[ewind][!] | jump to [count]'th matching tag
:arrow_down:| :tl[ast][!] | jump to last matching tag
:arrow_down:| :pt[ag] {tag} | open a preview window to show tag {tag}
:arrow_down:| CTRL-W } | like CTRL-] but show tag in preview window
:arrow_down:| :pts[elect] | like ":tselect" but show tag in preview window
:arrow_down:| :ptj[ump] | like ":tjump" but show tag in preview window
:arrow_down:| :pc[lose] | close tag preview window
:arrow_down:| CTRL-W z | close tag preview window`
2016-08-15 08:16:14 +03:00
## Scrolling
Status | Command | Description
---|--------|------------------------------
2016-09-16 00:21:24 +03:00
:white_check_mark: | :1234: CTRL-E | window N lines downwards (default: 1)
:white_check_mark: | :1234: CTRL-D | window N lines Downwards (default: 1/2 window)
:white_check_mark: | :1234: CTRL-F | window N pages Forwards (downwards)
:white_check_mark: | :1234: CTRL-Y | window N lines upwards (default: 1)
:white_check_mark: | :1234: CTRL-U | window N lines Upwards (default: 1/2 window)
:white_check_mark: | :1234: CTRL-B | window N pages Backwards (upwards)
:white_check_mark: | z CR or zt | redraw, current line at top of window
:white_check_mark: | z. or zz | redraw, current line at center of window
:white_check_mark: | z- or zb | redraw, current line at bottom of window
2016-08-15 08:16:14 +03:00
2016-06-23 11:13:23 +03:00
These only work when 'wrap' is off:
2016-09-16 20:02:48 +03:00
Status | Command | Description | Note
---|--------|------------------|------------
:white_check_mark: :star: | :1234: zh | scroll screen N characters to the right | In Code, the cursor wil always move when you run this command, whether the horizontal scrollbar moves or not.
:white_check_mark: :star: | :1234: zl | scroll screen N characters to the left | As above
:white_check_mark: :star: | :1234: zH | scroll screen half a screenwidth to the right | As above
:white_check_mark: :star: | :1234: zL | scroll screen half a screenwidth to the left | As above
2016-06-23 11:13:23 +03:00
## Inserting text
Status | Command | Description
---|--------|------------------------------
2016-06-23 11:25:37 +03:00
:white_check_mark: | :1234: a | append text after the cursor (N times)
:white_check_mark: | :1234: A | append text at the end of the line (N times)
2016-06-23 11:30:57 +03:00
:white_check_mark: | :1234: i | insert text before the cursor (N times) (also: Insert)
2016-06-23 11:25:37 +03:00
:white_check_mark: | :1234: I | insert text before the first non-blank in the line (N times)
2016-06-24 11:52:35 +03:00
:white_check_mark: | :1234: gI | insert text in column 1 (N times)
2016-06-23 11:25:37 +03:00
:white_check_mark: | :1234: o | open a new line below the current line, append text (N times)
:white_check_mark: | :1234: O | open a new line above the current line, append text (N times)
2016-06-23 11:13:23 +03:00
in Visual block mode:
Status | Command | Description
---|--------|------------------------------
2016-09-09 17:59:40 +03:00
:white_check_mark:| I | insert the same text in front of all the selected lines
:white_check_mark:| A | append the same text after all the selected lines
2016-06-23 11:13:23 +03:00
## Insert mode keys
leaving Insert mode:
Status | Command | Description
---|--------|------------------------------
2016-06-23 11:30:57 +03:00
:white_check_mark: | Esc | end Insert mode, back to Normal mode
2016-08-02 10:07:36 +03:00
:white_check_mark: | CTRL-C | like Esc, but do not use an abbreviation
2016-06-30 20:15:23 +03:00
:arrow_down: | CTRL-O {command} | execute {command} and return to Insert mode
2016-06-23 11:13:23 +03:00
moving around:
Status | Command | Description
---|--------|------------------------------
2016-06-23 11:25:37 +03:00
:white_check_mark: | cursor keys | move cursor left/right/up/down
:white_check_mark: | shift-left/right | one word left/right
:white_check_mark: | shift-up/down | one screenful backward/forward
2016-06-23 11:30:57 +03:00
:white_check_mark: | End | cursor after last character in the line
:white_check_mark: | Home | cursor to first character in the line
2016-06-23 11:13:23 +03:00
2016-08-15 08:16:14 +03:00
## Special keys in Insert mode
2016-09-09 17:59:40 +03:00
Status | Command | Description | Note
---|--------|-----------|-------------------
:arrow_down: |CTRL-V {char}.. | insert character literally, or enter decimal byte value
:warning: | NL or CR or CTRL-M or CTRL-J | begin new line | CTRL-M and CTRL-J are not supported yet
2016-08-16 17:55:48 +03:00
:white_check_mark: | CTRL-E | insert the character from below the cursor
:white_check_mark: | CTRL-Y | insert the character from above the cursor
2016-09-16 20:24:00 +03:00
:running: | CTRL-A | insert previously inserted text
:running: | CTRL-@ | insert previously inserted text and stop Insert mode
2016-08-16 17:55:48 +03:00
:white_check_mark: | CTRL-R {0-9a-z%#:.-="} | insert the contents of a register
2016-09-09 17:59:40 +03:00
:arrow_down:| CTRL-N | insert next match of identifier before the cursor
:arrow_down:| CTRL-P | insert previous match of identifier before the cursor
:arrow_down:| CTRL-X ... | complete the word before the cursor in various ways
2016-08-16 17:55:48 +03:00
:white_check_mark: | BS or CTRL-H | delete the character before the cursor
2016-08-17 09:08:50 +03:00
:white_check_mark: | Del | delete the character under the cursor
:white_check_mark: | CTRL-W | delete word before the cursor
:white_check_mark: | CTRL-U | delete all entered characters in the current line
2016-09-07 02:15:21 +03:00
:white_check_mark: | CTRL-T | insert one shiftwidth of indent in front of the current line
:white_check_mark: | CTRL-D | delete one shiftwidth of indent in front of the current line
2016-09-09 17:59:40 +03:00
| 0 CTRL-D | delete all indent in the current line
| ^ CTRL-D | delete all indent in the current line, restore indent in next line
2016-08-15 08:16:14 +03:00
## Digraphs
Status | Command | Description
---|--------|------------------------------
:arrow_down: | :dig[raphs] | show current list of digraphs
:arrow_down: | :dig[raphs] {char1}{char2} {number} ... | add digraph(s) to the list
## Special inserts
Status | Command | Description
---|--------|------------------------------
2016-09-10 01:18:19 +03:00
:warning: | :r [file] | insert the contents of [file] below the cursor
:warning: | :r! {command} | insert the standard output of {command} below the cursor
2016-08-15 08:16:14 +03:00
2016-06-23 11:13:23 +03:00
## Deleting text
Status | Command | Description
---|--------|------------------------------
2016-06-23 11:25:37 +03:00
:white_check_mark: | :1234: x | delete N characters under and after the cursor
2016-08-02 10:07:36 +03:00
:white_check_mark: | :1234: Del | delete N characters under and after the cursor
2016-06-23 11:25:37 +03:00
:white_check_mark: | :1234: X | delete N characters before the cursor
:white_check_mark: | :1234: d{motion} | delete the text that is moved over with {motion}
:white_check_mark: | {visual}d | delete the highlighted text
:white_check_mark: | :1234: dd | delete N lines
:white_check_mark: | :1234: D | delete to the end of the line (and N-1 more lines)
2016-06-24 12:27:32 +03:00
:white_check_mark: | :1234: J | join N-1 lines (delete EOLs)
2016-09-16 20:24:00 +03:00
:white_check_mark: | {visual}J | join the highlighted lines
2016-06-24 12:27:32 +03:00
:white_check_mark: | :1234: gJ | like "J", but without inserting spaces
2016-09-16 20:28:16 +03:00
:white_check_mark:| {visual}gJ | like "{visual}J", but without inserting spaces
2016-09-16 21:54:40 +03:00
:white_check_mark:| :[range]d [x] | delete [range] lines [into register x]
2016-06-23 11:13:23 +03:00
## Copying and moving text
2016-09-09 17:59:40 +03:00
Status | Command | Description | Note
---|--------|-------------|-----------------
:running: | "{char} | use register {char} for the next delete, yank, or put | read only registers are not supported yet
2016-08-02 12:37:38 +03:00
:white_check_mark: | "* | use register `*` to access system clipboard
2016-09-13 17:51:58 +03:00
:white_check_mark: | :reg | show the contents of all registers
:white_check_mark: | :reg {arg} | show the contents of registers mentioned in {arg}
2016-06-24 11:52:35 +03:00
:white_check_mark: | :1234: y{motion} | yank the text moved over with {motion} into a register
2016-06-23 11:25:37 +03:00
:white_check_mark: | {visual}y | yank the highlighted text into a register
2016-06-24 11:52:35 +03:00
:white_check_mark: | :1234: yy | yank N lines into a register
2016-09-09 17:59:40 +03:00
:white_check_mark: | :1234: Y | yank N lines into a register
2016-06-23 11:25:37 +03:00
:white_check_mark: | :1234: p | put a register after the cursor position (N times)
:white_check_mark: | :1234: P | put a register before the cursor position (N times)
2016-08-02 10:07:36 +03:00
:white_check_mark: | :1234: ]p | like p, but adjust indent to current line
:white_check_mark: | :1234: [p | like P, but adjust indent to current line
:white_check_mark: | :1234: gp | like p, but leave cursor after the new text
:white_check_mark: | :1234: gP | like P, but leave cursor after the new text
2016-06-23 11:13:23 +03:00
## Changing text
2016-09-09 17:59:40 +03:00
Status | Command | Description | Note
---|--------|------------|------------------
2016-09-12 20:48:54 +03:00
:white_check_mark: | :1234: r{char} | replace N characters with {char}
2016-09-09 17:59:40 +03:00
:arrow_down:| :1234: gr{char} | replace N characters without affecting layout
2016-09-12 22:42:00 +03:00
:white_check_mark: | :1234: R | enter Replace mode (repeat the entered text N times) | {count} is not supported yet
2016-09-09 17:59:40 +03:00
:arrow_down:| :1234: gR | enter virtual Replace mode: Like Replace mode but without affecting layout
:arrow_down:| {visual}r{char} | in Visual block mode: Replace each char of the selected text with {char}
2016-06-23 11:13:23 +03:00
2016-06-23 11:25:37 +03:00
(change = delete text and enter Insert mode)
2016-06-23 11:13:23 +03:00
Status | Command | Description
---|--------|------------------------------
2016-09-09 17:59:40 +03:00
:white_check_mark: | :1234: c{motion} | change the text that is moved over with {motion}
:white_check_mark: | {visual}c | change the highlighted text
:white_check_mark: | :1234: cc | change N lines
:white_check_mark: | :1234: S | change N lines
:white_check_mark: | :1234: C | change to the end of the line (and N-1 more lines)
:white_check_mark: | :1234: s | change N characters
:white_check_mark: | {visual}c | in Visual block mode: Change each of the selected lines with the entered text
:white_check_mark: | {visual}C | in Visual block mode: Change each of the selected lines until end-of-line with the entered text
:white_check_mark: | switch case for highlighted text
2016-08-17 11:57:12 +03:00
:white_check_mark: | {visual}u | make highlighted text lowercase
:white_check_mark: | {visual}U | make highlighted text uppercase
2016-08-17 12:10:18 +03:00
:white_check_mark: | g~{motion} | switch case for the text that is moved over with {motion}
:white_check_mark: | gu{motion} | make the text that is moved over with {motion} lowercase
:white_check_mark: | gU{motion} | make the text that is moved over with {motion} uppercase
2016-06-30 20:15:23 +03:00
:arrow_down: | {visual}g? | perform rot13 encoding on highlighted text
:arrow_down: | g?{motion} | perform rot13 encoding on the text that is moved over with {motion}
2016-08-11 13:42:40 +03:00
:white_check_mark: | :1234: CTRL-A | add N to the number at or after the cursor
:white_check_mark: | :1234: CTRL-X | subtract N from the number at or after the cursor
2016-06-23 11:25:37 +03:00
:white_check_mark: | :1234: < {motion} | move the lines that are moved over with {motion} one shiftwidth left
:white_check_mark: | :1234: < < | move N lines one shiftwidth left
:white_check_mark: | :1234: >{motion} | move the lines that are moved over with {motion} one shiftwidth right
:white_check_mark: | :1234: >> | move N lines one shiftwidth right
2016-09-09 17:59:40 +03:00
:arrow_down:| :1234: gq{motion}| format the lines that are moved over with {motion} to 'textwidth' length
:arrow_down:| :[range]ce[nter] [width] | center the lines in [range]
:arrow_down:| :[range]le[ft] [indent] | left-align the lines in [range] (with [indent])
:arrow_down:| :[ranee]ri[ght] [width] | right-align the lines in [range]
2016-06-23 11:13:23 +03:00
2016-08-15 08:16:14 +03:00
## Complex changes
2016-09-09 17:59:40 +03:00
Status | Command | Description | Note
---|--------|------------------|------------
:arrow_down:| :1234: `!{motion}{command}<CR>` | filter the lines that are moved over through {command}
:arrow_down:| :1234: `!!{command}<CR>` | filter N lines through {command}
:arrow_down:| `{visual}!{command}<CR>` | filter the highlighted lines through {command}
:arrow_down:| `:[range]! {command}<CR>` | filter [range] lines through {command}
2016-08-15 08:16:14 +03:00
:white_check_mark: | :1234: ={motion} | filter the lines that are moved over through 'equalprg'
2016-09-09 17:59:40 +03:00
:arrow_down:| :1234: == | filter N lines through 'equalprg'
2016-08-15 08:16:14 +03:00
:white_check_mark: | {visual}= | filter the highlighted lines through 'equalprg'
2016-09-09 17:59:40 +03:00
:white_check_mark: :star: :warning: | :[range]s[ubstitute]/{pattern}/{string}/[g][c] | substitute {pattern} by {string} in [range] lines; with [g], replace all occurrences of {pattern}; with [c], confirm each replacement | Currently we only support JavaScript Regex and only options `gi` are implemented
:arrow_down:| :[range]s[ubstitute] [g][c] | repeat previous ":s" with new range and options
:arrow_down:| & | Repeat previous ":s" on current line without options
:arrow_down:| :[range]ret[ab][!] [tabstop] | set 'tabstop' to new value and adjust white space accordingly
2016-08-15 08:16:14 +03:00
2016-06-23 11:13:23 +03:00
## Visual mode
Status | Command | Description
---|--------|------------------------------
2016-07-26 11:26:38 +03:00
:white_check_mark: | v | start highlighting characters
:white_check_mark: | V | start highlighting linewise
2016-09-09 17:59:40 +03:00
:white_check_mark:| o | exchange cursor position with start of highlighting
:arrow_down: | gv | start highlighting on previous visual area
2016-06-23 11:25:37 +03:00
:white_check_mark: | v | highlight characters or stop highlighting
:white_check_mark: | V | highlight linewise or stop highlighting
2016-09-09 17:59:40 +03:00
:white_check_mark: | CTRL-V | highlight blockwise or stop highlighting
2016-06-23 11:13:23 +03:00
## Text objects (only in Visual mode or after an operator)
Status | Command | Description
---|--------|------------------------------
2016-07-23 09:33:55 +03:00
:white_check_mark: | :1234: aw | Select "a word"
:white_check_mark: | :1234: iw | Select "inner word"
:white_check_mark: | :1234: aW | Select "a |WORD|"
:white_check_mark: | :1234: iW | Select "inner |WORD|"
2016-08-11 19:26:25 +03:00
:white_check_mark: | :1234: as | Select "a sentence"
:white_check_mark: | :1234: is | Select "inner sentence"
2016-09-13 03:55:20 +03:00
:white_check_mark: | :1234: ap | Select "a paragraph"
:white_check_mark: | :1234: ip | Select "inner paragraph"
2016-08-17 13:49:51 +03:00
:white_check_mark: | :1234: a], a[ | select '[' ']' blocks
:white_check_mark: | :1234: i], i[ | select inner '[' ']' blocks
:white_check_mark: | :1234: ab, a(, a) | Select "a block" (from "[(" to "])")
:white_check_mark: | :1234: ib, i), i( | Select "inner block" (from "[(" to "])")
:white_check_mark: | :1234: a>, a< | Select "a < > block"
:white_check_mark: | :1234: i>, i< | Select "inner < > block"
:white_check_mark: | :1234: aB, a{, a} | Select "a Block" (from "[{" to "]}")
:white_check_mark: | :1234: iB, i{, i} | Select "inner Block" (from "[{" to "]}")
2016-08-19 18:23:31 +03:00
:white_check_mark: | :1234: at | Select "a tag block" (from < aaa> to < /aaa> )
:white_check_mark: | :1234: it | Select "inner tag block" (from < aaa> to < /aaa> )
2016-08-11 13:42:40 +03:00
:white_check_mark: | :1234: a' | Select "a single quoted string"
:white_check_mark: | :1234: i' | Select "inner single quoted string"
:white_check_mark: | :1234: a" | Select "a double quoted string"
:white_check_mark: | :1234: i" | Select "inner double quoted string"
:white_check_mark: | :1234: a` | Select "a backward quoted string"
:white_check_mark: | :1234: i` | Select "inner backward quoted string"
2016-06-23 11:13:23 +03:00
## Repeating commands
2016-09-20 19:04:03 +03:00
Status | Command | Description | Note
---|--------|--------------|----------------
:white_check_mark: :star: | :1234: . | repeat last change (with count replaced with N) | It won't repeat Code's auto-complete change.
2016-09-09 17:59:40 +03:00
:arrow_down:| q{a-z} | record typed characters into register {a-z}
:arrow_down:| q{A-Z} | record typed characters, appended to register {a-z}
:arrow_down:| q | stop recording
:arrow_down:| :1234: @{a-z} | execute the contents of register {a-z} (N times)
:arrow_down:| :1234: @@ | repeat previous @{a-z} (N times)
:arrow_down:| :@{a-z} | execute the contents of register {a-z} as an Ex command
:arrow_down:| :@@ | repeat previous :@{a-z}
:arrow_down:| :[range]g[lobal]/{pattern}/[cmd] | execute Ex command [cmd] (default: ":p") on the lines within [range] where {pattern} matches
:arrow_down:| :[range]g[lobal]!/{pattern}/[cmd] | execute Ex command [cmd] (default: ":p") on the lines within [range] where {pattern} does NOT match
2016-06-30 20:15:23 +03:00
:arrow_down: | :so[urce] {file} | read Ex commands from {file}
:arrow_down: | :so[urce]! {file} | read Vim commands from {file}
:arrow_down: | :sl[eep] [sec] | don't do anything for [sec] seconds
:arrow_down: | :1234: gs | goto Sleep for N seconds
2016-07-26 11:26:38 +03:00
2016-08-15 08:16:14 +03:00
## options
2016-06-23 11:25:37 +03:00
2016-09-09 17:59:40 +03:00
Status | Command | Description | Note
---|--------|---------|---------------------
:arrow_down: | :se[t] | show all modified options
:arrow_down: | :se[t] all | show all non-termcap options
:arrow_down: | :se[t] termcap | show all termcap options
2016-08-15 08:16:14 +03:00
:white_check_mark: | :se[t] {option} | set boolean option (switch it on), show string or number option
:white_check_mark: | :se[t] no{option} | reset boolean option (switch it off)
2016-09-09 17:59:40 +03:00
:white_check_mark: | :se[t] inv{option} |invert boolean option
2016-08-15 08:16:14 +03:00
:white_check_mark: | :se[t] {option}={value} | set string/number option to {value}
2016-09-09 17:59:40 +03:00
:white_check_mark: | :se[t] {option}+={value} | append {value} to string option, add {value} to number option
2016-09-09 19:59:36 +03:00
:white_check_mark: | :se[t] {option}-={value} | remove {value} to string option, subtract {value} from number option | We don't support string option here yet.
2016-09-09 20:21:42 +03:00
:white_check_mark: | :se[t] {option}? | show value of {option}
2016-09-09 17:59:40 +03:00
:arrow_down: | :se[t] {option}& | reset {option} to its default value
:arrow_down: | :setl[ocal] | like ":set" but set the local value for options that have one
:arrow_down: | :setg[lobal] | like ":set" but set the global value of a local option
:arrow_down: | :fix[del] | set value of 't_kD' according to value of 't_kb'
:arrow_down: | :opt[ions] | open a new window to view and set options, grouped by functionality, a one line explanation and links to the help
2016-06-23 11:25:37 +03:00
2016-08-15 08:16:14 +03:00
Since the list is too long, now we just put those already supported options here.
2016-06-23 11:25:37 +03:00
2016-08-15 08:16:14 +03:00
Status | Command | Default Value | Description
---|--------|-------|------------------------------
2016-08-19 18:23:31 +03:00
:white_check_mark:| tabstop (ts) | 4. we use Code's default value `tabSize` instead of Vim | number of spaces that < Tab> in file uses
2016-09-09 17:59:40 +03:00
:white_check_mark:| hlsearch (hls) | false | When there is a previous search pattern, highlight all its matches.
2016-08-24 02:36:31 +03:00
:white_check_mark:| ignorecase (ic) | true | Ignore case in search patterns.
:white_check_mark:| smartcase (scs) | true | Override the 'ignorecase' option if the search pattern contains upper case characters.
2016-08-15 08:16:14 +03:00
:white_check_mark:| iskeyword (isk) | `@,48-57,_,128-167,224-235` | keywords contain alphanumeric characters and '_'. If there is no user setting for `iskeyword` , we use `editor.wordSeparators` properties.
:white_check_mark:| scroll (scr) | 20 | Number of lines to scroll with CTRL-U and CTRL-D commands.
2016-08-19 18:23:31 +03:00
:white_check_mark:| expandtab (et) | True. we use Code's default value `inserSpaces` instead of Vim | use spaces when < Tab> is inserted
2016-08-30 11:24:28 +03:00
:white_check_mark:| autoindent | true | Keep indentation when doing `cc` or `S` in normal mode to replace a line.
2016-06-23 11:25:37 +03:00
2016-08-15 08:16:14 +03:00
---
2016-07-26 11:26:38 +03:00
2016-08-15 08:16:14 +03:00
## Undo/Redo commands
2016-07-26 11:26:38 +03:00
2016-09-09 17:59:40 +03:00
Status | Command | Description | Note
2016-08-15 08:16:14 +03:00
---|--------|-------|------------------------------
2016-09-09 17:59:40 +03:00
:running: | :1234: u | undo last N changes | Current implementation may not cover every case perfectly.
:running: | :1234: CTRL-R | redo last N undone changes | As above.
| U | restore last changed line
2016-06-23 11:25:37 +03:00
2016-08-15 08:16:14 +03:00
## External commands
2016-06-23 11:25:37 +03:00
2016-09-09 17:59:40 +03:00
Status | Command | Description
---|--------|-----------------
2016-08-15 08:16:14 +03:00
:arrow_down: | :sh[ell] | start a shell
:arrow_down: | :!{command} | execute {command} with a shell
:arrow_down: | K | lookup keyword under the cursor with 'keywordprg' program (default: "man")
2016-06-24 11:18:11 +03:00
2016-09-12 01:25:02 +03:00
## Ex ranges
2016-06-24 11:18:11 +03:00
2016-09-12 01:25:02 +03:00
Status | Command | Description | Note
---|--------|-------|------------|------------------
2016-09-09 17:59:40 +03:00
:white_check_mark: | , | separates two line numbers|
2016-09-12 01:25:02 +03:00
:white_check_mark: :star: :warning: | ; | idem, set cursor to the first line number before interpreting the second one | The cursor movement is not included.
2016-08-15 08:16:14 +03:00
:white_check_mark: | {number} | an absolute line number
:white_check_mark: | . | the current line
:white_check_mark: | $ | the last line in the file
:white_check_mark: | % | equal to 1,$ (the entire file)
2016-09-12 01:25:02 +03:00
:white_check_mark: | * | equal to '< ,'> (visual area)
:white_check_mark: | 't | position of mark t
:arrow_down: | /{pattern}[/] | the next line where {pattern} matches
:arrow_down: | ?{pattern}[?] | the previous line where {pattern} matches
2016-08-15 08:16:14 +03:00
:white_check_mark: | +[num] | add [num] to the preceding line number (default: 1)
:white_check_mark: | -[num] | subtract [num] from the preceding line number (default: 1)
## Editing a file
2016-06-24 11:18:11 +03:00
2016-09-09 17:59:40 +03:00
Status | Command | Description | Note
---|--------|------------------|-----------
:white_check_mark: :star: | :e[dit] {file} | Edit {file}. | We will open file in a new Tab of current Grouped Editor instead of opening in current tab.
2016-06-28 05:25:28 +03:00
2016-08-15 08:16:14 +03:00
## Multi-window commands
2016-07-08 09:42:51 +03:00
2016-09-09 17:59:40 +03:00
Status | Command | Description | Note
---|--------|-----------------|-------------
:white_check_mark: :star: | :e[dit] {file} | Edit {file}. | We will open file in a new Tab of current Grouped Editor instead of opening in current tab.
:white_check_mark: :star: | < ctrl-w> hl | Switching between windows. | As we don't have the concept of Window in VS Code, we are mapping these commands to switching between Grouped Editors.
:x: | :sp {file} | Split current window in two. | VS Code doesn't support split Window horizontally.
:white_check_mark: :star: | :vsp {file} | Split vertically current window in two. | VS Code only supports three vertical window at most and that's the limitation of this command.
:x: | :new | Create a new window horizontally and start editing an empty file in it. | VS Code doesn't support split Window horizontally.
:white_check_mark: :star: | :vne[w] | Create a new window vertically and start editing an empty file in it. | VS Code only supports three vertical window at most and that's the limitation of this command.
2016-07-08 09:42:51 +03:00
2016-07-26 11:26:38 +03:00
## Tabs
2016-06-28 05:25:28 +03:00
2016-09-09 17:59:40 +03:00
Status | Command | Description | Note
---|--------|------------------|------------
2016-07-26 11:26:38 +03:00
:white_check_mark: | :tabn[ext] :1234: | Go to next tab page or tab page {count}. The first tab page has number one.
2016-09-09 20:33:58 +03:00
:white_check_mark: | {count}< C-PageDown> , {count}gt | Same as above
2016-06-28 09:12:53 +03:00
:white_check_mark: | :tabp[revious] :1234: | Go to the previous tab page. Wraps around from the first one to the last one.
2016-07-26 11:26:38 +03:00
:white_check_mark: | :tabN[ext] :1234: | Same as above
2016-09-12 01:25:02 +03:00
:white_check_mark: | {count}< C-PageUp> , {count}gT | Same as above
2016-06-28 09:12:53 +03:00
:white_check_mark: | :tabfir[st] | Go to the first tab page.
:white_check_mark: | :tabl[ast] | Go to the last tab page.
2016-09-09 20:21:42 +03:00
:white_check_mark: | :tabe[dit] {file} | Open a new tab page with an empty window, after the current tab page
:arrow_down: | :[count]tabe[dit], :[count]tabnew | Same as above | [count] is not supported.
:white_check_mark: | :tabnew {file} | Open a new tab page with an empty window, after the current tab page
2016-09-09 17:59:40 +03:00
:arrow_down:| :[count]tab {cmd} | Execute {cmd} and when it opens a new window open a new tab page instead.
2016-09-09 20:21:42 +03:00
:white_check_mark: :star: | :tabc[lose][!] :1234: | Close current tab page or close tab page {count}. | Code will close tab directly without saving.
:white_check_mark: :star: | :tabo[nly][!] | Close all other tab pages. | `!` is not supported yet. | Code will close tab directly without saving.
2016-07-26 11:26:38 +03:00
:white_check_mark: | :tabm[ove] [N] | Move the current tab page to after tab page N.
2016-09-09 17:59:40 +03:00
:arrow_down:| :tabs | List the tab pages and the windows they contain. | You can always use Code's built-in shortcut: `cmd/ctrl+p`
:arrow_down:| :tabd[o] {cmd} | Execute {cmd} in each tab page.
2016-07-29 10:43:42 +03:00
## Folding
### Fold methods
The folding method can be set with the 'foldmethod' option. This is currently not possible as we are relying on Code's Fold logic.
### Fold commands
Status | Command | Description
---|--------|------------------------------
2016-09-09 17:59:40 +03:00
:arrow_down: | zf{motion} or {Visual}zf | Operator to create a fold.
:arrow_down: | zF | Create a fold for [count] lines. Works like "zf".
:arrow_down: | zd | Delete one fold at the cursor.
:arrow_down: | zD | Delete folds recursively at the cursor.
:arrow_down: | zE | Eliminate all folds in the window.
2016-08-22 19:33:34 +03:00
:white_check_mark: | zo | Open one fold under the cursor.When a count is given, that many folds deep will be opened.
2016-07-29 10:43:42 +03:00
:white_check_mark: | zO | Open all folds under the cursor recursively.
2016-08-22 19:33:34 +03:00
:white_check_mark: | zc | Close one fold under the cursor. When a count is given, that many folds deep are closed.
2016-07-29 10:43:42 +03:00
:white_check_mark:| zC | Close all folds under the cursor recursively.
2016-09-09 17:59:40 +03:00
:arrow_down: | za | When on a closed fold: open it. When on an open fold: close it and set 'foldenable'.
:arrow_down: | zA | When on a closed fold: open it recursively. When on an open fold: close it recursively and set 'foldenable'.
:arrow_down: | zv | View cursor line: Open just enough folds to make the line in which the cursor is located not folded.
:arrow_down: | zx | Update folds: Undo manually opened and closed folds: re-apply 'foldlevel', then do "zv": View cursor line.
:arrow_down: | zX | Undo manually opened and closed folds
:arrow_down: | zm | Fold more: Subtract one from 'foldlevel'.
2016-07-29 10:43:42 +03:00
:white_check_mark: | zM | Close all folds: set 'foldlevel' to 0. 'foldenable' will be set.
2016-09-09 17:59:40 +03:00
:arrow_down: | zr | Reduce folding: Add one to 'foldlevel'.
2016-07-29 10:43:42 +03:00
:white_check_mark: | zR | Open all folds. This sets 'foldlevel' to highest fold level.
2016-09-09 17:59:40 +03:00
:arrow_down: | zn | Fold none: reset 'foldenable'. All folds will be open.
:arrow_down: | zN | Fold normal: set 'foldenable'. All folds will be as they were before.
:arrow_down: | zi | Invert 'foldenable'.
:arrow_down: | [z | Move to the start of the current open fold.
:arrow_down: | ]z | Move to the end of the current open fold.
:arrow_down: | zj | Move downwards to the start of the next fold.
:arrow_down: | zk | Move upwards to the end of the previous fold.
2016-07-29 10:43:42 +03:00
### Fold options
2016-09-20 19:04:03 +03:00
Currently we don't support any fold option and we are following Code configurations.