📄 quickref.cnx
字号:
|'rulerformat'| |'ruf'| custom format for the ruler|'runtimepath'| |'rtp'| list of directories used for runtime files|'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|'sidescrolloff'| |'siso'| min. nr. of columns to left and right of cursor|'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|'splitright'| |'spr'| new window is put right of 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|'suffixesadd'| |'sua'| suffixes added when searching for a file|'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|'termbidi'| |'tbidi'| terminal takes care of bi-directionality|'termencoding'| |'tenc'| character encoding used by 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|'thesaurus'| |'tsr'| list of thesaurus files for keyword completion|'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|'toolbariconsize'| |'tbis'| size of the toolbar icons (for GTK 2 only)|'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|'viewdir'| |'vdir'| directory where to store files with :mkview|'viewoptions'| |'vop'| specifies what to save for :mkview|'viminfo'| |'vi'| use .viminfo file upon startup and exiting|'virtualedit'| |'ve'| when to use virtual editing|'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|'winfixheight'| |'wfh'| keep window height when opening/closing windows|'winminheight'| |'wmh'| minimum number of lines for any window|'winminwidth'| |'wmw'| minimal number of columns for any window|'winwidth'| |'wiw'| minimal number of columns for current 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)------------------------------------------------------------------------------*Q_ur* 撤销/重复 命令|u| N u 撤销最近的 N 此改动|CTRL-R| N CTRL-R 重复最近的 N 个被撤销的改动|U| U 恢复最近被改动的行------------------------------------------------------------------------------*Q_et* 外部命令|:shell| :sh[ell] 开启一个 shell|:!| :!{command} 通过一个 shell 执行命令 {command} |K| K 以 'keywordprg' 程序 (缺省: "man")查光标下的关键字------------------------------------------------------------------------------*Q_qf* Quickfix commands|:cc| :cc [nr] 显示错误 [nr] (缺省为同一错误)|:cnext| :cn 显示下一个错误|:cprevious| :cp 显示上一个错误|:clist| :cl 列出所有错误|:cfile| :cf 从文件 'errorfile' 读入错误|:cquit| :cq 退出不保存并返回错误代码 (至编译器)|:make| :make [args] 启动 make, 读入错误, 并跳转至第一个错误|:grep| :gr[ep] [args] 执行 'grepprg' 程序以找出匹配并跳转至 第一个匹配------------------------------------------------------------------------------*Q_vc* 其他移动|CTRL-L| CTRL-L 清除并重画屏幕|CTRL-G| CTRL-G 先是当前文件名 (包括路径) 和光标位置 |ga| ga 以十进制,十六进制和八进制显示当前光标下的字符 的ASCII值|g_CTRL-G| g CTRL-G 先是当前光标的列,行,以及字符位置|CTRL-C| CTRL-C 在查找中: 中断查找|dos-CTRL-Break| CTRL-Break MS-DOS: 在查找中: 中断查找|<Del>| <Del> 当输入一个次数时: 删除前一个输入字符 |:version| :ve[rsion] 显示版本信息|:mode| :mode N MS-DOS: 至屏幕模式为 N (数字, C80, C4350, 等.)|:normal| :norm[al][!] {commands} 执行普通模式命令|Q| Q 切换至 "Ex" 模式|:redir| :redir >{file} 重定向信息至文件 {file}|:silent| :silent[!] {command} 沉默的执行 {command} 命令 |:confirm| :confirm {command} 退出, 写入, 等., 询问关于为保存的改动 或者只读文件.|:browse| :browse {command} 打开/读入/写入 文件, 使用一个 文件选择对话框------------------------------------------------------------------------------*Q_ce* 命令行编辑|c_<Esc>| <Esc> 放弃命令行 (如果 'wildchar' 通配符是 <Esc>, 键入两次)|c_CTRL-V| CTRL-V {char} 按字面插入 {char} |c_CTRL-V| CTRL-V {number} 输入10进制数表示的字符 (可达3个数位)|c_CTRL-K| CTRL-K {char1} {char2} 键入二合字母 (参见 |Q_di|)|c_CTRL-R| CTRL-R {0-9a-z"%#:-=} 插入指定寄存器的内容|c_<Left>| <Left>/<Right> 光标左移/右移|c_<S-Left>| <S-Left>/<S-Right> 光标左移/右移一个单词|c_CTRL-B| CTRL-B/CTRL-E 光标移动至命令行行首/行尾|c_<BS>| <BS> 删除光标前的字符|c_<Del>| <Del> 删除光标下的字符|c_CTRL-W| CTRL-W 删除光标前的单词|c_CTRL-U| CTRL-U 删除所有字符|c_<Up>| <Up>/<Down> 回忆以当前命令行开始的较早/较晚的命令|c_<S-Up>| <S-Up>/<S-Down> 从命令行历史中回忆较早/较晚的命令|:history| :his[tory] 显示命令行历史上下文关联的命令行补全:|c_wildchar| 'wildchar' (缺省: <Tab>) 根据光标前的命令行补全。如果有多个匹配,响铃 并显示第一个;继续 'wildchar' 将显示下一个 匹配。|c_CTRL-D| CTRL-D 列出当前命令行所有可能的匹配|c_CTRL-A| CTRL-A 插入当前命令行所有可能的匹配|c_CTRL-L| CTRL-L 插入所有匹配当前模式的名字的最长的共同部分|c_CTRL-N| CTRL-N 在 'wildchar' 之后存在多个匹配: 至下一匹配|c_CTRL-P| CTRL-P 在 'wildchar' 之后存在多个匹配: 至上一匹配------------------------------------------------------------------------------*Q_ra* Ex 范围|:range| , 分割两个行号|:range| ; 同上, 但在解释第二个行号之前先至 光标与第一个行号代表的行 |:range| {number} 一个绝对行号|:range| . 当前行|:range| $ 本文件的最后一行|:range| % 等同于 1,$ (整个文件)|:range| * 等同于 '<,'> (可视区域)|:range| 't 标记 t 的位置|:range| /{pattern}[/] 下一个匹配 {pattern} 的行|:range| ?{pattern}[?] 前一个匹配 {pattern} 的行|:range| +[num] 在前面的行号上加 [num] (缺省: 1)|:range| -[num] 从前面的行号里减 [num] (缺省: 1)------------------------------------------------------------------------------*Q_ex* 特殊 Ex 字符|:bar| | 分割两个命令 (不适用于 ":global" 及 ":!")|:quote| " 开始注释|:_%| % 当前文件名 (仅当期望文件名时)|:_#| #[num] alternate file 文件名 [num] (仅当期望文件名时) 注: 一下四项以字面意思键入; 并非特殊键!|:<cword>| <cword> 光标下的 word (仅当期望文件名时)|:<cWORD>| <cWORD> 光标下的 WORD (仅当期望文件名时)|:<cfile>| <cfile> 光标下的文件名 (仅当期望文件名时)|:<afile>| <afile> 供自动命令使用的文件名 (仅当期望文件名时)|:<sfile>| <sfile> 一个被 ":source" 的文件的文件名, within that file (only (仅当期望文件名时) 于 "%", "#", "<cfile>", "<sfile>" 或 "<afile>" 之后 |::p| :p 完整路径 |::h| :h 头 (除去文件名) |::t| :t 尾 (仅使用文件名) |::r| :r 根 (除去扩展名) |::e| :e 扩展名 |::s| :s/{pat}/{repl}/ 以 {repl} 替换 {pat} ------------------------------------------------------------------------------*Q_ed* 编辑一个文件 无 !: 若当前缓冲已被改动则失败 有 !: 放弃任何对当前缓冲的改动|:edit_f| :e[dit][!] {file} 编辑 {file}.|:edit| :e[dit][!] 重新载入当前文件|:enew| :ene[w][!] 编辑一个无名的新缓冲|:find| :fin[d][!] {file} 在 'path' 当中查找文件 {file} 并编辑之|CTRL-^| N CTRL-^ 编辑 alternate file N (同 ":e #N").|gf| gf or ]f 编辑光标下的文件名对应的文件|:pwd| :pwd 显示当前目录名|:cd| :cd [path] 将当前目录名变至 [path].|:cd-| :cd - 回到上一次当前目录|:file| :f[ile] 先是当前文件名及光标位置|:file| :f[ile] {name} 至当前文件名为 {name}.|:files| :files 显示 alternate file 的文件名.------------------------------------------------------------------------------*Q_fl* 使用参数列表 |argument-list||:args| :ar[gs] 显示参数列表, 当前文件显示在 "[]" 中
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -