📄 index.txt
字号:
*index.txt* For Vim version 5.8. Last change: 2000 Apr 01 VIM REFERENCE MANUAL by Bram MoolenaarThis file contains a list of all commands for each mode, with a tag and ashort description. The lists are sorted on ASCII value.Tip: When looking for certain functionality, use a search command. E.g.,to look for deleting something, use: "/delete".1. Insert mode |insert-index|2. Normal mode |normal-index| 2.1. Text objects |objects| 2.2. Window commands |CTRL-W| 2.3. Square bracket commands |[| 2.4. Commands starting with 'g' |g|3. Visual mode |visual-index|4. Command-line editing |ex-edit-index|5. EX commands |ex-cmd-index|For an overview of options see help.txt |option-list|.For a complete description of each option see options.txt |options|.For a complete listing of all help items see |help-tags|.==============================================================================1. Insert mode *insert-index*tag char action ~-----------------------------------------------------------------------|i_CTRL-@| CTRL-@ insert previously inserted text and stop insert|i_CTRL-A| CTRL-A insert previously inserted text CTRL-B not used |i_CTRL-B-gone||i_CTRL-C| CTRL-C quit insert mode, without checking for abbreviation, unless 'insertmode' set.|i_CTRL-D| CTRL-D delete one shiftwidth of indent in the current line|i_CTRL-E| CTRL-E insert the character which is below the cursor CTRL-F not used CTRL-G reserved for future expansion|i_<BS>| <BS> delete character before the cursor|i_digraph| {char1}<BS>{char2} enter digraph (only when 'digraph' option set)|i_CTRL-H| CTRL-H same as <BS>|i_<Tab>| <Tab> insert a <Tab> character|i_CTRL-I| CTRL-I same as <Tab>|i_<NL>| <NL> same as <CR>|i_CTRL-J| CTRL-J same as <CR>|i_CTRL-K| CTRL-K {char1} {char2} enter digraph|i_CTRL-L| CTRL-L when 'insertmode' set: Leave Insert mode|i_<CR>| <CR> begin new line|i_CTRL-M| CTRL-M same as <CR>|i_CTRL-N| CTRL-N find next match for keyword in front of the cursor|i_CTRL-O| CTRL-O execute a single command and return to insert mode|i_CTRL-P| CTRL-P find previous match for keyword in front of the cursor|i_CTRL-Q| CTRL-Q same as CTRL-V (used for terminal control flow)|i_CTRL-R| CTRL-R {0-9a-z"%#*:=} insert the contents of a register|i_CTRL-R_CTRL-R| CTRL-R CTRL-R {0-9a-z"%#*:=} insert the contents of a register literally|i_CTRL-R_CTRL-O| CTRL-R CTRL-O {0-9a-z"%#*:=} insert the contents of a register literally and don't auto-indent|i_CTRL-R_CTRL-P| CTRL-R CTRL-P {0-9a-z"%#*:=} insert the contents of a register literally and fix indent. CTRL-S (used for terminal control flow)|i_CTRL-T| CTRL-T insert one shiftwidth of indent in current line|i_CTRL-U| CTRL-U delete all entered characters in the current line|i_CTRL-V| CTRL-V {char} insert next non-digit literally|i_CTRL-V_digit| CTRL-V {number} insert three digit decimal number as a single byte.|i_CTRL-W| CTRL-W delete word before the cursor|i_CTRL-X| CTRL-X {mode} enter CTRL-X sub mode, see below|i_CTRL-Y| CTRL-Y insert the character which is above the cursor|i_CTRL-Z| CTRL-Z when 'insertmode' set: suspend Vim|i_<Esc>| <Esc> end insert mode (unless 'insertmode' set)|i_CTRL-[| CTRL-[ same as <Esc>|i_CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode CTRL-\ a - z reserved for extensions CTRL-\ others not used|i_CTRL-]| CTRL-] trigger abbreviation CTRL-^ not used|i_CTRL-_| CTRL-_ When 'allowrevins' set: change language (Hebrew, Farsi) {only when compiled with +rightleft feature} <Space> to '~' not used, except '0' and '^' followed by CTRL-D|i_0_CTRL-D| 0 CTRL-D delete all indent in the current line|i_^_CTRL-D| ^ CTRL-D delete all indent in the current line, restore it in the next line|i_<Del>| <Del> delete character under the cursor Meta characters (0x80 to 0xff, 128 to 255) not used|i_<Left>| <Left> cursor one character left|i_<S-Left>| <S-Left> cursor one word left|i_<C-Left>| <C-Left> cursor one word left|i_<Right>| <Right> cursor one character right|i_<S-Right>| <S-Right> cursor one word right|i_<C-Right>| <C-Right> cursor one word right|i_<Up>| <Up> cursor one line up|i_<S-Up>| <S-Up> same as <PageUp>|i_<Down>| <Down> cursor one line down|i_<S-Down>| <S-Down> same as <PageDown>|i_<Home>| <Home> cursor to start of line|i_<C-Home>| <C-Home> cursor to start of file|i_<End>| <End> cursor past end of line|i_<C-End>| <C-End> cursor past end of file|i_<PageUp>| <PageUp> one screenfull backward|i_<PageDown>| <PageDown> one screenfull forward|i_<F1>| <F1> same as <Help>|i_<Help>| <Help> stop insert mode and display help window|i_<Insert>| <Insert> toggle Insert/Replace mode|i_<LeftMouse>| <LeftMouse> cursor at mouse click|i_<MouseDown>| <MouseDown> scroll three lines downwards|i_<S-MouseDown>| <S-MouseDown> scroll a full page downwards|i_<MouseUp>| <MouseUp> scroll three lines upwards|i_<S-MouseUp>| <S-MouseUp> scroll a full page upwardscommands in CTRL-X submode|i_CTRL-X_CTRL-D| CTRL-X CTRL-D complete defined identifiers|i_CTRL-X_CTRL-E| CTRL-X CTRL-E scroll up|i_CTRL-X_CTRL-F| CTRL-X CTRL-F complete file names|i_CTRL-X_CTRL-I| CTRL-X CTRL-I complete identifiers|i_CTRL-X_CTRL-K| CTRL-X CTRL-K complete identifiers from dictionary|i_CTRL-X_CTRL-L| CTRL-X CTRL-L complete whole lines|i_CTRL-X_CTRL-L| CTRL-X CTRL-N next completion|i_CTRL-X_CTRL-L| CTRL-X CTRL-P previous completion|i_CTRL-X_CTRL-Y| CTRL-X CTRL-Y scroll down|i_CTRL-X_CTRL-]| CTRL-X CTRL-] complete tags{not available when compiled without the +insert_expand feature}==============================================================================2. Normal mode *normal-index*CHAR any non-blank characterWORD any sequences of non-blank charactersN a number entered before the command{motion} a cursor movement commandNmove the text that is moved over with a {motion}SECTION a section that possibly starts with '}' instead of '{'note: 1 = cursor movement command; 2 = can be undone/redonetag char note action in Normal mode ~------------------------------------------------------------------------------ CTRL-@ not used|CTRL-A| CTRL-A 2 add N to number at/after cursor|CTRL-B| CTRL-B 1 scroll N screens Backwards|CTRL-C| CTRL-C interrupt current (search) command|CTRL-D| CTRL-D scroll Down N lines (default: half a screen)|CTRL-E| CTRL-E scroll N lines upwards (N lines Extra)|CTRL-F| CTRL-F 1 scroll N screens Forward|CTRL-G| CTRL-G display current file name and position|<BS>| <BS> 1 same as "h"|CTRL-H| CTRL-H 1 same as "h"|<Tab>| <Tab> 1 go to N newer entry in jump list|CTRL-I| CTRL-I 1 same as <Tab>|<NL>| <NL> 1 same as "j"|CTRL-J| CTRL-J 1 same as "j" CTRL-K not used|CTRL-L| CTRL-L redraw screen|<CR>| <CR> 1 cursor to the first CHAR N lines lower|CTRL-M| CTRL-M> 1 same as <CR>|CTRL-N| CTRL-N 1 same as "j"|CTRL-O| CTRL-O 1 go to N older entry in jump list|CTRL-P| CTRL-P 1 cursor N lines upward CTRL-Q (used for terminal control flow)|CTRL-R| CTRL-R 2 redo changes which were undone with 'u' CTRL-S (used for terminal control flow)|CTRL-T| CTRL-T jump to N older Tag in tag list|CTRL-U| CTRL-U scroll N lines Upwards (default: half a screen)|CTRL-V| CTRL-V start blockwise Visual mode|CTRL-W| CTRL-W {char} window commands, see |CTRL-W||CTRL-X| CTRL-X 2 subtract N from number at/after cursor|CTRL-Y| CTRL-Y scroll N lines downwards|CTRL-Z| CTRL-Z suspend program (or start new shell) CTRL-[ <Esc> not used|CTRL-\_CTRL-N| CTRL-\ CTRL-N go to Normal mode (no-op) CTRL-\ a - z reserved for extensions CTRL-\ others not used|CTRL-]| CTRL-] :ta to ident under cursor|CTRL-^| CTRL-^ edit Nth alternate file (equivalent to ":e #N") CTRL-_ not used|<Space>| <Space> 1 same as "l"|!| !{motion}{filter} 2 filter Nmove text through the {filter} command|!!| !!{filter} 2 filter N lines through the {filter} command|quote| "{a-zA-Z0-9.%#:-"} use buffer {a-zA-Z0-9.%#:-"} for next delete, yank or put (upper case to append) ({.%#:} only work with put)|#| # 1 search backward for the Nth occurrence of the ident under the cursor|$| $ 1 cursor to the end of Nth next line|%| % 1 find the next (curly/square) bracket on this line and go to its match, or go to matching comment bracket, or go to matching preprocessor directive.|N%| {count}% 1 go to N percentage in the file|&| & 2 repeat last :s|'| '{a-zA-Z0-9} 1 cursor to the first CHAR on the line with mark {a-zA-Z0-9}|''| '' 1 cursor to the first CHAR of the line where the cursor was before the latest jump.|'<| '< 1 cursor to the first CHAR of the line where highlighted area starts/started in the current buffer.|'>| '> 1 cursor to the first CHAR of the line where highlighted area ends/ended in the current buffer.|'[| '[ 1 cursor to the first CHAR on the line of the start of last operated text or start of putted text|']| '] 1 cursor to the first CHAR on the line of the end of last operated text or end of putted text|(| ( 1 cursor N sentences backward|)| ) 1 cursor N sentences forward|star| * 1 search forward for the Nth occurrence of the ident under the cursor|+| + 1 cursor to the first CHAR N lines lower|,| , 1 repeat latest f, t, F or T in opposite direction N times|-| - 1 cursor to the first CHAR N lines higher|.| . 2 repeat last change with count replaced with N|/| /{pattern}<CR> 1 search forward for the Nth occurrence of {pattern}|/<CR>| /<CR> 1 search forward for {pattern} of last search|count| 0 1 cursor to the first char of the line|count| 1 prepend to command to give a count|count| 2 "|count| 3 "|count| 4 "|count| 5 "|count| 6 "|count| 7 "|count| 8 "|count| 9 "|:| : start entering an Ex command|N:| {count}: start entering an Ex command with range from current line to N lines down|;| ; 1 repeat latest f, t, F or T N times|<| <{motion} 2 shift Nmove lines one 'shiftwidth' leftwards|<<| << 2 shift N lines one 'shiftwidth' leftwards|=| ={motion} 2 filter Nmove lines through "indent"|==| == 2 filter N lines through "indent"|>| >{motion} 2 shift Nmove lines one 'shiftwidth' rightwards|>>| >> 2 shift N lines one 'shiftwidth' rightwards|?| ?{pattern}<CR> 1 search backward for the Nth previous occurrence of {pattern}|?<CR>| ?<CR> 1 search backward for {pattern} of last search|@| @{a-z} 2 execute the contents of named buffer {a-z} N times|@:| @: repeat the previous ":" command N times|@@| @@ 2 repeat the previous @{a-z} N times|A| A 2 append text after the end of the line N times|B| B 1 cursor N WORDS backward|C| ["x]C 2 change from the cursor position to the end of the line, and N-1 more lines [into buffer x]; synonym for "c$"|D| ["x]D 2 delete the characters under the cursor until the end of the line and N-1 more lines [into buffer x]; synonym for "d$"|E| E 1 cursor forward to the end of WORD N|F| F{char} 1 cursor to the Nth occurrence of {char} to the left|G| G 1 cursor to line N, default last line|H| H 1 cursor to line N from top of screen|I| I 2 insert text before the first CHAR on the line N times|J| J 2 Join N lines; default is 2|K| K lookup Keyword under the cursor with 'keywordprg'|L| L 1 cursor to line N from bottom of screen|M| M 1 cursor to middle line of screen|N| N 1 repeat the latest '/' or '?' N times in opposite direction|O| O 2 begin a new line above the cursor and insert text, repeat N times|P| ["x]P 2 put the text [from buffer x] before the cursor N times|Q| Q switch to "Ex" mode|R| R 2 enter replace mode: overtype existing
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -