Bram Moolenaar | 05159a0 | 2005-02-26 23:04:13 +0000 | [diff] [blame] | 1 | *index.txt* For Vim version 7.0aa. Last change: 2005 Feb 25 |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 2 | |
| 3 | |
| 4 | VIM REFERENCE MANUAL by Bram Moolenaar |
| 5 | |
| 6 | *index* |
| 7 | This file contains a list of all commands for each mode, with a tag and a |
| 8 | short description. The lists are sorted on ASCII value. |
| 9 | |
| 10 | Tip: When looking for certain functionality, use a search command. E.g., |
| 11 | to look for deleting something, use: "/delete". |
| 12 | |
| 13 | 1. Insert mode |insert-index| |
| 14 | 2. Normal mode |normal-index| |
| 15 | 2.1. Text objects |objects| |
| 16 | 2.2. Window commands |CTRL-W| |
| 17 | 2.3. Square bracket commands |[| |
| 18 | 2.4. Commands starting with 'g' |g| |
| 19 | 2.5. Commands starting with 'z' |z| |
| 20 | 3. Visual mode |visual-index| |
| 21 | 4. Command-line editing |ex-edit-index| |
| 22 | 5. EX commands |ex-cmd-index| |
| 23 | |
| 24 | For an overview of options see help.txt |option-list|. |
| 25 | For an overview of built-in functions see |functions|. |
| 26 | For a list of Vim variables see |vim-variable|. |
| 27 | For a complete listing of all help items see |help-tags|. |
| 28 | |
| 29 | ============================================================================== |
| 30 | 1. Insert mode *insert-index* |
| 31 | |
| 32 | tag char action ~ |
| 33 | ----------------------------------------------------------------------- |
| 34 | |i_CTRL-@| CTRL-@ insert previously inserted text and stop |
| 35 | insert |
| 36 | |i_CTRL-A| CTRL-A insert previously inserted text |
| 37 | CTRL-B not used |i_CTRL-B-gone| |
| 38 | |i_CTRL-C| CTRL-C quit insert mode, without checking for |
| 39 | abbreviation, unless 'insertmode' set. |
| 40 | |i_CTRL-D| CTRL-D delete one shiftwidth of indent in the current |
| 41 | line |
| 42 | |i_CTRL-E| CTRL-E insert the character which is below the cursor |
| 43 | CTRL-F not used (but by default it's in 'cinkeys' to |
| 44 | re-indent the current line) |
| 45 | |i_CTRL-G_j| CTRL-G CTRL-J line down, to column where inserting started |
| 46 | |i_CTRL-G_j| CTRL-G j line down, to column where inserting started |
| 47 | |i_CTRL-G_j| CTRL-G <Down> line down, to column where inserting started |
| 48 | |i_CTRL-G_k| CTRL-G CTRL-K line up, to column where inserting started |
| 49 | |i_CTRL-G_k| CTRL-G k line up, to column where inserting started |
| 50 | |i_CTRL-G_k| CTRL-G <Up> line up, to column where inserting started |
| 51 | |i_CTRL-G_u| CTRL-G u start new undoable edit |
| 52 | |i_<BS>| <BS> delete character before the cursor |
| 53 | |i_digraph| {char1}<BS>{char2} |
| 54 | enter digraph (only when 'digraph' option set) |
| 55 | |i_CTRL-H| CTRL-H same as <BS> |
| 56 | |i_<Tab>| <Tab> insert a <Tab> character |
| 57 | |i_CTRL-I| CTRL-I same as <Tab> |
| 58 | |i_<NL>| <NL> same as <CR> |
| 59 | |i_CTRL-J| CTRL-J same as <CR> |
| 60 | |i_CTRL-K| CTRL-K {char1} {char2} |
| 61 | enter digraph |
| 62 | |i_CTRL-L| CTRL-L when 'insertmode' set: Leave Insert mode |
| 63 | |i_<CR>| <CR> begin new line |
| 64 | |i_CTRL-M| CTRL-M same as <CR> |
| 65 | |i_CTRL-N| CTRL-N find next match for keyword in front of the |
| 66 | cursor |
| 67 | |i_CTRL-O| CTRL-O execute a single command and return to insert |
| 68 | mode |
| 69 | |i_CTRL-P| CTRL-P find previous match for keyword in front of |
| 70 | the cursor |
| 71 | |i_CTRL-Q| CTRL-Q same as CTRL-V, unless used for terminal |
| 72 | control flow |
| 73 | |i_CTRL-R| CTRL-R {0-9a-z"%#*:=} |
| 74 | insert the contents of a register |
| 75 | |i_CTRL-R_CTRL-R| CTRL-R CTRL-R {0-9a-z"%#*:=} |
| 76 | insert the contents of a register literally |
| 77 | |i_CTRL-R_CTRL-O| CTRL-R CTRL-O {0-9a-z"%#*:=} |
| 78 | insert the contents of a register literally |
| 79 | and don't auto-indent |
| 80 | |i_CTRL-R_CTRL-P| CTRL-R CTRL-P {0-9a-z"%#*:=} |
| 81 | insert the contents of a register literally |
| 82 | and fix indent. |
| 83 | CTRL-S (used for terminal control flow) |
| 84 | |i_CTRL-T| CTRL-T insert one shiftwidth of indent in current |
| 85 | line |
| 86 | |i_CTRL-U| CTRL-U delete all entered characters in the current |
| 87 | line |
| 88 | |i_CTRL-V| CTRL-V {char} insert next non-digit literally |
| 89 | |i_CTRL-V_digit| CTRL-V {number} insert three digit decimal number as a single |
| 90 | byte. |
| 91 | |i_CTRL-W| CTRL-W delete word before the cursor |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 92 | |i_CTRL-X| CTRL-X {mode} enter CTRL-X sub mode, see |i_CTRL-X_index| |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 93 | |i_CTRL-Y| CTRL-Y insert the character which is above the cursor |
| 94 | |i_CTRL-Z| CTRL-Z when 'insertmode' set: suspend Vim |
| 95 | |i_<Esc>| <Esc> end insert mode (unless 'insertmode' set) |
| 96 | |i_CTRL-[| CTRL-[ same as <Esc> |
| 97 | |i_CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode |
| 98 | |i_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode' |
| 99 | CTRL-\ a - z reserved for extensions |
| 100 | CTRL-\ others not used |
| 101 | |i_CTRL-]| CTRL-] trigger abbreviation |
| 102 | |i_CTRL-^| CTRL-^ toggle use of |:lmap| mappings |
| 103 | |i_CTRL-_| CTRL-_ When 'allowrevins' set: change language |
| 104 | (Hebrew, Farsi) {only when compiled with |
| 105 | +rightleft feature} |
| 106 | |
| 107 | <Space> to '~' not used, except '0' and '^' followed by |
| 108 | CTRL-D |
| 109 | |
| 110 | |i_0_CTRL-D| 0 CTRL-D delete all indent in the current line |
| 111 | |i_^_CTRL-D| ^ CTRL-D delete all indent in the current line, restore |
| 112 | it in the next line |
| 113 | |
| 114 | |i_<Del>| <Del> delete character under the cursor |
| 115 | |
| 116 | Meta characters (0x80 to 0xff, 128 to 255) |
| 117 | not used |
| 118 | |
| 119 | |i_<Left>| <Left> cursor one character left |
| 120 | |i_<S-Left>| <S-Left> cursor one word left |
| 121 | |i_<C-Left>| <C-Left> cursor one word left |
| 122 | |i_<Right>| <Right> cursor one character right |
| 123 | |i_<S-Right>| <S-Right> cursor one word right |
| 124 | |i_<C-Right>| <C-Right> cursor one word right |
| 125 | |i_<Up>| <Up> cursor one line up |
| 126 | |i_<S-Up>| <S-Up> same as <PageUp> |
| 127 | |i_<Down>| <Down> cursor one line down |
| 128 | |i_<S-Down>| <S-Down> same as <PageDown> |
| 129 | |i_<Home>| <Home> cursor to start of line |
| 130 | |i_<C-Home>| <C-Home> cursor to start of file |
| 131 | |i_<End>| <End> cursor past end of line |
| 132 | |i_<C-End>| <C-End> cursor past end of file |
Bram Moolenaar | 69a7cb4 | 2004-06-20 12:51:53 +0000 | [diff] [blame] | 133 | |i_<PageUp>| <PageUp> one screenful backward |
| 134 | |i_<PageDown>| <PageDown> one screenful forward |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 135 | |i_<F1>| <F1> same as <Help> |
| 136 | |i_<Help>| <Help> stop insert mode and display help window |
| 137 | |i_<Insert>| <Insert> toggle Insert/Replace mode |
| 138 | |i_<LeftMouse>| <LeftMouse> cursor at mouse click |
| 139 | |i_<MouseDown>| <MouseDown> scroll three lines downwards |
| 140 | |i_<S-MouseDown>| <S-MouseDown> scroll a full page downwards |
| 141 | |i_<MouseUp>| <MouseUp> scroll three lines upwards |
| 142 | |i_<S-MouseUp>| <S-MouseUp> scroll a full page upwards |
| 143 | |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 144 | commands in CTRL-X submode *i_CTRL-X_index* |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 145 | |
| 146 | |i_CTRL-X_CTRL-D| CTRL-X CTRL-D complete defined identifiers |
| 147 | |i_CTRL-X_CTRL-E| CTRL-X CTRL-E scroll up |
| 148 | |i_CTRL-X_CTRL-F| CTRL-X CTRL-F complete file names |
| 149 | |i_CTRL-X_CTRL-I| CTRL-X CTRL-I complete identifiers |
| 150 | |i_CTRL-X_CTRL-K| CTRL-X CTRL-K complete identifiers from dictionary |
| 151 | |i_CTRL-X_CTRL-L| CTRL-X CTRL-L complete whole lines |
| 152 | |i_CTRL-X_CTRL-N| CTRL-X CTRL-N next completion |
| 153 | |i_CTRL-X_CTRL-P| CTRL-X CTRL-P previous completion |
| 154 | |i_CTRL-X_CTRL-T| CTRL-X CTRL-T complete identifiers from thesaurus |
| 155 | |i_CTRL-X_CTRL-Y| CTRL-X CTRL-Y scroll down |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 156 | |i_CTRL-X_CTRL-U| CTRL-X CTRL-U complete with 'completefunc' |
| 157 | |i_CTRL-X_CTRL-V| CTRL-X CTRL-V complete like in : command line |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 158 | |i_CTRL-X_CTRL-]| CTRL-X CTRL-] complete tags |
| 159 | {not available when compiled without the +insert_expand feature} |
| 160 | |
| 161 | ============================================================================== |
| 162 | 2. Normal mode *normal-index* |
| 163 | |
| 164 | CHAR any non-blank character |
| 165 | WORD a sequence of non-blank characters |
| 166 | N a number entered before the command |
| 167 | {motion} a cursor movement command |
| 168 | Nmove the text that is moved over with a {motion} |
| 169 | SECTION a section that possibly starts with '}' instead of '{' |
| 170 | |
| 171 | note: 1 = cursor movement command; 2 = can be undone/redone |
| 172 | |
| 173 | tag char note action in Normal mode ~ |
| 174 | ------------------------------------------------------------------------------ |
| 175 | CTRL-@ not used |
| 176 | |CTRL-A| CTRL-A 2 add N to number at/after cursor |
| 177 | |CTRL-B| CTRL-B 1 scroll N screens Backwards |
| 178 | |CTRL-C| CTRL-C interrupt current (search) command |
| 179 | |CTRL-D| CTRL-D scroll Down N lines (default: half a screen) |
| 180 | |CTRL-E| CTRL-E scroll N lines upwards (N lines Extra) |
| 181 | |CTRL-F| CTRL-F 1 scroll N screens Forward |
| 182 | |CTRL-G| CTRL-G display current file name and position |
| 183 | |<BS>| <BS> 1 same as "h" |
| 184 | |CTRL-H| CTRL-H 1 same as "h" |
| 185 | |<Tab>| <Tab> 1 go to N newer entry in jump list |
| 186 | |CTRL-I| CTRL-I 1 same as <Tab> |
| 187 | |<NL>| <NL> 1 same as "j" |
| 188 | |CTRL-J| CTRL-J 1 same as "j" |
| 189 | CTRL-K not used |
| 190 | |CTRL-L| CTRL-L redraw screen |
| 191 | |<CR>| <CR> 1 cursor to the first CHAR N lines lower |
| 192 | |CTRL-M| CTRL-M 1 same as <CR> |
| 193 | |CTRL-N| CTRL-N 1 same as "j" |
| 194 | |CTRL-O| CTRL-O 1 go to N older entry in jump list |
| 195 | |CTRL-P| CTRL-P 1 same as "k" |
| 196 | CTRL-Q (used for terminal control flow) |
| 197 | |CTRL-R| CTRL-R 2 redo changes which were undone with 'u' |
| 198 | CTRL-S (used for terminal control flow) |
| 199 | |CTRL-T| CTRL-T jump to N older Tag in tag list |
| 200 | |CTRL-U| CTRL-U scroll N lines Upwards (default: half a |
| 201 | screen) |
| 202 | |CTRL-V| CTRL-V start blockwise Visual mode |
| 203 | |CTRL-W| CTRL-W {char} window commands, see |CTRL-W| |
| 204 | |CTRL-X| CTRL-X 2 subtract N from number at/after cursor |
| 205 | |CTRL-Y| CTRL-Y scroll N lines downwards |
| 206 | |CTRL-Z| CTRL-Z suspend program (or start new shell) |
| 207 | CTRL-[ <Esc> not used |
| 208 | |CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode (no-op) |
| 209 | |CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode' |
| 210 | CTRL-\ a - z reserved for extensions |
| 211 | CTRL-\ others not used |
| 212 | |CTRL-]| CTRL-] :ta to ident under cursor |
| 213 | |CTRL-^| CTRL-^ edit Nth alternate file (equivalent to |
| 214 | ":e #N") |
| 215 | CTRL-_ not used |
| 216 | |
| 217 | |<Space>| <Space> 1 same as "l" |
| 218 | |!| !{motion}{filter} |
| 219 | 2 filter Nmove text through the {filter} |
| 220 | command |
| 221 | |!!| !!{filter} 2 filter N lines through the {filter} command |
| 222 | |quote| "{a-zA-Z0-9.%#:-"} use register {a-zA-Z0-9.%#:-"} for next |
| 223 | delete, yank or put (uppercase to append) |
| 224 | ({.%#:} only work with put) |
| 225 | |#| # 1 search backward for the Nth occurrence of |
| 226 | the ident under the cursor |
| 227 | |$| $ 1 cursor to the end of Nth next line |
| 228 | |%| % 1 find the next (curly/square) bracket on |
| 229 | this line and go to its match, or go to |
| 230 | matching comment bracket, or go to matching |
| 231 | preprocessor directive. |
| 232 | |N%| {count}% 1 go to N percentage in the file |
| 233 | |&| & 2 repeat last :s |
| 234 | |'| '{a-zA-Z0-9} 1 cursor to the first CHAR on the line with |
| 235 | mark {a-zA-Z0-9} |
| 236 | |''| '' 1 cursor to the first CHAR of the line where |
| 237 | the cursor was before the latest jump. |
| 238 | |'(| '( 1 cursor to the first CHAR on the line of the |
| 239 | start of the current sentence |
| 240 | |')| ') 1 cursor to the first CHAR on the line of the |
| 241 | end of the current sentence |
| 242 | |'<| '< 1 cursor to the first CHAR of the line where |
| 243 | highlighted area starts/started in the |
| 244 | current buffer. |
| 245 | |'>| '> 1 cursor to the first CHAR of the line where |
| 246 | highlighted area ends/ended in the current |
| 247 | buffer. |
| 248 | |'[| '[ 1 cursor to the first CHAR on the line of the |
| 249 | start of last operated text or start of put |
| 250 | text |
| 251 | |']| '] 1 cursor to the first CHAR on the line of the |
| 252 | end of last operated text or end of put |
| 253 | text |
| 254 | |'{| '{ 1 cursor to the first CHAR on the line of the |
| 255 | start of the current paragraph |
| 256 | |'}| '} 1 cursor to the first CHAR on the line of the |
| 257 | end of the current paragraph |
| 258 | |(| ( 1 cursor N sentences backward |
| 259 | |)| ) 1 cursor N sentences forward |
| 260 | |star| * 1 search forward for the Nth occurrence of |
| 261 | the ident under the cursor |
| 262 | |+| + 1 same as <CR> |
| 263 | |,| , 1 repeat latest f, t, F or T in opposite |
| 264 | direction N times |
| 265 | |-| - 1 cursor to the first CHAR N lines higher |
| 266 | |.| . 2 repeat last change with count replaced with |
| 267 | N |
| 268 | |/| /{pattern}<CR> 1 search forward for the Nth occurrence of |
| 269 | {pattern} |
| 270 | |/<CR>| /<CR> 1 search forward for {pattern} of last search |
| 271 | |count| 0 1 cursor to the first char of the line |
| 272 | |count| 1 prepend to command to give a count |
| 273 | |count| 2 " |
| 274 | |count| 3 " |
| 275 | |count| 4 " |
| 276 | |count| 5 " |
| 277 | |count| 6 " |
| 278 | |count| 7 " |
| 279 | |count| 8 " |
| 280 | |count| 9 " |
| 281 | |:| : 1 start entering an Ex command |
| 282 | |N:| {count}: start entering an Ex command with range |
| 283 | from current line to N-1 lines down |
| 284 | |;| ; 1 repeat latest f, t, F or T N times |
| 285 | |<| <{motion} 2 shift Nmove lines one 'shiftwidth' |
| 286 | leftwards |
| 287 | |<<| << 2 shift N lines one 'shiftwidth' leftwards |
| 288 | |=| ={motion} 2 filter Nmove lines through "indent" |
| 289 | |==| == 2 filter N lines through "indent" |
| 290 | |>| >{motion} 2 shift Nmove lines one 'shiftwidth' |
| 291 | rightwards |
| 292 | |>>| >> 2 shift N lines one 'shiftwidth' rightwards |
| 293 | |?| ?{pattern}<CR> 1 search backward for the Nth previous |
| 294 | occurrence of {pattern} |
| 295 | |?<CR>| ?<CR> 1 search backward for {pattern} of last search |
| 296 | |@| @{a-z} 2 execute the contents of register {a-z} |
| 297 | N times |
| 298 | |@:| @: repeat the previous ":" command N times |
| 299 | |@@| @@ 2 repeat the previous @{a-z} N times |
| 300 | |A| A 2 append text after the end of the line N times |
| 301 | |B| B 1 cursor N WORDS backward |
| 302 | |C| ["x]C 2 change from the cursor position to the end |
| 303 | of the line, and N-1 more lines [into |
| 304 | buffer x]; synonym for "c$" |
| 305 | |D| ["x]D 2 delete the characters under the cursor |
| 306 | until the end of the line and N-1 more |
| 307 | lines [into buffer x]; synonym for "d$" |
| 308 | |E| E 1 cursor forward to the end of WORD N |
| 309 | |F| F{char} 1 cursor to the Nth occurrence of {char} to |
| 310 | the left |
| 311 | |G| G 1 cursor to line N, default last line |
| 312 | |H| H 1 cursor to line N from top of screen |
| 313 | |I| I 2 insert text before the first CHAR on the |
| 314 | line N times |
| 315 | |J| J 2 Join N lines; default is 2 |
| 316 | |K| K lookup Keyword under the cursor with |
| 317 | 'keywordprg' |
| 318 | |L| L 1 cursor to line N from bottom of screen |
| 319 | |M| M 1 cursor to middle line of screen |
| 320 | |N| N 1 repeat the latest '/' or '?' N times in |
| 321 | opposite direction |
| 322 | |O| O 2 begin a new line above the cursor and |
| 323 | insert text, repeat N times |
| 324 | |P| ["x]P 2 put the text [from buffer x] before the |
| 325 | cursor N times |
| 326 | |Q| Q switch to "Ex" mode |
| 327 | |R| R 2 enter replace mode: overtype existing |
| 328 | characters, repeat the entered text N-1 |
| 329 | times |
| 330 | |S| ["x]S 2 delete N lines [into buffer x] and start |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 331 | insert; synonym for "cc". |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 332 | |T| T{char} 1 cursor till after Nth occurrence of {char} |
| 333 | to the left |
| 334 | |U| U 2 undo all latest changes on one line |
| 335 | |V| V start linewise Visual mode |
| 336 | |W| W 1 cursor N WORDS forward |
| 337 | |X| ["x]X 2 delete N characters before the cursor [into |
| 338 | buffer x] |
| 339 | |Y| ["x]Y yank N lines [into buffer x]; synonym for |
| 340 | "yy" |
| 341 | |ZZ| ZZ store current file if modified, and exit |
| 342 | |ZQ| ZQ exit current file always |
| 343 | |[| [{char} square bracket command (see below) |
| 344 | \ not used |
| 345 | |]| ]{char} square bracket command (see below) |
| 346 | |^| ^ 1 cursor to the first CHAR of the line |
| 347 | |_| _ 1 cursor to the first CHAR N - 1 lines lower |
| 348 | |`| `{a-zA-Z0-9} 1 cursor to the mark {a-zA-Z0-9} |
| 349 | |`(| `( 1 cursor to the start of the current sentence |
| 350 | |`)| `) 1 cursor to the end of the current sentence |
| 351 | |`<| `< 1 cursor to the start of the highlighted area |
| 352 | |`>| `> 1 cursor to the end of the highlighted area |
| 353 | |`[| `[ 1 cursor to the start of last operated text |
| 354 | or start of putted text |
| 355 | |`]| `] 1 cursor to the end of last operated text or |
| 356 | end of putted text |
| 357 | |``| `` 1 cursor to the position before latest jump |
| 358 | |`{| `{ 1 cursor to the start of the current paragraph |
| 359 | |`}| `} 1 cursor to the end of the current paragraph |
| 360 | |a| a 2 append text after the cursor N times |
| 361 | |b| b 1 cursor N words backward |
| 362 | |c| ["x]c{motion} 2 delete Nmove text [into buffer x] and start |
| 363 | insert |
| 364 | |cc| ["x]cc 2 delete N lines [into buffer x] and start |
| 365 | insert |
| 366 | |d| ["x]d{motion} 2 delete Nmove text [into buffer x] |
| 367 | |dd| ["x]dd 2 delete N lines [into buffer x] |
| 368 | |do| do 2 same as ":diffget" |
| 369 | |dp| dp 2 same as ":diffput" |
| 370 | |e| e 1 cursor forward to the end of word N |
| 371 | |f| f{char} 1 cursor to Nth occurrence of {char} to the |
| 372 | right |
| 373 | |g| g{char} extended commands, see below |
| 374 | |h| h 1 cursor N chars to the left |
| 375 | |i| i 2 insert text before the cursor N times |
| 376 | |j| j 1 cursor N lines downward |
| 377 | |k| k 1 cursor N lines upward |
| 378 | |l| l 1 cursor N chars to the right |
| 379 | |m| m{A-Za-z} set mark {A-Za-z} at cursor position |
| 380 | |n| n 1 repeat the latest '/' or '?' N times |
| 381 | |o| o 2 begin a new line below the cursor and |
| 382 | insert text, repeat N times |
| 383 | |p| ["x]p 2 put the text [from register x] after the |
| 384 | cursor N times |
| 385 | |q| q{0-9a-zA-Z"} record typed characters into named register |
| 386 | {0-9a-zA-Z"} (uppercase to append) |
| 387 | |q| q (while recording) stops recording |
| 388 | |q:| q: edit : command-line in command-line window |
| 389 | |q/| q/ edit / command-line in command-line window |
| 390 | |q?| q? edit ? command-line in command-line window |
| 391 | |r| r{char} 2 replace N chars with {char} |
| 392 | |s| ["x]s 2 (substitute) delete N characters [into |
| 393 | buffer x] and start insert |
| 394 | |t| t{char} 1 cursor till before Nth occurrence of {char} |
| 395 | to the right |
| 396 | |u| u 2 undo changes |
| 397 | |v| v start characterwise Visual mode |
| 398 | |w| w 1 cursor N words forward |
| 399 | |x| ["x]x 2 delete N characters under and after the |
| 400 | cursor [into buffer x] |
| 401 | |y| ["x]y{motion} yank Nmove text [into buffer x] |
| 402 | |yy| ["x]yy yank N lines [into buffer x] |
| 403 | |z| z{char} commands starting with 'z', see below |
| 404 | |{| { 1 cursor N paragraphs backward |
| 405 | |bar| | 1 cursor to column N |
| 406 | |}| } 1 cursor N paragraphs forward |
| 407 | |~| ~ 2 'tildeop' off: switch case of N characters |
| 408 | under cursor and move the cursor N |
| 409 | characters to the right |
| 410 | |~| ~{motion} 'tildeop' on: switch case of Nmove text |
| 411 | |<C-End>| <C-End> 1 same as "G" |
| 412 | |<C-Home>| <C-Home> 1 same as "gg" |
| 413 | |<C-Left>| <C-Left> 1 same as "b" |
| 414 | |<C-LeftMouse>| <C-LeftMouse> ":ta" to the keyword at the mouse click |
| 415 | |<C-Right>| <C-Right> 1 same as "w" |
| 416 | |<C-RightMouse>| <C-RightMouse> same as "CTRL-T" |
| 417 | |<Del>| ["x]<Del> 2 same as "x" |
| 418 | |N<Del>| {count}<Del> remove the last digit from {count} |
| 419 | |<Down>| <Down> 1 same as "j" |
| 420 | |<End>| <End> 1 same as "$" |
| 421 | |<F1>| <F1> same as <Help> |
| 422 | |<Help>| <Help> open a help window |
| 423 | |<Home>| <Home> 1 same as "0" |
| 424 | |<Insert>| <Insert> 2 same as "i" |
| 425 | |<Left>| <Left> 1 same as "h" |
| 426 | |<LeftMouse>| <LeftMouse> 1 move cursor to the mouse click position |
Bram Moolenaar | 293ee4d | 2004-12-09 21:34:53 +0000 | [diff] [blame] | 427 | |<MiddleMouse>| <MiddleMouse> 2 same as "gP" at the mouse click position |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 428 | |<PageDown>| <PageDown> same as CTRL-F |
| 429 | |<PageUp>| <PageUp> same as CTRL-B |
| 430 | |<Right>| <Right> 1 same as "l" |
| 431 | |<RightMouse>| <RightMouse> start Visual mode, move cursor to the mouse |
| 432 | click position |
| 433 | |<S-Down>| <S-Down> 1 same as CTRL-F |
| 434 | |<S-Left>| <S-Left> 1 same as "b" |
| 435 | |<S-LeftMouse>| <S-LeftMouse> same as "*" at the mouse click position |
| 436 | |<S-Right>| <S-Right> 1 same as "w" |
| 437 | |<S-RightMouse>| <S-RightMouse> same as "#" at the mouse click position |
| 438 | |<S-Up>| <S-Up> 1 same as CTRL-B |
| 439 | |<Undo>| <Undo> 2 same as "u" |
| 440 | |<Up>| <Up> 1 same as "k" |
| 441 | |<MouseDown>| <MouseDown> scroll three lines downwards |
| 442 | |<S-MouseDown>| <S-MouseDown> scroll a full page downwards |
| 443 | |<MouseUp>| <MouseUp> scroll three lines upwards |
| 444 | |<S-MouseUp>| <S-MouseUp> scroll a full page upwards |
| 445 | |
| 446 | ============================================================================== |
| 447 | 2.1 Text objects *objects* |
| 448 | |
| 449 | These can be used after an operator or in Visual mode to select an object. |
| 450 | |
| 451 | tag command action in Normal mode ~ |
| 452 | ------------------------------------------------------------------------------ |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 453 | |v_aquote| a" double quoted string |
| 454 | |v_a'| a' single quoted string |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 455 | |v_a(| a( same as ab |
| 456 | |v_a)| a) same as ab |
| 457 | |v_a<| a< "a <>" from '<' to the matching '>' |
| 458 | |v_a>| a> same as a< |
| 459 | |v_aB| aB "a Block" from "[{" to "]}" (with brackets) |
| 460 | |v_aW| aW "a WORD" (with white space) |
| 461 | |v_a[| a[ "a []" from '[' to the matching ']' |
| 462 | |v_a]| a] same as a[ |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 463 | |v_a`| a` string in backticks |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 464 | |v_ab| ab "a block" from "[(" to "])" (with braces) |
| 465 | |v_ap| ap "a paragraph" (with white space) |
| 466 | |v_as| as "a sentence" (with white space) |
| 467 | |v_aw| aw "a word" (with white space) |
| 468 | |v_a{| a{ same as aB |
| 469 | |v_a}| a} same as aB |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 470 | |v_iquote| i" double quoted string without the quotes |
| 471 | |v_i'| i' single quoted string without the quotes |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 472 | |v_i(| i( same as ib |
| 473 | |v_i)| i) same as ib |
| 474 | |v_i<| i< "inner <>" from '<' to the matching '>' |
| 475 | |v_i>| i> same as i< |
| 476 | |v_iB| iB "inner Block" from "[{" and "]}" |
| 477 | |v_iW| iW "inner WORD" |
| 478 | |v_i[| i[ "inner []" from '[' to the matching ']' |
| 479 | |v_i]| i] same as i[ |
Bram Moolenaar | cfbc5ee | 2004-07-02 15:38:35 +0000 | [diff] [blame] | 480 | |v_i`| i` string in backticks without the backticks |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 481 | |v_ib| ib "inner block" from "[(" to "])" |
| 482 | |v_ip| ip "inner paragraph" |
| 483 | |v_is| is "inner sentence" |
| 484 | |v_iw| iw "inner word" |
| 485 | |v_i{| i{ same as iB |
| 486 | |v_i}| i} same as iB |
| 487 | |
| 488 | ============================================================================== |
| 489 | 2.2 Window commands *CTRL-W* |
| 490 | |
| 491 | tag command action in Normal mode ~ |
| 492 | ------------------------------------------------------------------------------ |
| 493 | |CTRL-W_CTRL-B| CTRL-W CTRL-B same as "CTRL-W b" |
| 494 | |CTRL-W_CTRL-C| CTRL-W CTRL-C same as "CTRL-W c" |
| 495 | |CTRL-W_CTRL-D| CTRL-W CTRL-D same as "CTRL-W d" |
| 496 | |CTRL-W_CTRL-F| CTRL-W CTRL-F same as "CTRL-W f" |
| 497 | CTRL-W CTRL-G same as "CTRL-W g .." |
| 498 | |CTRL-W_CTRL-H| CTRL-W CTRL-H same as "CTRL-W h" |
| 499 | |CTRL-W_CTRL-I| CTRL-W CTRL-I same as "CTRL-W i" |
| 500 | |CTRL-W_CTRL-J| CTRL-W CTRL-J same as "CTRL-W j" |
| 501 | |CTRL-W_CTRL-K| CTRL-W CTRL-K same as "CTRL-W k" |
| 502 | |CTRL-W_CTRL-L| CTRL-W CTRL-L same as "CTRL-W l" |
| 503 | |CTRL-W_CTRL-N| CTRL-W CTRL-N same as "CTRL-W n" |
| 504 | |CTRL-W_CTRL-O| CTRL-W CTRL-O same as "CTRL-W o" |
| 505 | |CTRL-W_CTRL-P| CTRL-W CTRL-P same as "CTRL-W p" |
| 506 | |CTRL-W_CTRL-Q| CTRL-W CTRL-Q same as "CTRL-W q" |
| 507 | |CTRL-W_CTRL-R| CTRL-W CTRL-R same as "CTRL-W r" |
| 508 | |CTRL-W_CTRL-S| CTRL-W CTRL-S same as "CTRL-W s" |
| 509 | |CTRL-W_CTRL-T| CTRL-W CTRL-T same as "CTRL-W t" |
| 510 | |CTRL-W_CTRL-V| CTRL-W CTRL-V same as "CTRL-W v" |
| 511 | |CTRL-W_CTRL-W| CTRL-W CTRL-W same as "CTRL-W w" |
| 512 | |CTRL-W_CTRL-X| CTRL-W CTRL-X same as "CTRL-W x" |
| 513 | |CTRL-W_CTRL-Z| CTRL-W CTRL-Z same as "CTRL-W z" |
| 514 | |CTRL-W_CTRL-]| CTRL-W CTRL-] same as "CTRL-W ]" |
| 515 | |CTRL-W_CTRL-^| CTRL-W CTRL-^ same as "CTRL-W ^" |
| 516 | |CTRL-W_CTRL-_| CTRL-W CTRL-_ same as "CTRL-W _" |
| 517 | |CTRL-W_+| CTRL-W + increase current window height N lines |
| 518 | |CTRL-W_-| CTRL-W - decrease current window height N lines |
| 519 | |CTRL-W_<| CTRL-W < decrease current window width N columns |
| 520 | |CTRL-W_=| CTRL-W = make all windows the same height |
| 521 | |CTRL-W_>| CTRL-W > increase current window width N columns |
| 522 | |CTRL-W_H| CTRL-W H move current window to the far left |
| 523 | |CTRL-W_J| CTRL-W J move current window to the very bottom |
| 524 | |CTRL-W_K| CTRL-W K move current window to the very top |
| 525 | |CTRL-W_L| CTRL-W L move current window to the far right |
| 526 | |CTRL-W_P| CTRL-W P go to preview window |
| 527 | |CTRL-W_R| CTRL-W R rotate windows upwards N times |
| 528 | |CTRL-W_S| CTRL-W S same as "CTRL-W s" |
| 529 | |CTRL-W_W| CTRL-W W go to N previous window (wrap around) |
| 530 | |CTRL-W_]| CTRL-W ] split window and jump to tag under cursor |
| 531 | |CTRL-W_^| CTRL-W ^ split current window and edit alternate |
| 532 | file N |
| 533 | |CTRL-W__| CTRL-W _ set current window height to N (default: |
| 534 | very high) |
| 535 | |CTRL-W_b| CTRL-W b go to bottom window |
| 536 | |CTRL-W_c| CTRL-W c close current window (like |:close|) |
| 537 | |CTRL-W_d| CTRL-W d split window and jump to definition under |
| 538 | the cursor |
| 539 | |CTRL-W_f| CTRL-W f split window and edit file name under the |
| 540 | cursor |
| 541 | |CTRL-W_g_CTRL-]| CTRL-W g CTRL-] split window and do |:tjump| to tag under |
| 542 | cursor |
| 543 | |CTRL-W_g]| CTRL-W g ] split window and do |:tselect| for tag |
| 544 | under cursor |
| 545 | |CTRL-W_g}| CTRL-W g } do a |:ptjump| to the tag under the cursor |
| 546 | |CTRL-W_h| CTRL-W h go to Nth left window (stop at first window) |
| 547 | |CTRL-W_i| CTRL-W i split window and jump to declaration of |
| 548 | identifier under the cursor |
| 549 | |CTRL-W_j| CTRL-W j go N windows down (stop at last window) |
| 550 | |CTRL-W_k| CTRL-W k go N windows up (stop at first window) |
| 551 | |CTRL-W_l| CTRL-W l go to Nth right window (stop at last window) |
| 552 | |CTRL-W_n| CTRL-W n open new window, N lines high |
| 553 | |CTRL-W_o| CTRL-W o close all but current window (like |:only|) |
| 554 | |CTRL-W_p| CTRL-W p go to previous (last accessed) window |
| 555 | |CTRL-W_q| CTRL-W q quit current window (like |:quit|) |
| 556 | |CTRL-W_r| CTRL-W r rotate windows downwards N times |
| 557 | |CTRL-W_s| CTRL-W s split current window in two parts, new |
| 558 | window N lines high |
| 559 | |CTRL-W_t| CTRL-W t go to top window |
| 560 | |CTRL-W_v| CTRL-W v split current window vertically, new window |
| 561 | N lines wide |
| 562 | |CTRL-W_w| CTRL-W w go to N next window (wrap around) |
| 563 | |CTRL-W_x| CTRL-W x exchange current window with window N |
| 564 | (default: next window) |
| 565 | |CTRL-W_z| CTRL-W z close preview window |
| 566 | |CTRL-W_bar| CTRL-W | set window width to N columns |
| 567 | |CTRL-W_}| CTRL-W } show tag under cursor in preview window |
| 568 | |CTRL-W_<Down>| CTRL-W <Down> same as "CTRL-W j" |
| 569 | |CTRL-W_<Up>| CTRL-W <Up> same as "CTRL-W k" |
| 570 | |CTRL-W_<Left>| CTRL-W <Left> same as "CTRL-W h" |
| 571 | |CTRL-W_<Right>| CTRL-W <Right> same as "CTRL-W l" |
| 572 | |
| 573 | ============================================================================== |
| 574 | 2.3 Square bracket commands *[* *]* |
| 575 | |
| 576 | tag char note action in Normal mode ~ |
| 577 | ------------------------------------------------------------------------------ |
| 578 | |[_CTRL-D| [ CTRL-D jump to first #define found in current and |
| 579 | included files matching the word under the |
| 580 | cursor, start searching at beginning of |
| 581 | current file |
| 582 | |[_CTRL-I| [ CTRL-I jump to first line in current and included |
| 583 | files that contains the word under the |
| 584 | cursor, start searching at beginning of |
| 585 | current file |
| 586 | |[#| [# 1 cursor to N previous unmatched #if, #else |
| 587 | or #ifdef |
| 588 | |['| [' 1 cursor to previous lowercase mark, on first |
| 589 | non-blank |
| 590 | |[(| [( 1 cursor N times back to unmatched '(' |
| 591 | |[star| [* 1 same as "[/" |
| 592 | |[`| [` 1 cursor to previous lowercase mark |
| 593 | |[/| [/ 1 cursor to N previous start of a C comment |
| 594 | |[D| [D list all defines found in current and |
| 595 | included files matching the word under the |
| 596 | cursor, start searching at beginning of |
| 597 | current file |
| 598 | |[I| [I list all lines found in current and |
| 599 | included files that contain the word under |
| 600 | the cursor, start searching at beginning of |
| 601 | current file |
| 602 | |[P| [P 2 same as "[p" |
| 603 | |[[| [[ 1 cursor N sections backward |
| 604 | |[]| [] 1 cursor N SECTIONS backward |
| 605 | |[c| [c 1 cursor N times backwards to start of change |
| 606 | |[d| [d show first #define found in current and |
| 607 | included files matching the word under the |
| 608 | cursor, start searching at beginning of |
| 609 | current file |
| 610 | |[f| [f same as "gf" |
| 611 | |[i| [i show first line found in current and |
| 612 | included files that contains the word under |
| 613 | the cursor, start searching at beginning of |
| 614 | current file |
| 615 | |[p| [p 2 like "P", but adjust indent to current line |
| 616 | |[m| [m 1 cursor N times back to start of member |
| 617 | function |
| 618 | |[z| [z 1 move to start of open fold |
| 619 | |[{| [{ 1 cursor N times back to unmatched '{' |
| 620 | |[<MiddleMouse> [<MiddleMouse> 2 same as "[p" |
| 621 | |
| 622 | |]_CTRL-D| ] CTRL-D jump to first #define found in current and |
| 623 | included files matching the word under the |
| 624 | cursor, start searching at cursor position |
| 625 | |]_CTRL-I| ] CTRL-I jump to first line in current and included |
| 626 | files that contains the word under the |
| 627 | cursor, start searching at cursor position |
| 628 | |]#| ]# 1 cursor to N next unmatched #endif or #else |
| 629 | |]'| ]' 1 cursor to next lowercase mark, on first |
| 630 | non-blank |
| 631 | |])| ]) 1 cursor N times forward to unmatched ')' |
| 632 | |]star| ]* 1 same as "]/" |
| 633 | |]`| ]` 1 cursor to next lowercase mark |
| 634 | |]/| ]/ 1 cursor to N next end of a C comment |
| 635 | |]D| ]D list all #defines found in current and |
| 636 | included files matching the word under the |
| 637 | cursor, start searching at cursor position |
| 638 | |]I| ]I list all lines found in current and |
| 639 | included files that contain the word under |
| 640 | the cursor, start searching at cursor |
| 641 | position |
| 642 | |]P| ]P 2 same as "[p" |
| 643 | |][| ][ 1 cursor N SECTIONS forward |
| 644 | |]]| ]] 1 cursor N sections forward |
| 645 | |]c| ]c 1 cursor N times forward to start of change |
| 646 | |]d| ]d show first #define found in current and |
| 647 | included files matching the word under the |
| 648 | cursor, start searching at cursor position |
| 649 | |]f| ]f same as "gf" |
| 650 | |]i| ]i show first line found in current and |
| 651 | included files that contains the word under |
| 652 | the cursor, start searching at cursor |
| 653 | position |
| 654 | |]p| ]p 2 like "p", but adjust indent to current line |
| 655 | |]m| ]m 1 cursor N times forward to end of member |
| 656 | function |
| 657 | |]z| ]z 1 move to end of open fold |
| 658 | |]}| ]} 1 cursor N times forward to unmatched '}' |
| 659 | |]<MiddleMouse> ]<MiddleMouse> 2 same as "]p" |
| 660 | |
| 661 | ============================================================================== |
| 662 | 2.4 Commands starting with 'g' *g* |
| 663 | |
| 664 | tag char note action in Normal mode ~ |
| 665 | ------------------------------------------------------------------------------ |
| 666 | |g_CTRL-A| g CTRL-A only when compiled with MEM_PROFILE |
| 667 | defined: dump a memory profile |
| 668 | |g_CTRL-G| g CTRL-G show information about current cursor |
| 669 | position |
| 670 | |g_CTRL-H| g CTRL-H start Select block mode |
| 671 | |g_CTRL-]| g CTRL-] |:tjump| to the tag under the cursor |
| 672 | |g#| g# 1 like "#", but without using "\<" and "\>" |
| 673 | |g$| g$ 1 when 'wrap' off go to rightmost character of |
| 674 | the current line that is on the screen; |
| 675 | when 'wrap' on go to the rightmost character |
| 676 | of the current screen line |
| 677 | |g&| g& 2 repeat last ":s" on all lines |
| 678 | |g'| g'{mark} 1 like |'| but without changing the jumplist |
| 679 | |g`| g`{mark} 1 like |`| but without changing the jumplist |
| 680 | |gstar| g* 1 like "*", but without using "\<" and "\>" |
| 681 | |g0| g0 1 when 'wrap' off go to leftmost character of |
| 682 | the current line that is on the screen; |
| 683 | when 'wrap' on go to the leftmost character |
| 684 | of the current screen line |
| 685 | |g8| g8 print hex value of bytes used in UTF-8 |
| 686 | character under the cursor |
| 687 | |g?| g? 2 Rot13 encoding operator |
| 688 | |g?g?| g?? 2 Rot13 encode current line |
| 689 | |g?g?| g?g? 2 Rot13 encode current line |
| 690 | |gD| gD 1 go to definition of word under the cursor |
| 691 | in current file |
| 692 | |gE| gE 1 go backwards to the end of the previous |
| 693 | WORD |
| 694 | |gH| gH start Select line mode |
| 695 | |gI| gI 2 like "I", but always start in column 1 |
| 696 | |gJ| gJ 2 join lines without inserting space |
| 697 | |gP| ["x]gP 2 put the text [from register x] before the |
| 698 | cursor N times, leave the cursor after it |
| 699 | |gR| gR 2 enter Virtual Replace mode |
| 700 | |gU| gU{motion} 2 make Nmove text uppercase |
| 701 | |gV| gV don't reselect the previous Visual area |
| 702 | when executing a mapping or menu in Select |
| 703 | mode |
| 704 | |g]| g] :tselect on the tag under the cursor |
| 705 | |g^| g^ 1 when 'wrap' off go to leftmost non-white |
| 706 | character of the current line that is on |
| 707 | the screen; when 'wrap' on go to the |
| 708 | leftmost non-white character of the current |
| 709 | screen line |
| 710 | |ga| ga print ascii value of character under the |
| 711 | cursor |
| 712 | |gd| gd 1 go to definition of word under the cursor |
| 713 | in current function |
| 714 | |ge| ge 1 go backwards to the end of the previous |
| 715 | word |
| 716 | |gf| gf start editing the file whose name is under |
| 717 | the cursor |
| 718 | |gg| gg 1 cursor to line N, default first line |
| 719 | |gh| gh start Select mode |
| 720 | |gi| gi 2 like "i", but first move to the |'^| mark |
| 721 | |gj| gj 1 like "j", but when 'wrap' on go N screen |
| 722 | lines down |
| 723 | |gk| gk 1 like "k", but when 'wrap' on go N screen |
| 724 | lines up |
| 725 | |gm| gm 1 go to character at middle of the screenline |
| 726 | |go| go 1 cursor to byte N in the buffer |
| 727 | |gp| ["x]gp 2 put the text [from register x] after the |
| 728 | cursor N times, leave the cursor after it |
| 729 | |gq| gq{motion} 2 format Nmove text |
| 730 | |gr| gr{char} 2 virtual replace N chars with {char} |
| 731 | |gs| gs go to sleep for N seconds (default 1) |
| 732 | |gu| gu{motion} 2 make Nmove text lowercase |
| 733 | |gv| gv reselect the previous Visual area |
| 734 | |gw| gw{motion} 2 format Nmove text and keep cursor |
| 735 | |g~| g~{motion} 2 swap case for Nmove text |
| 736 | |g<Down>| g<Down> 1 same as "gj" |
| 737 | |g<End>| g<End> 1 same as "g$" |
| 738 | |g<Home>| g<Home> 1 same as "g0" |
| 739 | |g<LeftMouse>| g<LeftMouse> same as <C-LeftMouse> |
| 740 | g<MiddleMouse> same as <C-MiddleMouse> |
| 741 | |g<RightMouse>| g<RightMouse> same as <C-RightMouse> |
| 742 | |g<Up>| g<Up> 1 same as "gk" |
| 743 | |
| 744 | ============================================================================== |
| 745 | 2.5 Commands starting with 'z' *z* |
| 746 | |
| 747 | tag char note action in Normal mode ~ |
| 748 | ------------------------------------------------------------------------------ |
| 749 | |z<CR>| z<CR> redraw, cursor line to top of window, |
| 750 | cursor on first non-blank |
| 751 | |zN<CR>| z{height}<CR> redraw, make window {height} lines high |
| 752 | |z+| z+ cursor on line N (default line below |
| 753 | window), otherwise like "z<CR>" |
| 754 | |z-| z- redraw, cursor line at bottom of window, |
| 755 | cursor on first non-blank |
| 756 | |z.| z. redraw, cursor line to center of window, |
| 757 | cursor on first non-blank |
| 758 | |zA| zA open a closed fold or close an open fold |
| 759 | recursively |
| 760 | |zC| zC close folds recursively |
| 761 | |zD| zD delete folds recursively |
| 762 | |zE| zE eliminate all folds |
| 763 | |zF| zF create a fold for N lines |
| 764 | |zM| zM set 'foldlevel' to zero |
| 765 | |zN| zN set 'foldenable' |
| 766 | |zO| zO open folds recursively |
| 767 | |zR| zR set 'foldlevel' to the deepest fold |
| 768 | |zX| zX re-apply 'foldlevel' |
| 769 | |z^| z^ cursor on line N (default line above |
| 770 | window), otherwise like "z-" |
| 771 | |za| za open a closed fold, close an open fold |
| 772 | |zb| zb redraw, cursor line at bottom of window |
| 773 | |zc| zc close a fold |
| 774 | |zd| zd delete a fold |
| 775 | |ze| ze when 'wrap' off scroll horizontally to |
| 776 | position the cursor at the end (right side) |
| 777 | of the screen |
| 778 | |zf| zf{motion} create a fold for Nmove text |
| 779 | |zh| zh when 'wrap' off scroll screen N characters |
| 780 | to the right |
| 781 | |zi| zi toggle 'foldenable' |
| 782 | |zj| zj 1 move to the start of the next fold |
| 783 | |zk| zk 1 move to the end of the previous fold |
| 784 | |zl| zl when 'wrap' off scroll screen N characters |
| 785 | to the left |
| 786 | |zm| zm subtract one from 'foldlevel' |
| 787 | |zn| zn reset 'foldenable' |
| 788 | |zo| zo open fold |
| 789 | |zr| zr add one to 'foldlevel' |
| 790 | |zs| zs when 'wrap' off scroll horizontally to |
| 791 | position the cursor at the start (left |
| 792 | side) of the screen |
| 793 | |zt| zt redraw, cursor line at top of window |
| 794 | |zv| zv open enough folds to view the cursor line |
| 795 | |zx| zx re-apply 'foldlevel' and do "zv" |
| 796 | |zz| zz redraw, cursor line at center of window |
| 797 | |z<Left>| z<Left> same as "zh" |
| 798 | |z<Right>| z<Right> same as "zl" |
| 799 | |
| 800 | ============================================================================== |
| 801 | 3. Visual mode *visual-index* |
| 802 | |
| 803 | Most commands in Visual mode are the same as in Normal mode. The ones listed |
| 804 | here are those that are different. |
| 805 | |
| 806 | tag command note action in Visual mode ~ |
| 807 | ------------------------------------------------------------------------------ |
| 808 | |v_CTRL-\_CTRL-N| CTRL-\ CTRL-N stop Visual mode |
| 809 | |v_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode' |
Bram Moolenaar | 8169525 | 2004-12-29 20:58:21 +0000 | [diff] [blame] | 810 | |v_CTRL-C| CTRL-C stop Visual mode |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 811 | |v_CTRL-G| CTRL-G toggle between Visual mode and Select mode |
| 812 | |v_<BS>| <BS> 2 Select mode: delete highlighted area |
| 813 | |v_CTRL-H| CTRL-H 2 same as <BS> |
| 814 | |v_CTRL-O| CTRL-O switch from Select to Visual mode for one |
| 815 | command |
| 816 | |v_CTRL-V| CTRL-V make Visual mode blockwise or stop Visual |
| 817 | mode |
Bram Moolenaar | 8169525 | 2004-12-29 20:58:21 +0000 | [diff] [blame] | 818 | |v_<Esc>| <Esc> stop Visual mode |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 819 | |v_CTRL-]| CTRL-] jump to highlighted tag |
| 820 | |v_!| !{filter} 2 filter the highlighted lines through the |
| 821 | external command {filter} |
| 822 | |v_:| : start a command-line with the highlighted |
| 823 | lines as a range |
| 824 | |v_<| < 2 shift the highlighted lines one |
| 825 | 'shiftwidth' left |
| 826 | |v_=| = 2 filter the highlighted lines through the |
| 827 | external program given with the 'equalprg' |
| 828 | option |
| 829 | |v_>| > 2 shift the highlighted lines one |
| 830 | 'shiftwidth' right |
| 831 | |v_b_A| A 2 block mode: append same text in all lines, |
| 832 | after the highlighted area |
| 833 | |v_C| C 2 delete the highlighted lines and start |
| 834 | insert |
| 835 | |v_D| D 2 delete the highlighted lines |
| 836 | |v_b_I| I 2 block mode: insert same text in all lines, |
| 837 | before the highlighted area |
| 838 | |v_J| J 2 join the highlighted lines |
| 839 | |v_K| K run 'keywordprg' on the highlighted area |
| 840 | |v_O| O Move horizontally to other corner of area. |
| 841 | Q does not start Ex mode |
| 842 | |v_R| R 2 delete the highlighted lines and start |
| 843 | insert |
| 844 | |v_S| S 2 delete the highlighted lines and start |
| 845 | insert |
| 846 | |v_U| U 2 make highlighted area uppercase |
| 847 | |v_V| V make Visual mode linewise or stop Visual |
| 848 | mode |
| 849 | |v_X| X 2 delete the highlighted lines |
| 850 | |v_Y| Y yank the highlighted lines |
| 851 | |v_a(| a( same as ab |
| 852 | |v_a)| a) same as ab |
| 853 | |v_a<| a< extend highlighted area with a <> block |
| 854 | |v_a>| a> same as a< |
| 855 | |v_aB| aB extend highlighted area with a {} block |
| 856 | |v_aW| aW extend highlighted area with "a WORD" |
| 857 | |v_a[| a[ extend highlighted area with a [] block |
| 858 | |v_a]| a] same as a[ |
| 859 | |v_ab| ab extend highlighted area with a () block |
| 860 | |v_ap| ap extend highlighted area with a paragraph |
| 861 | |v_as| as extend highlighted area with a sentence |
| 862 | |v_aw| aw extend highlighted area with "a word" |
| 863 | |v_a{| a{ same as aB |
| 864 | |v_a}| a} same as aB |
| 865 | |v_c| c 2 delete highlighted area and start insert |
| 866 | |v_d| d 2 delete highlighted area |
| 867 | |v_gJ| gJ 2 join the highlighted lines without |
| 868 | inserting spaces |
| 869 | |v_gq| gq 2 format the highlighted lines |
| 870 | |v_gv| gv exchange current and previous highlighted |
| 871 | area |
| 872 | |v_i(| i( same as ib |
| 873 | |v_i)| i) same as ib |
| 874 | |v_i<| i< extend highlighted area with inner <> block |
| 875 | |v_i>| i> same as i< |
| 876 | |v_iB| iB extend highlighted area with inner {} block |
| 877 | |v_iW| iW extend highlighted area with "inner WORD" |
| 878 | |v_i[| i[ extend highlighted area with inner [] block |
| 879 | |v_i]| i] same as i[ |
| 880 | |v_ib| ib extend highlighted area with inner () block |
| 881 | |v_ip| ip extend highlighted area with inner paragraph |
| 882 | |v_is| is extend highlighted area with inner sentence |
| 883 | |v_iw| iw extend highlighted area with "inner word" |
| 884 | |v_i{| i{ same as iB |
| 885 | |v_i}| i} same as iB |
| 886 | |v_o| o move cursor to other corner of area |
| 887 | |v_r| r 2 delete highlighted area and start insert |
| 888 | |v_s| s 2 delete highlighted area and start insert |
| 889 | |v_u| u 2 make highlighted area lowercase |
| 890 | |v_v| v make Visual mode characterwise or stop |
| 891 | Visual mode |
| 892 | |v_x| x 2 delete the highlighted area |
| 893 | |v_y| y yank the highlighted area |
| 894 | |v_~| ~ 2 swap case for the highlighted area |
| 895 | |
| 896 | ============================================================================== |
| 897 | 4. Command-line editing *ex-edit-index* |
| 898 | |
| 899 | Get to the command-line with the ':', '!', '/' or '?' commands. |
| 900 | Normal characters are inserted at the current cursor position. |
| 901 | "Completion" below refers to context-sensitive completion. It will complete |
| 902 | file names, tags, commands etc. as appropriate. |
| 903 | |
| 904 | CTRL-@ not used |
| 905 | |c_CTRL-A| CTRL-A do completion on the pattern in front of the |
| 906 | cursor and insert all matches |
| 907 | |c_CTRL-B| CTRL-B cursor to begin of command-line |
| 908 | |c_CTRL-C| CTRL-C same as <ESC> |
| 909 | |c_CTRL-D| CTRL-D list completions that match the pattern in |
| 910 | front of the cursor |
| 911 | |c_CTRL-E| CTRL-E cursor to end of command-line |
| 912 | |'cedit'| CTRL-F default value for 'cedit': opens the |
| 913 | command-line window; otherwise not used |
| 914 | CTRL-G not used |
| 915 | |c_<BS>| <BS> delete the character in front of the cursor |
| 916 | |c_digraph| {char1} <BS> {char2} |
| 917 | enter digraph when 'digraph' is on |
| 918 | |c_CTRL-H| CTRL-H same as <BS> |
| 919 | |c_<Tab>| <Tab> if 'wildchar' is <Tab>: Do completion on |
| 920 | the pattern in front of the cursor |
| 921 | |c_<S-Tab>| <S-Tab> same as CTRL-P |
| 922 | |c_wildchar| 'wildchar' Do completion on the pattern in front of the |
| 923 | cursor (default: <Tab>) |
| 924 | |c_CTRL-I| CTRL-I same as <Tab> |
| 925 | |c_<NL>| <NL> same as <CR> |
| 926 | |c_CTRL-J| CTRL-J same as <CR> |
| 927 | |c_CTRL-K| CTRL-K {char1} {char2} |
| 928 | enter digraph |
| 929 | |c_CTRL-L| CTRL-L do completion on the pattern in front of the |
| 930 | cursor and insert the longest common part |
| 931 | |c_<CR>| <CR> execute entered command |
| 932 | |c_<CR>| CTRL-M same as <CR> |
| 933 | |c_CTRL-N| CTRL-N after using 'wildchar' with multiple matches: |
| 934 | go to next match, otherwise: same as <Down> |
| 935 | CTRL-O not used |
| 936 | |c_CTRL-P| CTRL-P after using 'wildchar' with multiple matches: |
| 937 | go to previous match, otherwise: same as <Up> |
| 938 | |c_CTRL-Q| CTRL-Q same as CTRL-V, unless it's used for terminal |
| 939 | control flow |
| 940 | |c_CTRL-R| CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A} |
| 941 | insert the contents of a register or object |
| 942 | under the cursor as if typed |
| 943 | |c_CTRL-R_CTRL-R| CTRL-R CTRL-R {0-9a-z"%#*:= CTRL-F CTRL-P CTRL-W CTRL-A} |
| 944 | insert the contents of a register or object |
| 945 | under the cursor literally |
| 946 | CTRL-S (used for terminal control flow) |
| 947 | CTRL-T not used |
| 948 | |c_CTRL-U| CTRL-U remove all characters |
| 949 | |c_CTRL-V| CTRL-V insert next non-digit literally, insert three |
| 950 | digit decimal number as a single byte. |
| 951 | |c_CTRL-W| CTRL-W delete the word in front of the cursor |
| 952 | CTRL-X not used (reserved for completion) |
| 953 | CTRL-Y copy (yank) modeless selection |
| 954 | CTRL-Z not used (reserved for suspend) |
| 955 | |c_<Esc>| <Esc> abandon command-line without executing it |
| 956 | |c_<Esc>| CTRL-[ same as <Esc> |
| 957 | |c_CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode, abandon command-line |
| 958 | |c_CTRL-\_CTRL-G| CTRL-\ CTRL-G go to mode specified with 'insertmode', |
| 959 | abandon command-line |
| 960 | CTRL-\ a - d reserved for extensions |
| 961 | |c_CTRL-\_e| CTRL-\ e {expr} replace the command line with the result of |
| 962 | {expr} |
| 963 | CTRL-\ f - z reserved for extensions |
| 964 | CTRL-\ others not used |
| 965 | CTRL-] not used |
| 966 | |c_CTRL-^| CTRL-^ toggle use of |:lmap| mappings |
| 967 | |c_CTRL-_| CTRL-_ when 'allowrevins' set: change language |
| 968 | (Hebrew, Farsi) |
| 969 | |c_<Del>| <Del> delete the character under the cursor |
| 970 | |
| 971 | |c_<Left>| <Left> cursor left |
| 972 | |c_<S-Left>| <S-Left> cursor one word left |
| 973 | |c_<C-Left>| <C-Left> cursor one word left |
| 974 | |c_<Right>| <Right> cursor right |
| 975 | |c_<S-Right>| <S-Right> cursor one word right |
| 976 | |c_<C-Right>| <C-Right> cursor one word right |
| 977 | |c_<Up>| <Up> recall previous command-line from history that |
| 978 | matches pattern in front of the cursor |
| 979 | |c_<S-Up>| <S-Up> recall previous command-line from history |
| 980 | |c_<Down>| <Down> recall next command-line from history that |
| 981 | matches pattern in front of the cursor |
| 982 | |c_<S-Down>| <S-Down> recall next command-line from history |
| 983 | |c_<Home>| <Home> cursor to start of command-line |
| 984 | |c_<End>| <End> cursor to end of command-line |
| 985 | |c_<PageDown>| <PageDown> same as <S-Down> |
| 986 | |c_<PageUp>| <PageUp> same as <S-Up> |
| 987 | |c_<Insert>| <Insert> toggle insert/overstrike mode |
| 988 | |c_<LeftMouse>| <LeftMouse> cursor at mouse click |
| 989 | |
| 990 | You found it, Arthur! *holy-grail* |
| 991 | |
| 992 | ============================================================================== |
| 993 | 5. EX commands *ex-cmd-index* *:index* |
| 994 | |
| 995 | This is a brief but complete listing of all the ":" commands, without |
| 996 | mentioning any arguments. The optional part of the command name is inside []. |
| 997 | The commands are sorted on the non-optional part of their name. |
| 998 | |
| 999 | |:!| :! filter lines or execute an external command |
| 1000 | |:!!| :!! repeat last ":!" command |
| 1001 | |:#| :# same as ":number" |
| 1002 | |:&| :& repeat last ":substitute" |
| 1003 | |:star| :* execute contents of a register |
| 1004 | |:<| :< shift lines one 'shiftwidth' left |
| 1005 | |:=| := print the cursor line number |
| 1006 | |:>| :> shift lines one 'shiftwidth' right |
| 1007 | |:@| :@ execute contents of a register |
| 1008 | |:@@| :@@ repeat the previous ":@" |
| 1009 | |:Next| :N[ext] go to previous file in the argument list |
| 1010 | |:Print| :P[rint] print lines |
| 1011 | |:X| :X ask for encryption key |
| 1012 | |:append| :a[ppend] append text |
| 1013 | |:abbreviate| :ab[breviate] enter abbreviation |
| 1014 | |:abclear| :abc[lear] remove all abbreviations |
| 1015 | |:aboveleft| :abo[veleft] make split window appear left or above |
| 1016 | |:all| :al[l] open a window for each file in the argument |
| 1017 | list |
| 1018 | |:amenu| :am[enu] enter new menu item for all modes |
| 1019 | |:anoremenu| :an[oremenu] enter a new menu for all modes that will not |
| 1020 | be remapped |
| 1021 | |:args| :ar[gs] print the argument list |
| 1022 | |:argadd| :arga[dd] add items to the argument list |
| 1023 | |:argdelete| :argd[elete] delete items from the argument list |
| 1024 | |:argedit| :arge[dit] add item to the argument list and edit it |
| 1025 | |:argdo| :argdo do a command on all items in the argument list |
| 1026 | |:argglobal| :argg[lobal] define the global argument list |
| 1027 | |:arglocal| :argl[ocal] define a local argument list |
| 1028 | |:argument| :argu[ment] go to specific file in the argument list |
| 1029 | |:ascii| :as[cii] print ascii value of character under the cursor |
| 1030 | |:autocmd| :au[tocmd] enter or show autocommands |
| 1031 | |:augroup| :aug[roup] select the autocommand group to use |
| 1032 | |:aunmenu| :aun[menu] remove menu for all modes |
| 1033 | |:buffer| :b[uffer] go to specific buffer in the buffer list |
| 1034 | |:bNext| :bN[ext] go to previous buffer in the buffer list |
| 1035 | |:ball| :ba[ll] open a window for each buffer in the buffer list |
| 1036 | |:badd| :bad[d] add buffer to the buffer list |
| 1037 | |:bdelete| :bd[elete] remove a buffer from the buffer list |
| 1038 | |:behave| :be[have] set mouse and selection behavior |
| 1039 | |:belowright| :bel[owright] make split window appear right or below |
| 1040 | |:bfirst| :bf[irst] go to first buffer in the buffer list |
| 1041 | |:blast| :bl[ast] go to last buffer in the buffer list |
| 1042 | |:bmodified| :bm[odified] go to next buffer in the buffer list that has |
| 1043 | been modified |
| 1044 | |:bnext| :bn[ext] go to next buffer in the buffer list |
| 1045 | |:botright| :bo[tright] make split window appear at bottom or far right |
| 1046 | |:bprevious| :bp[revious] go to previous buffer in the buffer list |
| 1047 | |:brewind| :br[ewind] go to first buffer in the buffer list |
| 1048 | |:break| :brea[k] break out of while loop |
| 1049 | |:breakadd| :breaka[dd] add a debugger breakpoint |
| 1050 | |:breakdel| :breakd[el] delete a debugger breakpoint |
| 1051 | |:breaklist| :breakl[ist] list debugger breakpoints |
| 1052 | |:browse| :bro[wse] use file selection dialog |
| 1053 | |:bufdo| :bufdo execute command in each listed buffer |
| 1054 | |:buffers| :buffers list all files in the buffer list |
| 1055 | |:bunload| :bun[load] unload a specific buffer |
| 1056 | |:bwipeout| :bw[ipeout] really delete a buffer |
| 1057 | |:change| :c[hange] replace a line or series of lines |
| 1058 | |:cNext| :cN[ext] go to previous error |
| 1059 | |:cNfile| :cNf[ile] go to last error in previous file |
| 1060 | |:cabbrev| :ca[bbrev] like ":abbreviate" but for Command-line mode |
| 1061 | |:cabclear| :cabc[lear] clear all abbreviations for Command-line mode |
| 1062 | |:call| :cal[l] call a function |
| 1063 | |:catch| :cat[ch] part of a :try command |
Bram Moolenaar | 86b6835 | 2004-12-27 21:59:20 +0000 | [diff] [blame] | 1064 | |:cbuffer| :cb[uffer] parse error messages and jump to first error |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1065 | |:cc| :cc go to specific error |
| 1066 | |:cclose| :ccl[ose] close quickfix window |
| 1067 | |:cd| :cd change directory |
| 1068 | |:center| :ce[nter] format lines at the center |
| 1069 | |:cfile| :cf[ile] read file with error messages and jump to first |
| 1070 | |:cfirst| :cfir[st] go to the specified error, default first one |
| 1071 | |:cgetfile| :cg[etfile] read file with error messages |
| 1072 | |:changes| :cha[nges] print the change list |
| 1073 | |:chdir| :chd[ir] change directory |
| 1074 | |:checkpath| :che[ckpath] list included files |
| 1075 | |:checktime| :checkt[ime] check timestamp of loaded buffers |
| 1076 | |:clist| :cl[ist] list all errors |
| 1077 | |:clast| :cla[st] go to the specified error, default last one |
| 1078 | |:close| :clo[se] close current window |
| 1079 | |:cmap| :cm[ap] like ":map" but for Command-line mode |
| 1080 | |:cmapclear| :cmapc[lear] clear all mappings for Command-line mode |
| 1081 | |:cmenu| :cme[nu] add menu for Command-line mode |
| 1082 | |:cnext| :cn[ext] go to next error |
| 1083 | |:cnewer| :cnew[er] go to newer error list |
| 1084 | |:cnfile| :cnf[ile] go to first error in next file |
| 1085 | |:cnoremap| :cno[remap] like ":noremap" but for Command-line mode |
| 1086 | |:cnoreabbrev| :cnorea[bbrev] like ":noreabbrev" but for Command-line mode |
| 1087 | |:cnoremenu| :cnoreme[nu] like ":noremenu" but for Command-line mode |
| 1088 | |:copy| :co[py] copy lines |
| 1089 | |:colder| :col[der] go to older error list |
| 1090 | |:colorscheme| :colo[rscheme] load a specific color scheme |
| 1091 | |:command| :com[mand] create user-defined command |
| 1092 | |:comclear| :comc[lear] clear all user-defined commands |
| 1093 | |:compiler| :comp[iler] do settings for a specific compiler |
| 1094 | |:continue| :con[tinue] go back to :while |
| 1095 | |:confirm| :conf[irm] prompt user when confirmation required |
| 1096 | |:copen| :cope[n] open quickfix window |
| 1097 | |:cprevious| :cp[revious] go to previous error |
| 1098 | |:cpfile| :cpf[ile] go to last error in previous file |
| 1099 | |:cquit| :cq[uit] quit Vim with an error code |
| 1100 | |:crewind| :cr[ewind] go to the specified error, default first one |
| 1101 | |:cscope| :cs[cope] execute cscope command |
| 1102 | |:cstag| :cst[ag] use cscope to jump to a tag |
| 1103 | |:cunmap| :cu[nmap] like ":unmap" but for Command-line mode |
| 1104 | |:cunabbrev| :cuna[bbrev] like ":unabbrev" but for Command-line mode |
| 1105 | |:cunmenu| :cunme[nu] remove menu for Command-line mode |
| 1106 | |:cwindow| :cw[indow] open or close quickfix window |
| 1107 | |:delete| :d[elete] delete lines |
Bram Moolenaar | c0197e2 | 2004-09-13 20:26:32 +0000 | [diff] [blame] | 1108 | |:delmarks| :delm[arks] delete marks |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1109 | |:debug| :deb[ug] run a command in debugging mode |
| 1110 | |:debuggreedy| :debugg[reedy] read debug mode commands from normal input |
| 1111 | |:delcommand| :delc[ommand] delete user-defined command |
| 1112 | |:delfunction| :delf[unction] delete a user function |
| 1113 | |:diffupdate| :dif[fupdate] update 'diff' buffers |
| 1114 | |:diffget| :diffg[et] remove differences in current buffer |
Bram Moolenaar | 2df6dcc | 2004-07-12 15:53:54 +0000 | [diff] [blame] | 1115 | |:diffoff| :diffo[ff] switch off diff mode |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1116 | |:diffpatch| :diffp[atch] apply a patch and show differences |
| 1117 | |:diffput| :diffpu[t] remove differences in other buffer |
| 1118 | |:diffsplit| :diffs[plit] show differences with another file |
| 1119 | |:diffthis| :diffthis make current window a diff window |
| 1120 | |:digraphs| :dig[raphs] show or enter digraphs |
| 1121 | |:display| :di[splay] display registers |
| 1122 | |:djump| :dj[ump] jump to #define |
| 1123 | |:dlist| :dl[ist] list #defines |
| 1124 | |:doautocmd| :do[autocmd] apply autocommands to current buffer |
| 1125 | |:doautoall| :doautoa[ll] apply autocommands for all loaded buffers |
| 1126 | |:drop| :dr[op] jump to window editing file or edit file in |
| 1127 | current window |
| 1128 | |:dsearch| :ds[earch] list one #define |
| 1129 | |:dsplit| :dsp[lit] split window and jump to #define |
| 1130 | |:edit| :e[dit] edit a file |
| 1131 | |:echo| :ec[ho] echoes the result of expressions |
| 1132 | |:echoerr| :echoe[rr] like :echo, show like an error and use history |
| 1133 | |:echohl| :echoh[l] set highlighting for echo commands |
| 1134 | |:echomsg| :echom[sg] same as :echo, put message in history |
| 1135 | |:echon| :echon same as :echo, but without <EOL> |
| 1136 | |:else| :el[se] part of an :if command |
| 1137 | |:elseif| :elsei[f] part of an :if command |
| 1138 | |:emenu| :em[enu] execute a menu by name |
| 1139 | |:endif| :en[dif] end previous :if |
| 1140 | |:endfunction| :endf[unction] end of a user function |
| 1141 | |:endtry| :endt[ry] end previous :try |
| 1142 | |:endwhile| :endw[hile] end previous :while |
| 1143 | |:enew| :ene[w] edit a new, unnamed buffer |
| 1144 | |:ex| :ex same as ":edit" |
| 1145 | |:execute| :exe[cute] execute result of expressions |
| 1146 | |:exit| :exi[t] same as ":xit" |
Bram Moolenaar | b5bf5b8 | 2004-12-24 14:35:23 +0000 | [diff] [blame] | 1147 | |:exusage| :exu[sage] overview of Ex commands |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1148 | |:file| :f[ile] show or set the current file name |
| 1149 | |:files| :files list all files in the buffer list |
| 1150 | |:filetype| :filet[ype] switch file type detection on/off |
| 1151 | |:find| :fin[d] find file in 'path' and edit it |
| 1152 | |:finally| :fina[lly] part of a :try command |
| 1153 | |:finish| :fini[sh] quit sourcing a Vim script |
| 1154 | |:first| :fir[st] go to the first file in the argument list |
| 1155 | |:fixdel| :fix[del] set key code of <Del> |
| 1156 | |:fold| :fo[ld] create a fold |
| 1157 | |:foldclose| :foldc[lose] close folds |
| 1158 | |:folddoopen| :foldd[oopen] execute command on lines not in a closed fold |
| 1159 | |:folddoclosed| :folddoc[losed] execute command on lines in a closed fold |
| 1160 | |:foldopen| :foldo[pen] open folds |
| 1161 | |:function| :fu[nction] define a user function |
| 1162 | |:global| :g[lobal] execute commands for matching lines |
| 1163 | |:goto| :go[to] go to byte in the buffer |
| 1164 | |:grep| :gr[ep] run 'grepprg' and jump to first match |
| 1165 | |:grepadd| :grepa[dd] like grep, but append to current list |
| 1166 | |:gui| :gu[i] start the GUI |
| 1167 | |:gvim| :gv[im] start the GUI |
| 1168 | |:hardcopy| :ha[rdcopy] send text to the printer |
| 1169 | |:help| :h[elp] open a help window |
| 1170 | |:helpfind| :helpf[ind] dialog to open a help window |
| 1171 | |:helpgrep| :helpg[rep] like ":grep" but searches help files |
| 1172 | |:helptags| :helpt[ags] generate help tags for a directory |
| 1173 | |:highlight| :hi[ghlight] specify highlighting methods |
| 1174 | |:hide| :hid[e] hide current buffer for a command |
| 1175 | |:history| :his[tory] print a history list |
| 1176 | |:insert| :i[nsert] insert text |
| 1177 | |:iabbrev| :ia[bbrev] like ":abbrev" but for Insert mode |
| 1178 | |:iabclear| :iabc[lear] like ":abclear" but for Insert mode |
| 1179 | |:if| :if execute commands when condition met |
| 1180 | |:ijump| :ij[ump] jump to definition of identifier |
| 1181 | |:ilist| :il[ist] list lines where identifier matches |
| 1182 | |:imap| :im[ap] like ":map" but for Insert mode |
| 1183 | |:imapclear| :imapc[lear] like ":mapclear" but for Insert mode |
| 1184 | |:imenu| :ime[nu] add menu for Insert mode |
| 1185 | |:inoremap| :ino[remap] like ":noremap" but for Insert mode |
| 1186 | |:inoreabbrev| :inorea[bbrev] like ":noreabbrev" but for Insert mode |
| 1187 | |:inoremenu| :inoreme[nu] like ":noremenu" but for Insert mode |
| 1188 | |:intro| :int[ro] print the introductory message |
| 1189 | |:isearch| :is[earch] list one line where identifier matches |
| 1190 | |:isplit| :isp[lit] split window and jump to definition of |
| 1191 | identifier |
| 1192 | |:iunmap| :iu[nmap] like ":unmap" but for Insert mode |
| 1193 | |:iunabbrev| :iuna[bbrev] like ":unabbrev" but for Insert mode |
| 1194 | |:iunmenu| :iunme[nu] remove menu for Insert mode |
| 1195 | |:join| :j[oin] join lines |
| 1196 | |:jumps| :ju[mps] print the jump list |
| 1197 | |:k| :k set a mark |
| 1198 | |:keepmarks| :kee[pmarks] following command keeps marks where they are |
| 1199 | |:keepjumps| :keepj[jumps] following command keeps jumplist and marks |
| 1200 | |:list| :l[ist] print lines |
| 1201 | |:last| :la[st] go to the last file in the argument list |
| 1202 | |:language| :lan[guage] set the language (locale) |
| 1203 | |:lcd| :lc[d] change directory locally |
| 1204 | |:lchdir| :lch[dir] change directory locally |
| 1205 | |:left| :le[ft] left align lines |
| 1206 | |:leftabove| :lefta[bove] make split window appear left or above |
| 1207 | |:let| :let assign a value to a variable or option |
| 1208 | |:lmap| :lm[ap] like ":map!" but includes Lang-Arg mode |
| 1209 | |:lmapclear| :lmapc[lear] like ":mapclear!" but includes Lang-Arg mode |
| 1210 | |:lnoremap| :ln[oremap] like ":noremap!" but includes Lang-Arg mode |
| 1211 | |:loadkeymap| :loadk[eymap] load the following keymaps until EOF |
| 1212 | |:loadview| :lo[adview] load view for current window from a file |
| 1213 | |:lockmarks| :loc[kmarks] following command keeps marks where they are |
Bram Moolenaar | 24c088a | 2005-02-02 22:55:47 +0000 | [diff] [blame] | 1214 | |:lockvar| :lockv[ar] lock variables |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1215 | |:ls| :ls list all buffers |
| 1216 | |:lunmap| :lu[nmap] like ":unmap!" but includes Lang-Arg mode |
| 1217 | |:move| :m[ove] move lines |
| 1218 | |:mark| :ma[rk] set a mark |
| 1219 | |:make| :mak[e] execute external command 'makeprg' and parse |
| 1220 | error messages |
| 1221 | |:map| :map show or enter a mapping |
| 1222 | |:mapclear| :mapc[lear] clear all mappings for Normal and Visual mode |
| 1223 | |:marks| :marks list all marks |
| 1224 | |:match| :mat[ch] define a match to highlight |
| 1225 | |:menu| :me[nu] enter a new menu item |
| 1226 | |:menutranslate| :menut[ranslate] add a menu translation item |
| 1227 | |:messages| :mes[sages] view previously displayed messages |
| 1228 | |:mkexrc| :mk[exrc] write current mappings and settings to a file |
| 1229 | |:mksession| :mks[ession] write session info to a file |
| 1230 | |:mkvimrc| :mkv[imrc] write current mappings and settings to a file |
| 1231 | |:mkview| :mkvie[w] write view of current window to a file |
| 1232 | |:mode| :mod[e] show or change the screen mode |
Bram Moolenaar | 8299df9 | 2004-07-10 09:47:34 +0000 | [diff] [blame] | 1233 | |:mzscheme| :mz[scheme] execute MzScheme command |
| 1234 | |:mzfile| :mzf[ile] execute MzScheme script file |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1235 | |:next| :n[ext] go to next file in the argument list |
| 1236 | |:new| :new create a new empty window |
| 1237 | |:nmap| :nm[ap] like ":map" but for Normal mode |
| 1238 | |:nmapclear| :nmapc[lear] clear all mappings for Normal mode |
| 1239 | |:nmenu| :nme[nu] add menu for Normal mode |
| 1240 | |:nnoremap| :nn[oremap] like ":noremap" but for Normal mode |
| 1241 | |:nnoremenu| :nnoreme[nu] like ":noremenu" but for Normal mode |
| 1242 | |:noremap| :no[remap] enter a mapping that will not be remapped |
| 1243 | |:nohlsearch| :noh[lsearch] suspend 'hlsearch' highlighting |
| 1244 | |:noreabbrev| :norea[bbrev] enter an abbreviation that will not be |
| 1245 | remapped |
| 1246 | |:noremenu| :noreme[nu] enter a menu that will not be remapped |
| 1247 | |:normal| :norm[al] execute Normal mode commands |
| 1248 | |:number| :nu[mber] print lines with line number |
| 1249 | |:nunmap| :nun[map] like ":unmap" but for Normal mode |
| 1250 | |:nunmenu| :nunme[nu] remove menu for Normal mode |
| 1251 | |:open| :o[pen] start open mode (not implemented) |
| 1252 | |:omap| :om[ap] like ":map" but for Operator-pending mode |
| 1253 | |:omapclear| :omapc[lear] remove all mappings for Operator-pending mode |
| 1254 | |:omenu| :ome[nu] add menu for Operator-pending mode |
| 1255 | |:only| :on[ly] close all windows except current one |
| 1256 | |:onoremap| :ono[remap] like ":noremap" but for Operator-pending mode |
| 1257 | |:onoremenu| :onoreme[nu] like ":noremenu" but for Operator-pending mode |
| 1258 | |:options| :opt[ions] open the options-window |
| 1259 | |:ounmap| :ou[nmap] like ":unmap" but for Operator-pending mode |
| 1260 | |:ounmenu| :ounme[nu] remove menu for Operator-pending mode |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1261 | |:pclose| :pc[lose] close preview window |
| 1262 | |:pedit| :ped[it] edit file in the preview window |
| 1263 | |:perl| :pe[rl] execute Perl command |
Bram Moolenaar | 05159a0 | 2005-02-26 23:04:13 +0000 | [diff] [blame] | 1264 | |:print| :p[rint] print lines |
| 1265 | |:profile| :prof[ile] profiling functions and scripts |
| 1266 | |:promptfind| :pro[mtfind] open GUI dialog for searching |
| 1267 | |:promptrepl| :promtr[epl] open GUI dialog for search/replace |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1268 | |:perldo| :perld[o] execute Perl command for each line |
| 1269 | |:pop| :po[p] jump to older entry in tag stack |
| 1270 | |:popup| :pop[up] popup a menu by name |
| 1271 | |:ppop| :pp[op] ":pop" in preview window |
| 1272 | |:preserve| :pre[serve] write all text to swap file |
| 1273 | |:previous| :prev[ious] go to previous file in argument list |
| 1274 | |:promptfind| :pro[mptfind] Search dialog |
| 1275 | |:promptrepl| :promptr[epl] Search/Replace dialog |
| 1276 | |:psearch| :ps[earch] like ":ijump" but shows match in preview window |
| 1277 | |:ptag| :pt[ag] show tag in preview window |
| 1278 | |:ptNext| :ptN[ext] |:tNext| in preview window |
| 1279 | |:ptfirst| :ptf[irst] |:trewind| in preview window |
| 1280 | |:ptjump| :ptj[ump] |:tjump| and show tag in preview window |
| 1281 | |:ptlast| :ptl[ast] |:tlast| in preview window |
| 1282 | |:ptnext| :ptn[ext] |:tnext| in preview window |
| 1283 | |:ptprevious| :ptp[revious] |:tprevious| in preview window |
| 1284 | |:ptrewind| :ptr[ewind] |:trewind| in preview window |
| 1285 | |:ptselect| :pts[elect] |:tselect| and show tag in preview window |
| 1286 | |:put| :pu[t] insert contents of register in the text |
| 1287 | |:pwd| :pw[d] print current directory |
| 1288 | |:python| :py[thon] execute Python command |
| 1289 | |:pyfile| :pyf[ile] execute Python script file |
| 1290 | |:quit| :q[uit] quit current window (when one window quit Vim) |
| 1291 | |:quitall| :quita[ll] quit Vim |
| 1292 | |:qall| :qa[ll] quit Vim |
| 1293 | |:read| :r[ead] read file into the text |
| 1294 | |:recover| :rec[over] recover a file from a swap file |
| 1295 | |:redo| :red[o] redo one undone change |
| 1296 | |:redir| :redi[r] redirect messages to a file or register |
| 1297 | |:redraw| :redr[aw] force a redraw of the display |
| 1298 | |:redrawstatus| :redraws[tatus] force a redraw of the status line(s) |
| 1299 | |:registers| :reg[isters] display the contents of registers |
| 1300 | |:resize| :res[ize] change current window height |
| 1301 | |:retab| :ret[ab] change tab size |
| 1302 | |:return| :retu[rn] return from a user function |
| 1303 | |:rewind| :rew[ind] go to the first file in the argument list |
| 1304 | |:right| :ri[ght] right align text |
| 1305 | |:rightbelow| :rightb[elow] make split window appear right or below |
| 1306 | |:ruby| :rub[y] execute Ruby command |
| 1307 | |:rubydo| :rubyd[o] execute Ruby command for each line |
| 1308 | |:rubyfile| :rubyf[ile] execute Ruby script file |
| 1309 | |:runtime| :ru[ntime] source vim scripts in 'runtimepath' |
| 1310 | |:rviminfo| :rv[iminfo] read from viminfo file |
| 1311 | |:substitute| :s[ubstitute] find and replace text |
| 1312 | |:sNext| :sN[ext] split window and go to previous file in |
| 1313 | argument list |
| 1314 | |:sargument| :sa[rgument] split window and go to specific file in |
| 1315 | argument list |
| 1316 | |:sall| :sal[l] open a window for each file in argument list |
| 1317 | |:saveas| :sav[eas] save file under another name. |
| 1318 | |:sbuffer| :sb[uffer] split window and go to specific file in the |
| 1319 | buffer list |
| 1320 | |:sbNext| :sbN[ext] split window and go to previous file in the |
| 1321 | buffer list |
| 1322 | |:sball| :sba[ll] open a window for each file in the buffer list |
| 1323 | |:sbfirst| :sbf[irst] split window and go to first file in the |
| 1324 | buffer list |
| 1325 | |:sblast| :sbl[ast] split window and go to last file in buffer |
| 1326 | list |
| 1327 | |:sbmodified| :sbm[odified] split window and go to modified file in the |
| 1328 | buffer list |
| 1329 | |:sbnext| :sbn[ext] split window and go to next file in the buffer |
| 1330 | list |
| 1331 | |:sbprevious| :sbp[revious] split window and go to previous file in the |
| 1332 | buffer list |
| 1333 | |:sbrewind| :sbr[ewind] split window and go to first file in the |
| 1334 | buffer list |
| 1335 | |:scriptnames| :scrip[tnames] list names of all sourced Vim scripts |
| 1336 | |:scriptencoding| :scripte[ncoding] encoding used in sourced Vim script |
| 1337 | |:scscope| :scs[cope] split window and execute cscope command |
| 1338 | |:set| :se[t] show or set options |
| 1339 | |:setfiletype| :setf[iletype] set 'filetype', unless it was set already |
| 1340 | |:setglobal| :setg[lobal] show global values of options |
| 1341 | |:setlocal| :setl[ocal] show or set options locally |
| 1342 | |:sfind| :sf[ind] split current window and edit file in 'path' |
| 1343 | |:sfirst| :sfir[st] split window and go to first file in the |
| 1344 | argument list |
| 1345 | |:shell| :sh[ell] escape to a shell |
| 1346 | |:simalt| :sim[alt] Win32 GUI: simulate Windows ALT key |
| 1347 | |:sign| :sig[n] manipulate signs |
| 1348 | |:silent| :sil[ent] Run a command silently |
| 1349 | |:sleep| :sl[eep] do nothing for a few seconds |
| 1350 | |:slast| :sla[st] split window and go to last file in the |
| 1351 | argument list |
| 1352 | |:smagic| :sm[agic] :substitute with 'magic' |
| 1353 | |:snext| :sn[ext] split window and go to next file in the |
| 1354 | argument list |
| 1355 | |:sniff| :sni[ff] send request to sniff |
| 1356 | |:snomagic| :sno[magic] :substitute with 'nomagic' |
| 1357 | |:source| :so[urce] read Vim or Ex commands from a file |
| 1358 | |:split| :sp[lit] split current window |
| 1359 | |:sprevious| :spr[evious] split window and go to previous file in the |
| 1360 | argument list |
| 1361 | |:srewind| :sre[wind] split window and go to first file in the |
| 1362 | argument list |
| 1363 | |:stop| :st[op] suspend the editor or escape to a shell |
| 1364 | |:stag| :sta[g] split window and jump to a tag |
| 1365 | |:startinsert| :star[tinsert] start Insert mode |
Bram Moolenaar | 325b7a2 | 2004-07-05 15:58:32 +0000 | [diff] [blame] | 1366 | |:startreplace| :startr[eplace] start Replace mode |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1367 | |:stopinsert|| :stopi[nsert] stop Insert mode |
| 1368 | |:stjump| :stj[ump] do ":tjump" and split window |
| 1369 | |:stselect| :sts[elect] do ":tselect" and split window |
| 1370 | |:sunhide| :sun[hide] same as ":unhide" |
| 1371 | |:suspend| :sus[pend] same as ":stop" |
| 1372 | |:sview| :sv[iew] split window and edit file read-only |
| 1373 | |:swapname| :sw[apname] show the name of the current swap file |
| 1374 | |:syntax| :sy[ntax] syntax highlighting |
| 1375 | |:syncbind| :sync[bind] sync scroll binding |
| 1376 | |:t| :t same as ":copy" |
| 1377 | |:tNext| :tN[ext] jump to previous matching tag |
| 1378 | |:tag| :ta[g] jump to tag |
| 1379 | |:tags| :tags show the contents of the tag stack |
| 1380 | |:tcl| :tc[l] execute Tcl command |
| 1381 | |:tcldo| :tcld[o] execute Tcl command for each line |
| 1382 | |:tclfile| :tclf[ile] execute Tcl script file |
| 1383 | |:tearoff| :te[aroff] tear-off a menu |
| 1384 | |:tfirst| :tf[irst] jump to first matching tag |
| 1385 | |:throw| :th[row] throw an exception |
| 1386 | |:tjump| :tj[ump] like ":tselect", but jump directly when there |
| 1387 | is only one match |
| 1388 | |:tlast| :tl[ast] jump to last matching tag |
| 1389 | |:tmenu| :tm[enu] define menu tooltip |
| 1390 | |:tnext| :tn[ext] jump to next matching tag |
| 1391 | |:topleft| :to[pleft] make split window appear at top or far left |
| 1392 | |:tprevious| :tp[revious] jump to previous matching tag |
| 1393 | |:trewind| :tr[ewind] jump to first matching tag |
| 1394 | |:try| :try execute commands, abort on error or exception |
| 1395 | |:tselect| :ts[elect] list matching tags and select one |
| 1396 | |:tunmenu| :tu[nmenu] remove menu tooltip |
| 1397 | |:undo| :u[ndo] undo last change(s) |
| 1398 | |:unabbreviate| :una[bbreviate] remove abbreviation |
| 1399 | |:unhide| :unh[ide] open a window for each loaded file in the |
| 1400 | buffer list |
| 1401 | |:unlet| :unl[et] delete variable |
Bram Moolenaar | 24c088a | 2005-02-02 22:55:47 +0000 | [diff] [blame] | 1402 | |:unlockvar| :unlo[ckvar] unlock variables |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1403 | |:unmap| :unm[ap] remove mapping |
| 1404 | |:unmenu| :unme[nu] remove menu |
| 1405 | |:update| :up[date] write buffer if modified |
| 1406 | |:vglobal| :v[global] execute commands for not matching lines |
| 1407 | |:version| :ve[rsion] print version number and other info |
| 1408 | |:verbose| :verb[ose] execute command with 'verbose' set |
| 1409 | |:vertical| :vert[ical] make following command split vertically |
| 1410 | |:visual| :vi[sual] same as ":edit", but turns off "Ex" mode |
Bram Moolenaar | b5bf5b8 | 2004-12-24 14:35:23 +0000 | [diff] [blame] | 1411 | |:viusage| :viu[sage] overview of Normal mode commands |
Bram Moolenaar | 071d427 | 2004-06-13 20:20:40 +0000 | [diff] [blame] | 1412 | |:view| :vie[w] edit a file read-only |
| 1413 | |:vmap| :vm[ap] like ":map" but for Visual mode |
| 1414 | |:vmapclear| :vmapc[lear] remove all mappings for Visual mode |
| 1415 | |:vmenu| :vme[nu] add menu for Visual mode |
| 1416 | |:vnoremap| :vn[oremap] like ":noremap" but for Visual mode |
| 1417 | |:vnew| :vne[w] create a new empty window, vertically split |
| 1418 | |:vnoremenu| :vnoreme[nu] like ":noremenu" but for Visual mode |
| 1419 | |:vsplit| :vs[plit] split current window vertically |
| 1420 | |:vunmap| :vu[nmap] like ":unmap" but for Visual mode |
| 1421 | |:vunmenu| :vunme[nu] remove menu for Visual mode |
| 1422 | |:windo| :windo execute command in each window |
| 1423 | |:write| :w[rite] write to a file |
| 1424 | |:wNext| :wN[ext] write to a file and go to previous file in |
| 1425 | argument list |
| 1426 | |:wall| :wa[ll] write all (changed) buffers |
| 1427 | |:while| :wh[ile] execute loop for as long as condition met |
| 1428 | |:winsize| :wi[nsize] get or set window size (obsolete) |
| 1429 | |:wincmd| :winc[md] execute a Window (CTRL-W) command |
| 1430 | |:winpos| :winp[os] get or set window position |
| 1431 | |:wnext| :wn[ext] write to a file and go to next file in |
| 1432 | argument list |
| 1433 | |:wprevious| :wp[revious] write to a file and go to previous file in |
| 1434 | argument list |
| 1435 | |:wq| :wq write to a file and quit window or Vim |
| 1436 | |:wqall| :wqa[ll] write all changed buffers and quit Vim |
| 1437 | |:wsverb| :ws[verb] pass the verb to workshop over IPC |
| 1438 | |:wviminfo| :wv[iminfo] write to viminfo file |
| 1439 | |:xit| :x[it] write if buffer changed and quit window or Vim |
| 1440 | |:xall| :xa[ll] same as ":wqall" |
| 1441 | |:yank| :y[ank] yank lines into a register |
| 1442 | |:z| :z print some lines |
| 1443 | |:~| :~ repeat last ":substitute" |
| 1444 | |
| 1445 | vim:tw=78:ts=8:ft=help:norl: |