📄 help.txt
字号:
|:iabbrev| :iab/:iunab/:inoreab like ":ab", but only for Insert mode|:cabbrev| :cab/:cunab/:cnoreab like ":ab", but only for Command-line mode|:abclear| :abc[lear] remove all abbreviations|:cabclear| :cabc[lear] remove all abbr's for Cmdline mode|:iabclear| :iabc[lear] remove all abbr's for Insert mode------------------------------------------------------------------------------*X_op* Options|:set| :se[t] Show all modified options.|:set| :se[t] all Show all options.|:set| :se[t] {option} Set boolean option (switch it on), show string or number option.|:set| :se[t] no{option} Reset boolean option (switch it off).|:set| :se[t] inv{option} invert boolean option.|:set| :se[t] {option}={value} Set string or number option to {value}.|:set| :se[t] {option}+={value} append {value} to string option, add {value} to number option|:set| :se[t] {option}-={value} remove {value} to string option, subtract {value} from number option|:set| :se[t] {option}? Show value of {option}.|:set| :se[t] {option}& Reset {option} to its default value.|:fix| :fix[del] Set value of 't_kD' according to value of 't_kb'.|:options| :opt[ions] Open a new window to view and set options, grouped by functionality and with short helpShort explanation of each option: *option-list*|'aleph'| |'al'| ASCII code of the letter Aleph (Hebrew)|'allowrevins'| |'ari'| allow CTRL-_ in Insert and Command-line mode|'altkeymap'| |'akm'| for default second language (Farsi/Hebrew)|'autoindent'| |'ai'| take indent for new line from previous line|'autowrite'| |'aw'| automatically write file if changed|'background'| |'bg'| "dark" or "light", used for highlight colors|'backspace'| |'bs'| how backspace works at start of line|'backup'| |'bk'| keep backup file after overwriting a file|'backupdir'| |'bdir'| list of directories for the backup file|'backupext'| |'bex'| extension used for the backup file|'binary'| |'bin'| read/write/edit file in binary mode|'bioskey'| |'biosk'| MS-DOS: use bios calls for input characters|'breakat'| |'brk'| characters that may cause a line break|'browsedir'| |'bsdir'| which directory to start browsing in|'cindent'| |'cin'| do C program indenting|'cinkeys'| |'cink'| keys that trigger indent when 'cindent' is set|'cinoptions'| |'cino'| how to do indenting when 'cindent' is set|'cinwords'| |'cinw'| words where 'si' and 'cin' add an indent|'clipboard'| |'cb'| use the clipboard as the unnamed register|'cmdheight'| |'ch'| number of lines to use for the command-line|'columns'| |'co'| number of columns in the display|'comments'| |'com'| patterns that can start a comment line|'compatible'| |'cp'| behave Vi-compatible as much as possible|'complete'| |'cpt'| specify how Insert mode completion works|'confirm'| |'cf'| ask what to do about unsaved/read-only files|'conskey'| |'consk'| get keys directly from console (MS-DOS only)|'cpoptions'| |'cpo'| flags for Vi-compatible behavior|'cscopeprg'| |'csprg'| command to execute cscope|'cscopetag'| |'cst'| use cscope for tag commands|'cscopetagorder'| |'csto'| determines ":cstag" search order|'cscopeverbose'| |'csverb'| give messages when adding a cscope database|'define'| |'def'| pattern to be used to find a macro definition|'dictionary'| |'dict'| list of file names used for keyword completion|'digraph'| |'dg'| enable the entering of digraphs in Insert mode|'directory'| |'dir'| list of directory names for the swap file|'display'| |'dy'| list of flags for how to display text|'edcompatible'| |'ed'| toggle flags of ":substitute" command|'endofline'| |'eol'| write <EOL> for last line in file|'equalalways'| |'ea'| windows are automatically made the same size|'equalprg'| |'ep'| external program to use for "=" command|'errorbells'| |'eb'| ring the bell for error messages|'errorfile'| |'ef'| name of the errorfile for the QuickFix mode|'errorformat'| |'efm'| description of the lines in the error file|'esckeys'| |'ek'| recognize function keys in Insert mode|'eventignore'| |'ei'| autocommand events that are ignored|'expandtab'| |'et'| use spaces when <Tab> is inserted|'exrc'| |'ex'| read .vimrc and .exrc in the current directory|'fileencoding'| |'fe'| file encoding for multi-byte text|'fileformat'| |'ff'| file format used for file I/O|'fileformats'| |'ffs'| automatically detected values for 'fileformat'|'filetype'| |'ft'| type of file, used for autocommands|'fkmap'| |'fk'| Farsi keyboard mapping|'formatoptions'| |'fo'| how automatic formatting is to be done|'formatprg'| |'fp'| name of external program used with "gq" command|'gdefault'| |'gd'| the ":substitute" flag 'g' is default on|'grepformat'| |'gfm'| format of 'grepprg' output|'grepprg'| |'gp'| program to use for ":grep"|'guicursor'| |'gcr'| GUI: settings for cursor shape and blinking|'guifont'| |'gfn'| GUI: Name(s) of font(s) to be used|'guifontset'| |'gfs'| GUI: Names of multi-byte fonts to be used|'guiheadroom'| |'ghr'| GUI: pixels room for window decorations|'guioptions'| |'go'| GUI: Which components and options are used|'guipty'| GUI: try to use a pseudo-tty for ":!" commands|'helpfile'| |'hf'| name of this help file|'helpheight'| |'hh'| minimum height of a new help window|'hidden'| |'hid'| don't unload buffer when it is |abandon|ed|'highlight'| |'hl'| sets highlighting mode for various occasions|'hlsearch'| |'hls'| highlight matches with last search pattern|'history'| |'hi'| number of command-lines that are remembered|'hkmap'| |'hk'| Hebrew keyboard mapping|'hkmapp'| |'hkp'| phonetic Hebrew keyboard mapping|'icon'| let Vim set the text of the window icon|'iconstring'| string to use for the Vim icon text|'ignorecase'| |'ic'| ignore case in search patterns|'include'| |'inc'| pattern to be used to find an include file|'incsearch'| |'is'| highlight match while typing search pattern|'infercase'| |'inf'| adjust case of match for keyword completion|'insertmode'| |'im'| start the edit of a file in Insert mode|'isfname'| |'isf'| characters included in file names and pathnames|'isident'| |'isi'| characters included in identifiers|'iskeyword'| |'isk'| characters included in keywords|'isprint'| |'isp'| printable characters|'joinspaces'| |'js'| two spaces after a period with a join command|'key'| encryption key|'keymodel'| |'km'| enable starting/stopping selection with keys|'keywordprg'| |'kp'| program to use for the "K" command|'langmap'| |'lmap'| alphabetic characters for other language mode|'laststatus'| |'ls'| tells when last window has status lines|'lazyredraw'| |'lz'| don't redraw while executing macros|'linebreak'| |'lbr'| wrap long lines at a blank|'lines'| number of lines in the display|'lisp'| automatic indenting for Lisp|'list'| show <Tab> and <EOL>|'listchars'| |'lcs'| characters for displaying in list mode|'magic'| changes special characters in search patterns|'makeef'| |'mef'| name of the errorfile for ":make"|'makeprg'| |'mp'| program to use for the ":make" command|'matchpairs'| |'mps'| pairs of characters that "%" can match|'matchtime'| |'mat'| tenths of a second to show matching paren|'maxfuncdepth'| |'mfd'| maximum recursive depth for user functions|'maxmapdepth'| |'mmd'| maximum recursive depth for mapping|'maxmem'| |'mm'| maximum memory (in Kbyte) used for one buffer|'maxmemtot'| |'mmt'| maximum memory (in Kbyte) used for all buffers|'modeline'| |'ml'| recognize modelines at start or end of file|'modelines'| |'mls'| number of lines checked for modelines|'modified'| |'mod'| buffer has been modified|'more'| pause listings when the whole screen is filled|'mouse'| enable the use of mouse clicks|'mousefocus'| |'mousef'| keyboard focus follows the mouse|'mousehide'| |'mh'| hide mouse pointer while typing|'mousemodel'| |'mousem'| changes meaning of mouse buttons|'mousetime'| |'mouset'| max time between mouse double-click|'nrformats'| |'nf'| number formats recognized for CTRL-A command|'number'| |'nu'| print the line number in front of each line|'osfiletype'| |'oft'| operating system-specific filetype information|'paragraphs'| |'para'| nroff macros that separate paragraphs|'paste'| allow pasting text|'pastetoggle'| |'pt'| key code that causes 'paste' to toggle|'patchmode'| |'pm'| keep the oldest version of a file|'path'| |'pa'| list of directories searched with "gf" et.al.|'previewheight'| |'pvh'| height of the preview window|'readonly'| |'ro'| disallow writing the buffer|'remap'| allow mappings to work recursively|'report'| threshold for reporting nr. of lines changed|'restorescreen'| |'rs'| Win32: restore screen when exiting|'revins'| |'ri'| inserting characters will work backwards|'rightleft'| |'rl'| window is right-to-left oriented|'ruler'| |'ru'| show cursor line and column in the status line|'rulerformat'| |'ruf'| custom format for the ruler|'scroll'| |'scr'| lines to scroll with CTRL-U and CTRL-D|'scrollbind'| |'scb'| scroll in window as other windows scroll|'scrolljump'| |'sj'| minimum number of lines to scroll|'scrolloff'| |'so'| minimum nr. of lines above and below cursor|'scrollopt'| |'sbo'| how 'scrollbind' should behave|'sections'| |'sect'| nroff macros that separate sections|'secure'| secure mode for reading .vimrc in current dir|'selection'| |'sel'| what type of selection to use|'selectmode'| |'slm'| when to use Select mode instead of Visual mode|'sessionoptions'| |'ssop'| options for |:mksession||'shell'| |'sh'| name of shell to use for external commands|'shellcmdflag'| |'shcf'| flag to shell to execute one command|'shellpipe'| |'sp'| string to put output of ":make" in error file|'shellquote'| |'shq'| quote character(s) for around shell command|'shellredir'| |'srr'| string to put output of filter in a temp file|'shellslash'| |'ssl'| use forward slash for shell file names|'shelltype'| |'st'| Amiga: influences how to use a shell|'shellxquote'| |'sxq'| like 'shellquote', but include redirection|'shiftround'| |'sr'| round indent to multiple of shiftwidth|'shiftwidth'| |'sw'| number of spaces to use for (auto)indent step|'shortmess'| |'shm'| list of flags, reduce length of messages|'shortname'| |'sn'| non-MS-DOS: Filenames assumed to be 8.3 chars|'showbreak'| |'sbr'| string to use at the start of wrapped lines|'showcmd'| |'sc'| show (partial) command in status line|'showfulltag'| |'sft'| show full tag pattern when completing tag|'showmatch'| |'sm'| briefly jump to matching bracket if insert one|'showmode'| |'smd'| message on status line to show current mode|'sidescroll'| |'ss'| minimum number of columns to scroll horizontal|'smartcase'| |'scs'| no ignore case when pattern has uppercase|'smartindent'| |'si'| smart autoindenting for C programs|'smarttab'| |'sta'| use 'shiftwidth' when inserting <Tab>|'softtabstop'| |'sts'| number of spaces that <Tab> uses while editing|'splitbelow'| |'sb'| new window from split is below the current one|'startofline'| |'sol'| commands move cursor to first blank in line|'statusline'| |'stl'| custom format for the status line|'suffixes'| |'su'| suffixes that are ignored with multiple match|'swapfile'| |'swf'| whether to use a swapfile for a buffer|'swapsync'| |'sws'| how to sync the swap file|'switchbuf'| |'swb'| sets behavior when switching to another buffer|'syntax'| |'syn'| syntax to be loaded for current buffer|'tabstop'| |'ts'| number of spaces that <Tab> in file uses|'tagbsearch'| |'tbs'| use binary searching in tags files|'taglength'| |'tl'| number of significant characters for a tag|'tagrelative'| |'tr'| file names in tag file are relative|'tags'| |'tag'| list of file names used by the tag command|'tagstack'| |'tgst'| push tags onto the tag stack|'term'| name of the terminal|'terse'| shorten some messages|'textauto'| |'ta'| obsolete, use 'fileformats'|'textmode'| |'tx'| obsolete, use 'fileformat'|'textwidth'| |'tw'| maximum width of text that is being inserted|'tildeop'| |'top'| tilde command "~" behaves like an operator|'timeout'| |'to'| time out on mappings and key codes|'timeoutlen'| |'tm'| time out time in milliseconds|'title'| let Vim set the title of the window|'titlelen'| percentage of 'columns' used for window title|'titleold'| old title, restored when exiting|'titlestring'| string to use for the Vim window title|'toolbar'| |'tb'| GUI: which items to show in the toolbar|'ttimeout'| time out on mappings|'ttimeoutlen'| |'ttm'| time out time for key codes in milliseconds|'ttybuiltin'| |'tbi'| use built-in termcap before external termcap|'ttyfast'| |'tf'| indicates a fast terminal connection|'ttymouse'| |'ttym'| type of mouse codes generated|'ttyscroll'| |'tsl'| maximum number of lines for a scroll|'ttytype'| |'tty'| alias for 'term'|'undolevels'| |'ul'| maximum number of changes that can be undone|'updatecount'| |'uc'| after this many characters flush swap file|'updatetime'| |'ut'| after this many milliseconds flush swap file|'verbose'| |'vbs'| give informative messages|'viminfo'| |'vi'| use .viminfo file upon startup and exiting|'visualbell'| |'vb'| use visual bell instead of beeping|'warn'| warn for shell command when buffer was changed|'weirdinvert'| |'wi'| for terminals that have weird inversion method|'whichwrap'| |'ww'| allow specified keys to cross line boundaries|'wildchar'| |'wc'| command-line character for wildcard expansion|'wildcharm'| |'wcm'| like 'wildchar' but also works when mapped|'wildignore'| |'wig'| files matching these patterns are not completed|'wildmenu'| |'wmnu'| use menu for command line completion|'wildmode'| |'wim'| mode for 'wildchar' command-line expansion|'winaltkeys'| |'wak'| when the windows system handles ALT keys|'winheight'| |'wh'| minimum number of lines for the current window|'winminheight'| |'wmh'| minimum number of lines for any window|'wrap'| long lines wrap and continue on the next line|'wrapmargin'| |'wm'| chars from the right where wrapping starts|'wrapscan'| |'ws'| searches wrap around the end of the file|'write'| writing to a file is allowed|'writeany'| |'wa'| write to file with no need for "!" override|'writebackup'| |'wb'| make a backup before overwriting a file|'writedelay'| |'wd'| delay this many msec for each char (for debug)------------------------------------------------------------------------------*X_ur* Undo/Redo commands|u| N u undo last N changes|CTRL-R| N CTRL-R redo last N undone changes|U| U restore last changed line------------------------------------------------------------------------------*X_et* External commands|:shell| :sh[ell] start a shell|:!| :!{command} execute {command} with a shell|K| K lookup keyword under the cursor with 'keywordprg' program (default: "man")------------------------------------------------------------------------------*X_qf* Quickfix commands|:cc| :cc [nr] display error [nr] (default is the same again)|:cnext| :cn display the next error|:cprevious| :cp display the previous error|:clist| :cl list all errors|:cfile| :cf read errors from the file 'errorfile'|:cquit| :cq quit without writing and return error code (to the compiler)|:make| :make [args] start make, read errors, and jump to first error|:grep| :gr[ep] [args] execute 'grepprg' to find matches and jump to the first one.------------------------------------------------------------------------------*X_vc* Various commands|CTRL-L| CTRL-L Clear and redraw the screen.|CTRL-G| CTRL-G show current file name (with path) and cursor position|ga| ga show ascii value of character under cursor in decimal, hex, and octal|g_CTRL-G| g CTRL-G show cursor column, line, and character position|CTRL-C| CTRL-C during searches: Interrupt the search|dos-CTRL-Break| CTRL-Break MS-DOS: during searches: Interrupt the search|<Del>| <Del> while entering a count: delete last character|:version| :ve[rsion] show version information|:mode| :mode N MS-DOS: set screen mode to N (number, C80, C4350, etc.)|:normal| :norm[al][!] {commands} Execute Normal mode commands.|Q| Q switch to "Ex" mode|:redir| :redir >{file} redirect messages to {file}|:confirm| :confirm {command} quit, write, etc., asking about unsaved changes or read-only files.------------------------------------------------------------------------------*X_ce* Command-line editing|c_<Esc>| <Esc> abandon command-line (if 'wildchar' is <Esc>, type it twice)|c_CTRL-V| CTRL-V {char} insert {char} literally|c_CTRL-V| CTRL-V {number} enter decimal value of character (up to three digits)|c_CTRL-K| CTRL-K {char1} {char2} enter digraph (See |X_di|)|c_CTRL-R| CTRL-R {0-9a-z"%#:-=} insert the contents of a register|c_<Left>| <Left>/<Right> cursor left/right|c_<S-Left>| <S-Left>/<S-Right> cursor one word left/right|c_CTRL-B| CTRL-B/CTRL-E cursor to beginning/end of command-line|c_<BS>| <BS> delete the character in front of the cursor|c_<Del>| <Del> delete the character under the cursor|c_CTRL-W| CTRL-W delete the word in front of the cursor|c_CTRL-U| CTRL-U remove all characters|c_<Up>| <Up>/<Down> recall older/newer command-line that starts with current command|c_<S-Up>| <S-Up>/<S-Down> recall older/newer command-line from history|:history| :his[tory] show older command-lines
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -