neovim 笔记
界面和内容管理
Section titled “界面和内容管理”1.tab
每个 tab 都有一个独立的窗口布局, 每个 tab 是一个包含多个窗口的容器.
2.window
每个 window 都显示一个 buffer 的内容,window 是用户与 buffer 交互的地方.
3.buffer
Neovim 中最基本的内容单元,它代表文件的内存副本. 实际上每个文件都被加载为一个 buffer.
se[t][!]
显示所有与默认值不同的选项, [!]选项将每个选项单独在一行显示。se[t][!] all
显示所有选项,[!]选项将每个选项单独在一行显示。se[t] {option}
如果是可切换的选项,将开启选项值,其他选项将显示选项值se[t] no{option}
关闭可切换选项se[t] {option}!
或se[t] inv{option}
翻转可切换选项se[t] {option}&
设置选项为默认值se[t] {option}&vi
设置为vi默认值se[t] {option}&vim
设置为vim默认值se[t] all&
设置所有选项为默认值, 不会影响columns
和lines
, 慎用,影响很大se[t] {option}={value}
或se[t] {option}:{value}
设置字符串和数字选项se[t] {option}+={value}
将 {value} 加上数字选项,或将 {value} 添加到字符串选项的后面. 当选项是逗号分隔的列表时,会添加逗号,除非值为空.se[t] {option}^={value}
将 {value} 乘以数字选项,或将 {value} 添加到字符串选项的前面. 当选项是逗号分隔的列表时,会添加逗号,除非值为空.se[t] {option}-={value}
数字选项减去 {value},或将 {value} 从字符串选项中移除.setg[lobal][!]
设置全局值setl[ocal][!]
设置局部值set
同时设置全局和局部值
选项 | 作用域 | 值类型 | 默认值 | 介绍 |
---|---|---|---|---|
allowrevins ari | global | boolean | off | 控制是否允许使用 “reverse insert” 模式。这是一种从右向左插入文本的方式 |
ambiwidth ambw | global | string | single | 针对 East Asian Ambiguous Width 字符 显示宽度控制的选项(single: 符按 1 列处理. double: 按 2 列处理) |
arabic arab | window | boolean | off | 启用专为阿拉伯语优化的编辑模式 |
arabicshape arshape | global | boolean | on | 控制阿拉伯文字外观渲染 |
autochdir acd | global | boolean | off | 自动切换当前工作目录(cwd)到当前正在编辑的文件所在目录 |
autoindent ai | buffer | boolean | on | 自动延续上一行的缩进 |
autoread ar | global or buffer | boolean | on | 自动检测并重新加载被外部修改的文件 |
autowrite aw | global | boolean | off | 切换 buffer、执行外部命令或运行某些操作时自动保存已修改的文件 |
autowriteall awa | global | boolean | off | 任何可能切换上下文或离开当前 buffer 的操作时,自动将所有已修改的缓冲区写入磁盘 |
background bg | global | string | dark | 告诉编辑器当前所使用的终端或 GUI 背景色是 浅色(light) 还是 深色(dark) |
backspace bs | global | string | indent,eol,start | 控制在插入模式下按 <Backspace> 键时,允许删除哪些内容 |
backup bk | global | boolean | off | 制是否在写入文件时自动创建备份副本 |
backupcopy bkc | global or buffer | string | auto | 用于控制当备份文件创建时,是以复制方式还是重命名方式处理原始文件 |
backupdir bdir | global | string | .,$XDG_STATE_HOME/nvim/backup// | 备份文件的保存目录 |
backupext bex | global | string | ~ | 备份文件的后缀 |
backupskip bsk | global | string | $TMPDIR/*,$TMP/*,$TEMP/* | 哪些文件不进行备份 |
belloff bo | global | string | all | 禁用各种“响铃”行为 |
binary bin | buffer | boolean | off | 以“二进制安全”的方式打开、保存文件,避免 Vim 默认的“文本格式处理” |
bomb | buffer | boolean | off | 控制在保存 UTF-8/UTF-16 文件时,是否在文件开头添加 BOM 字节序标记 |
breakat brk | global | string | ” ^I!@*-+;:,./?” | 控制自动换行断行位置 |
breakindent bri | window | boolean | off | 让长行在折行后仍然保持和原始缩进一致 |
breakindentopt briopt | window | string | "" | 精细控制缩进行为(如偏移量、最小宽度等) |
bufhidden bh | buffer | string | "" | 离开(隐藏)某个缓冲区时,这个缓冲区的生命周期和行为 |
buflisted bl | buffer | boolean | on | 控制某个缓冲区是否出现在 :ls(或 :buffers)命令结果中的标志 |
buftype bt | buffer | string | "" | 定义该缓冲区的“用途类型”,即它是普通文件、终端窗口、帮助页,还是插件创建的临时窗口 |
busy | buffer | number | 0 | 内部状态标志,用于指示当前 Vim 是否处于“忙碌”状态(不是 :set 可配置项) |
casemap cmp | global | string | internal,keepascii | 控制 大小写转换行为 的选项,主要影响 |
cdhome cdh | global | boolean | off | 当 on 时,没有参数的 :cd、:tcd 和 :lcd 会更改当前工作目录到 $HOME 目录 |
cdpath cd | global | string | $CDPATH or ”,,“ | 用于指定 :cd, :tcd, :lcd 等命令在解析路径时的搜索目录列表,从而允许你用相对路径切换目录而不必写全路径 |
cedit | global | string | CTRL-F | 为命令行输入模式(:、/、?)设置一个快捷键,在其中按下该键,会打开命令行历史窗口,允许你用常规 Vim 编辑方式修改历史命令 |
channel | buffer | number | 0 | 不是 :set 的配置项, 用于实现 Neovim 的 异步通信机制 |
charconvert ccv | global | string | "" | 定外部程序来执行字符编码转换,当 Vim 打开或保存文件时如果无法识别编码时会调用这个程序 |
chistory chi | global | number | 10 | 快速修复列表数叠。 必须介于 1 到 100 之间 |
cindent cin | buffer | boolean | off | 启用 C 语言风格缩进 |
cinkeys cink | buffer | string | ”0{,0},0),0],:,0#,!^F,o,O,e” | 控制何时触发重新缩进的键位规则 的选项,主要配合 cindent 一起工作 |
cinoptions cino | buffer | string | "" | 用于微调 cindent 自动缩进的具体规则和偏移量 |
cinscopedecls cinsd | buffer | string | ”public,protected,private” | 与 cindent 缩进引擎配合使用的本地缓冲区字符串选项,用于指定哪些标识符被视为“作用域声明符” |
cinwords cinw | buffer | string | ”if,else,while,do,for,switch” | 这些关键字在下一行中开始一个额外的缩进 |
clipboard cb | global | string | "" | unnamed: 将 Vim 的默认寄存器(“)映射为 *(通常是 X11 选择剪贴板), unnamedplus: 将 Vim 的默认寄存器映射为 +(系统剪贴板) |
cmdheight ch | global ot tab | number | 1 | 设置 命令行区域的高度 |
cmdwinheight cwh | global | number | 7 | 设置 命令行窗口(Command-line window)高度 的选项,控制使用 q:、q/、q? 打开命令历史编辑窗口时的默认行数 |
colorcolumn cc | window | string | "" | 高亮特定列数位置的视觉辅助选项,常用于提醒开发者代码行是否超出某个字符宽度限制 |
columns co | global | number | 80 或 终端宽度 | 当前编辑器窗口的列宽 |
comments com | buffer | string | 影响自动注释续行(比如回车时是否自动补上 // 或 *) | |
commentstring cms | buffer | string | "" | 定义当前文件类型注释格式的字符串选项 |
complete cpt | buffer | string | ”.,w,b,u,t” | 配置 插入模式补全行为 的选项 |
completefunc cfu | buffer | string | "" | 插入模式补全的函数接口 |
completefuzzycollect cfc | global | string | "" | 用于 模糊匹配(fuzzy matching)补全候选项的收集阶段 |
completeitemalign cia | global | string | abbr,kind,menu | 控制对齐方式和在插入模式下在弹出菜单中显示项目的顺序 |
completeopt cot | global or buffer | string | menu,popup | 插入模式补全选项列表 |
completeslash csl | buffer | string | "" | 仅在Windows下可修改, 在Windows下设置路径补全,覆盖shellslash |
concealcursor cocu | window | string | "" | 设置光标行中文本也可以隐藏的模式 |
conceallevel cole | window | number | 0 | 确定具有“conceal”语法属性的文本如何显示 |
confirm cf | global | boolean | off | 是否在未保存文件退出时显示一个对话框 |
copyindent ci | buffer | boolean | off | 复制现有行的结构自动缩进换行 |
cpoptions cpo | global | string | ”aABceFs_“ | vi兼容选项 |
cursorbind crb | window | boolean | off | 作为当前窗口移动其他游标绑定窗口(同时具有此选项集)将其光标移动到相应的行列 |
cursorcolumn cuc | window | boolean | off | 使用 CursorColumn 突出显示光标的屏幕列 |
cursorline cul | window | boolean | off | 使用 CursorLine hl-CursorLine 突出显示光标的文本行 |
cursorlineopt culopt | window | string | both | 以逗号分隔的“ 光标线” 显示方式的设置列表 |
debug | global | string | "" | 错误信息提示方式 |
define def | global or buffer | string | "" | 用于查找宏定义的模式 |
delcombine deco | global | boolean | off | 如果编辑 Unicode 并设置了此选项,则退格键和普通模式“x”单独删除每个组合字符 |
dictionary dict | global or buffer | string | "" | 用于查找单词的文件名列表 |
diff | window | boolean | off | 将当前窗口加入显示差异的窗口组中文件之间 |
diffanchors dia | global or buffer | "" | 每个缓冲区中的 {address} 列表,用逗号分隔,它们是用于差异时被视为锚点 | |
diffexpr dex | global | string | "" | 计算以获取差异文件 |
diffopt dip | global | string | ”internal,filler,closeoff,inline:simple,linematch:40” | 差异模式的选项设置 |
digraph dg | global | boolean | off | 启用在插入模式下输入有向字母 |
directory dir | global | string | ”$XDG_STATE_HOME/nvim/swap//“ | 交换文件的目录名称列表,用逗号分隔 |
display dy | global | string | lastline | 更改文本的显示方式 |
eadirection ead | global | string | both | 告知 “equalalways” 选项何时适用 |
emoji emo | global | boolean | on | 启用时,所有 Unicode 表情符号字符都被视为全角 |
encoding enc | global | string | utf-8 | 内部使用的字符串编码和用于 RPC 通信 |
endoffile eof | buffer | boolean | off | 指示在文件末尾找到 CTRL-Z 字符阅读时 |
endofline eol | buffer | boolean | on | 控制和反映当前缓冲区的文件末尾是否以换行符结尾 |
equalalways | global | boolean | on | 打开后,所有窗口都会自动使大小相同拆分或关闭窗口 |
equalprg ep | global or buffer | string | "" | 用于“=”命令的外部程序。 当此选项为空时使用内部格式化函数 |
errorbells eb | global | boolean | off | 按铃(哔哔声或屏幕闪烁)以显示错误消息 |
errorfile ef | global | string | errors.err | QuickFix 模式的错误文件名称 |
errorformat efm | global or buffer | string | 很长一个字符串 | 错误文件中行格式的类似扫描的描述 |
eventignore ei | global | string | "" | 自动命令事件名称的列表 |
eventignorewin eiw | window | string | "" | 类似于 “eventignore”,但适用于特定窗口及其buffers |
expandtab et | buffer | boolean | off | 使用适当数量的空格插入<Tab> |
exrc ex | global | boolean | off | 启用项目本地配置。Nvim 将执行任何 .nvim.lua,.nvimrc 或 .exrc 文件 |
fileencoding fenc | buffer | string | "" | 当前缓冲区的文件内容编码。转换是通过iconv() 或使用 ‘charconvert’ 指定 |
fileencodings fencs | global | string | ”ucs-bom,utf-8,default,latin1” | 这是开始编辑时考虑的字符编码列表现有文件 |
fileformat ff | buffer | string | Windows: “dos”, Unix: “unix” | 这给出了当前缓冲区的<EOL>,用于从文件读取/写入缓冲区 |
fileformats ffs | global | string | Windows: “dos,unix”, Unix: “unix,dos” | 开始编辑新缓冲区,以及将文件读入现有缓冲区 |
fileignorecase fic | global | boolean | 对于文件中大小写的系统,默认打开名称通常被忽略 | 当使用文件名和目录时忽略设置大小写时 |
filetype ft | buffer | string | "" | 文件类型, 设置此选项后,将触发 FileType 自动命令事件 |
fillchars fcs | global or window | string | "" | 填充状态行的字符 |
findfunc ffu | global or buffer | string | "" | 为获取 :find 的文件名而调用的函数命令 |
fixendofline fixeol | buffer | boolean | on | 写入文件且此选项处于打开状态时,文件末尾的 <EOL>如果丢失,将恢复 |
foldclose fcl | global | string | "" | 当设置为“all”时,当光标不在折叠中时,折叠将关闭 |
foldcolumn fdc | window | string | ”0” | 何时以及如何绘制折叠柱 |
foldenable fen | window | boolean | on | 关闭时,所有折叠都打开 |
foldexpr fde | window | string | ”0” | 当 ‘foldmethod’ 时使用的表达式是 “expr”。 为每条线获取其折叠水平 |
foldignore fdi | window | string | ”#“ | 仅当 ‘foldmethod’ 为“indent”时使用。以开头的行“折叠忽略” 中的角色将从周围获得折叠级别线 |
foldlevel fdl | window | number | 0 | 设置折叠级别:级别较高的折叠将被关闭 |
foldlevelstart fdls | global | number | -1 | 在开始编辑窗口中的另一个缓冲区时设置 “折叠级别” |
foldmarker fmr | window | string | ”{{{,}}}“ | 当 ‘foldmethod’ 是 “marker” 时使用的开始和结束标记 |
foldmethod fdm | window | string | manual | 用于当前窗口的折叠类型 |
foldminlines fml | window | number | 1 | 设置可以显示折叠的屏幕行数 |
foldnestmax fdn | window | number | 20 | 设置“缩进”和“语法”的最大折叠嵌套 |
foldopen fdo | global | string | ”block,hor,mark,percent,quickfix,search,tag,undo” | 指定将为哪种类型的命令打开折叠 |
foldtext fdt | window | string | ”foldtext()“ | 用于指定为已关闭的折叠。 上下文设置为设置了 ‘foldexpr’ 的脚本 | |
formatexpr fex | buffer | string | "" | 计算为格式化 gq 行范围的表达式 |
formatlistpat flp | buffer | string | ”^\s*\d+[]:.)}\t ]\s*“ | 用于识别列表标头的模式 |
formatoptions fo | buffer | string | tcqj | 这是描述如何进行自动格式化的字母序列 |
formatprg fp | global or buffer | string | "" | 将用于格式化行的外部程序的名称 |
fsync fs | global | boolean | on | 保存文件后将调用作系统函数 |
gdefault gd | global | boolean | off | substitute”标志“g”默认为打开 |
grepformat gfm | global or buffer | string | ”%f:%l:%m,%f:%l%m,%f %l%m” | “:grep”命令输出的识别格式 |
grepprg gp | global or buffer | string | rg —vimgrep -uu | 用于 :grep 命令的程序 |
guicursor gcr | global | string | ”n-v-c-sm:block,i-ci-ve:ver25,r-cr-o:hor20,t:block-blinkon500-blinkoff500-TermCursor” | 配置每种模式的光标样式 |
guifont gfn | global | string | "" | GUI 版本的字体列表 |
guifontwide gfw | global | string | "" | 用于双角字符的逗号分隔字体列表 |
helpfile hf | global | string | MS-Windows: “$VIMRUNTIME\doc\help.txt” others: “$VIMRUNTIME/doc/help.txt” | 主帮助文件的名称 |
helpheight hh | global | number | 20 | 帮助窗口的初始高度 |
helplang hlg | global | string | "" | 以逗号分隔的语言列表 |
hidden hid | global | boolean | on | 关闭时卸载缓冲区(包括丢失撤消信息) |
history hi | global | number | 10000 | 搜索模式的历史记录数量 |
hlsearch hls | global | boolean | on | 突出显示其所有匹配项 |
icon | global | boolean | off | 打开时,窗口的图标文本将设置为iconstring |
iconstring | global | string | "" | 窗口的图标文本 |
ignorecase ic | global | boolean | off | 忽略搜索模式中的大小写 |
iminsert imi | buffer | number | 0 | 指定在插入模式下是否使用 :lamp 或输入法 (IM) |
imsearch ims | buffer | number | -1 | lmap 或输入法 (IM)输入搜索模式 |
inccommand icm | global | string | nosplit | 当不为空时,显示 :substitute、:smagic、:snomagic 和 user 命令 |
include inc | global or buffer | string | "" | 用于查找包含命令的模式 |
includeexpr inex | buffer | string | "" | 用于转换使用 “include” 找到的字符串的表达式 |
incsearch is | global | boolean | on | 键入搜索命令时,显示键入的模式的位置 |
indentexpr inde | buffer | string | "" | 计算为获得行的正确缩进而计算的表达式 |
indentkeys indk | buffer | string | ”0{,0},0),0],:,0#,!^F,o,O,e” | 在插入模式下键入时导致重新缩进的键列表 |
infercase inf | buffer | boolean | off | 控制补全候选词大小写格式的布尔选项 |
isexpand ise | global or buffer | string | "" | 定义在插入模式下要补全的字符和模式 |
isfname isf | global | string | Windows: | 指定的字符包含在文件名中 |
isident isi | global | string | Windows: | 给出的字符包含在标识符中 |
iskeyword isk | buffer | string | ”@,48-57,_,192-255” | 关键字用于搜索和识别 |
isprint isp | global | string | ”@,161-255” | 给出的字符直接显示在屏幕 |
joinspaces js | global | boolean | off | 使用联接命令在“.”、“?”和“!”后插入两个空格 |
jumpoptions js | global | string | clean | 更改跳转列表行为的单词列表 |
keymap kmp | buffer | string | "" | 键盘映射的名称 |
keymodel km | global | string | "" | 逗号分隔的单词列表, 用于启用键的特殊内容 |
keywordprg kp | global or buffer | string | default ":Man", Windows: ":help" | 用于 K 命令的程序 |
langmap lmap | global | string | "" | 允许将键盘切换为特殊语言模式 |
langmenu lm | global | string | "" | 用于菜单翻译的语言 |
langremap lrm | global | boolean | off | 关闭时设置 ‘langmap’ 不适用于由映射 |
laststatus ls | global | number | 2 | 此选项的值会影响最后一个窗口何时具有状态行 |
lazyredraw lz | global | boolean | off | 设置此选项后,屏幕将不会重绘 |
lhistory lhi | window | number | 10 | 与 ‘chistory’ 类似,但对于与window |
linebreak lbr | window | boolean | off | 如果打开,Vim 将在 ‘breakat’ 中的字符处换行 |
lines | global | number | 24 或终端高度 | Vim 窗口的行数 |
linespace lsp | global | number | 0 | GUI中字符之间插入的像素线数 |
lisp | buffer | boolean | off | Lisp 模式:当 <Enter> 在插入模式下键入时,将缩进设置为Lisp 标准的下一行 |
lispoptions lop | buffer | string | "" | 影响 Lisp 缩进的项目的逗号分隔列表 |
lispwords lw | global or buffer | string | 很长一个字符串 | 逗号分隔的单词列表,这些单词会影响 Lisp 缩进 |
list | window | boolean | off | 列表模式:默认情况下,制表符显示为“>”,尾随空格显示为“-”,以及不可折断的空格字符为“+” |
listchars lcs | global or window | string | ”tab:> ,trail:-,nbsp:+“ | 在 “列表” 模式下和 :list 命令中使用的字符串 |
loadplugins lpl | global | boolean | on | 打开插件时,启动加载插件时会加载脚本 |
magic | global | boolean | on | 更改可在搜索模式中使用的特殊字符 |
makeef mef | global | string | "" | :make 命令的错误文件名称 |
makeencoding menc | global or buffer | string | "" | 用于读取外部命令输出的编码 |
makeprg mp | global or buffer | string | make | 用于“:make”命令的程序 |
matchtime mat | global | number | 5 | 十分之一秒显示匹配的括号,当 ‘showmatch’ 为设置 |
maxfuncdepth mfd | global | number | 100 | 用户函数的最大函数调用深度 |
maxmapdepth mmd | global | number | 1000 | 进行映射但未产生可使用字符的最大次数 |
maxmempattern mmp | global | number | 1000 | 用于模式匹配的最大内存量(以 KB 为单位) |
maxsearchcount msc | global | number | 999 | 搜索计数状态 shm-S 显示的最大匹配数 |
menuitems mis | global | number | 25 | 菜单中使用的最大项目数 |
messagesopt mopt | global | string | ”hit-enter,history:500” | 用于输出消息的选项设置 |
mkspellmem msm | global | string | ”460000,2000,500” | :mkspell 的参数, 调整何时开始压缩词树 |
modeline ml | buffer | boolean | on | 如果 ‘modeline’ 在 ‘modelines’ 上,则给出行数,即检查了设置命令 |
modelineexpr mle | global | boolean | off | 打开时,允许在modeline。 检查选项是否受到’modelineexpr’ |
modelines mls | global | number | 5 | 如果 ‘modeline’ 在 ‘modelines’ 上,则给出行数,即检查了设置命令 |
modifiable ma | buffer | boolean | on | 关闭时,无法更改缓冲区内容 |
modified mod | buffer | boolean | off | 启用时,缓冲区被视为已修改 |
more | global | boolean | on | 打开时,当整个屏幕都填满时,列表会暂停 |
mouse | global | string | nvi | 启用鼠标支持 |
mousefocus mousef | global | boolean | off | 鼠标指针所在的窗口会自动激活 |
mousehide mh | global | boolean | on | 键入字符时鼠标指针将隐藏 |
mousemodel mousem | global | string | popup_setpos | 设置要用于鼠标的模型 |
mousemoveevent mousemev | global | boolean | off | 启用时,鼠标移动事件将传递到输入队列 |
mousescroll | global | string | ”ver:3,hor:6” | 控制滚动的行数/列数 |
mousetime mouset | global | number | 500 | 定义两次鼠标单击之间的最大时间 |
nrformats nf | buffer | string | ”bin,hex” | 用于对数字进行加法和减法 |
number nu | window | boolean | off | 在每行前面打印行号 |
numberwidth nuw | window | number | 4 | 用于行号的最小列数 |
omnifunc ofu | buffer | string | "" | 指定用于插入模式 omni 的功能 |
operatorfunc opfunc | global | string | "" | 此选项指定要由 g@ 运算符调用的函数 |
packpath pp | global | string | ’runtimepath’ | 用于查找包的目录 |
paragraphs para | global | string | ”IPLPPPQPP TPHPLIPpLpItpplpipbp” | 指定分隔段落的 nroff 宏 |
patchexpr pex | global | string | "" | 计算以将补丁应用于文件并生成的表达式 |
patchmode pm | global | string | "" | 当非空时,将保留文件的最旧版本 |
path pa | global or buffer | string | ”.,,“ | 使用 thegf 时将搜索的目录列表 |
preserveindent pi | buffer | boolean | off | 更改当前行的缩进时,保留尽可能多的缩进结构 |
previewheight pvh | global | number | 12 | 预览窗口的默认高度 |
previewwindow pvw | window | boolean | off | 标识预览窗口 |
pumblend pb | global | number | 0 | 为弹出菜单启用伪透明度 |
pumheight ph | global | number | 0 | 弹出菜单中显示的最大项目数 |
pummaxwidth pmw | global | number | 0 | 弹出菜单的最大宽度 |
pumwidth pw | global | number | 15 | 弹出菜单的最小宽度 |
pyxversion pyx | global | number | 3 | 指定用于 pyx* 函数和命令的 python 版本 |
quickfixtextfunc qftf | global | string | "" | 指定用于获取在快速修复和位置列表窗口中显示的文本的函数 |
quoteescape qe | buffer | string | "" | 用于转义字符串中的引号的字符 |
readonly ro | buffer | boolean | off | 如果打开,则写入失败,除非使用 ! |
redrawdebug rdb | global | string | "" | 用于更改重绘工作方式的标志 |
redrawtime rdt | global | number | 2000 | 重新绘制显示的时间(以毫秒为单位) |
regexpengine re | global | number | 0 | 选择默认的正则表达式引擎 |
relativenumber rnu | window | boolean | off | 显示相对于光标位于前面的行的行号 |
report | global | number | 2 | 报告行数更改的阈值 |
revins ri | global | boolean | off | 在插入模式下插入字符将向后工作 |
rightleft rl | window | boolean | off | 显示方向变为从右到左 |
rightleftcmd rlc | window | string | search | 此选项中的每个单词都允许命令行编辑以从右到左的模式运行一组命令 |
ruler ru | global | boolean | on | 显示光标位置的行号和列号 |
rulerformat ruf | global | string | "" | 当此选项不为空时,它确定标尺的内容 |
scroll scr | window | number | 半窗口的高度 | 使用 CTRL-U 和 CTRL-D 命令滚动的行数 |
scrollback scbk | buffer | number | 1000 | 保持在可见屏幕之外的最大行数 |
scrollbind scb | window | boolean | off | 设置此选项后,滚动当前窗口还会滚动其他 ScrollBind 窗口 |
scrolljump sj | global | number | 1 | 当光标离开屏幕时滚动的最少行数(例如,使用“j”) |
scrolloff so | global or window | number | 0 | 保持光标上方和下方的最小屏幕行数 |
scrollopt sbo | global | string | ”ver,jump” | 指定了’scrollbind’ 窗口应该有行为 |
sections sect | global | string | ”SHNHH HUnhsh” | 指定分隔部分的 nroff 宏 |
selection sel | global | string | inclusive | 定义选择的行为 |
selectmode slm | global | string | "" | 指定何时开始选择模式而不是视觉模式 |
sessionoptions ssop | global | string | ”blank,buffers,curdir,folds,help,tabpages,winsize,terminal” | 更改 :mksession 命令的效果 |
shada sd | global | string | Win32: !,‘100,<50,s10,h,rA:,rB: others: !,‘100,<50,s10,h) | shada 文件在启动时读取并写入 |
shadafile sdf | global | string | "" | 当不为空时,覆盖用于 shada |
shell sh | global | string | $SHELL or “sh”, Win32: “cmd.exe” | 要用于的 shell 的名称 ! 和 :! 命令 |
shellcmdflag shcf | global | string | default “-c”; Windows: “/s /c” | Flag 传递给 shell 以执行 ”!” 和 ”:!” 命令 |
shellpipe sp | global | string | ”>”, ” | tee”, ”|& tee” or “2>&1| tee” | 用于将“:make”命令的输出放入错误文件 |
shellquote shq | global | string | default ""; Windows, when ‘shell’ contains “sh” somewhere: """ | 引用字符,放在传递给 shell 的命令周围 |
shellredir srr | global | string | ”>”, ”>&” or ”>%s 2>&1” | 用于将过滤器命令的输出放在临时文件 |
shellslash ssl | global | boolean | on | 展开文件名时使用正斜杠 |
shelltemp stmp | global | boolean | off | 将临时文件用于 shell 命令 |
shellxescape sxe | global | string | "" | 当 ‘shellxquote’ 设置为 “(” 时,此处列出的字符选项将使用“^”字符转义 |
shellxquote sxq | global | string | default "", Windows: """ | 放在传递给 shell 的命令周围 |
shiftround sr | global | boolean | off | 将缩进舍入为 ‘shiftwidth’ 的倍数 |
shiftwidth sw | buffer | number | 8 | 构成一级(自动)缩进的列数 |
shortmess shm | global | string | ltToOCF | 助于避免由文件引起的所有按回车提示 |
showbreak sbr | global or window | string | "" | 要放在已换行行首的字符串 |
showcmd sc | global | boolean | on | 显示(部分)命令 |
showcmdloc sloc | global | string | last | 此选项可用于显示(部分)输入的命令 |
showfulltag sft | global | boolean | off | 在插入模式下完成单词时,从标签文件,同时显示标签名称和整理的搜索形式 |
showmatch sm | global | boolean | off | 插入支架后,短暂跳转到匹配的支架 |
showmode smd | global | boolean | on | 显示Vim模式 |
showtabline stal | global | number | 1 | 指定带有标签页标签的行何时显示 |
sidescroll ss | global | number | 1 | 水平滚动的最小列数 |
sidescrolloff siso | global or window | number | 0 | 要保持在左侧和如果设置了 ‘nowrap’,则为光标的右侧距离 |
signcolumn scl | window | string | auto | 何时以及如何绘制标志栏 |
smartcase scs | global | boolean | off | 如果搜索模式包含大写字符,则覆盖“ignorecase”选项 |
smartindent si | buffer | boolean | off | 开始新行时进行智能自动缩进 |
smarttab sta | global | boolean | on | 如果光标位于前导空格中。 <BS> 键具有相反的效果 |
smoothscroll sms | window | boolean | off | 滚动适用于屏幕线 |
softtabstop sts | buffer | number | 0 | 创建软制表位 |
spell | window | boolean | off | 拼写检查 |
spellcapcheck spc | buffer | string | ”[.?!]_[])’“\t ]+“ | 用于定位句子结尾的模式 |
spellfile spf | buffer | string | "" | 为 zg 和 zw 添加单词的单词列表文件的名称 |
spelllang spl | buffer | string | en | 逗号分隔的单词列表列表 |
spelloptions spo | buffer | string | "" | 拼写检查选项的逗号分隔列表 |
spellsuggest sps | global | string | best | 用于拼写建议的方法 |
splitbelow sb | global | string | cursor | 此选项的值决定了打开时的滚动行为 |
splitright spr | global | boolean | off | 当“打开”时,多数移动命令将光标移动到第一个行的非空白 |
statuscolumn stc | window | string | "" | 将区域的内容确定为窗口的一侧 |
suffixes su | global | string | ”.bak,~,.o,.h,.info,.swp,.obj” | 当多个文件时,具有这些后缀的文件的优先级较低匹配通配符 |
suffixesadd sua | buffer | string | "" | 逗号分隔的后缀列表 |
swapfile swf | buffer | boolean | on | 使用交换文件作为缓冲区 |
switchbuf swb | global | string | uselast | 控制在缓冲区之间切换时的行为 |
synmaxcol smc | buffer | number | 3000 | 用于搜索语法项的最大列 |
syntax syn | buffer | string | "" | 加载具有此名称的语法 |
tabclose tcl | global | string | "" | 控制关闭选项卡页面时的行为 |
tabline tal | global | string | "" | 确定选项卡页的内容线条 |
tabpagemax tpm | global | number | 50 | -p 命令行要打开的最大选项卡页数 |
tabstop ts | buffer | number | 8 | 定义用于显示“水平”选项卡的列倍数字符 |
tagbsearch tbs | global | boolean | on | 搜索标签的方法 |
tagcase tc | global or buffer | string | ”followic” | 指定在搜索标记时如何处理大小写 |
tagfunc tfu | buffer | string | "" | 执行标记搜索的函数 |
taglength tl | global | number | 0 | 如果不为零,则标记在最多此字符数内具有重要意义 |
tagrelative tr | global | boolean | on | 在另一个目录中使用标签文件则该目录中的文件名tags 文件相对于 tags 文件所在的目录 |
tags tag | global or buffer | string | ”./tags;,tags” | 标记命令的文件名,用空格或逗号分隔 |
tagstack tgst | global | boolean | on | 启用时, 标签堆栈将正常使用 |
termbidi tbidi | global | boolean | off | 终端负责文本的双向性 |
termguicolors tgc | global | boolean | off | 在 TUI 中启用 24 位 RGB 颜色 |
termpastefilter tpf | global | string | ”BS,HT,ESC,DEL” | 指定控制字符的逗号分隔选项列表 |
termsync | global | boolean | on | 如果主机终端支持,则缓冲所有屏幕更新 |
textwidth tw | buffer | number | 0 | 要插入的文本的最大宽度 |
thesaurus tsr | global or buffer | string | "" | 用于查找单词的文件名列表 |
thesaurusfunc tsrfu | global or buffer | string | "" | 指定用于完成同义词库的函数 |
tildeop top | global | boolean | off | 打开时:波浪号命令“~”的行为类似于运算符 |
timeout to | global | number | 1000 | 此选项和“timeoutlen”决定收到部分映射键序列时的行为 |
timeoutlen tm | global | number | 1000 | 等待映射序列完成的时间 |
title | global | boolean | off | 启用时,窗口的标题将设置为 ‘titlestring’ |
titlelen | global | number | 85 | 给出用于窗口长度的 “列” 的百分比标题 |
titleold | global | string | "" | 如果不为空,则此选项将用于在以下情况下设置窗口标题退出 |
titlestring | global | string | "" | 窗口标题 |
ttimeout | global | boolean | on | 此选项和“ttimeoutlen”决定了 TUI 接收到部分键码序列时的行为 |
ttimeoutlen ttm | global | number | 50 | 等待键代码序列完成的时间(以毫秒为单位) |
undodir udir | global | string | ”$XDG_STATE_HOME/nvim/undo//“ | 撤消文件的目录名称列表 |
undofile udf | buffer | boolean | off | 当打开时,Vim 会自动将撤消历史记录保存到撤消文件中 |
undolevels ul | global or buffer | number | 1000 | 可以撤消的最大更改数 |
undoreload ur | global | number | 10000 | 保存整个缓冲区,以便在重新加载时撤消 |
updatecount uc | global | number | 200 | 输入这么多字符后,交换文件将写入磁盘 |
updatetime ut | global | number | 4000 | 如果没有输入任何内容,则交换文件将是写入磁盘 |
varsofttabstop vsts | buffer | string | "" | 定义可变宽度软制表位 |
vartabstop vts | buffer | string | "" | 定义可变宽度制表位 |
verbose vbs | global | number | 0 | 设置详细程度 |
verbosefile vfile | global | string | "" | 如果不为空,则所有消息都写入具有此名称的文件中 |
viewdir vdir | global | string | ”$XDG_STATE_HOME/nvim/view//“ | 存储 :mkview 文件的目录名称 |
viewoptions vop | global | string | ”folds,cursor,curdir” | 更改 :mkview 命令的效果 |
virtualedit ve | global | string | "" | 控制光标是否可以移动到“虚拟列”或“无字符位置” |
visualbell vb | global | boolean | off | 使用视觉铃铛而不是哔哔声 |
warn | global | boolean | on | 当缓冲区发生改变时使用 shell 命令时发出警告消息 |
whichwrap ww | global | string | ”b,s” | 允许向左/向右移动光标的指定键移动到上一行/下一行 |
wildchar wc | global | number | <Tab> | 在命令行中启动通配符扩展时必须输入的字符 |
wildcharm wcm | global | number | 0 | ’wildcharm’ 的工作方式与 ‘wildchar’ 完全相同不过它是在宏中使用时被识别 |
wildignore wig | global | string | "" | 文件模式列表。 与其中之一匹配的文件展开通配符 |
wildignorecase wic | global | boolean | off | 当设置大小写时, 在补全文件名和目录时被忽略 |
wildmenu wmnu | global | boolean | on | 命令行补全在增强的模式 |
wildmode wim | global | string | full | 用于使用 ‘wildchar’ 指定的字符的完成模式 |
wildoptions wop | global | string | ”pum,tagfile” | 更改 cmdline-completion 完成方式的单词列表 |
winaltkeys wak | global | string | menu | 仅在 Win32 中使用,某些 GUI 版本允许使用 ALT 访问菜单条目 |
winbar wbr | global or window | string | "" | 当非空时,此选项启用窗口栏并确定其内容 |
winblend winbl | window | number | 0 | 为浮动窗口启用伪透明度 |
winborder | global | string | "" | 定义浮动窗口的默认边框样式 |
window wi | global | number | 屏幕高度-1 | 用于 CTRL-F 和 CTRL-B 的窗口高度 |
winfixbuf wfb | window | boolean | off | 如果启用,则窗口及其显示的缓冲区将配对 |
winfixheight wfh | window | boolean | off | 打开或关闭窗户时保持窗户高度 |
winfixwidth wfw | window | boolean | off | 打开或关闭窗户时保持窗户宽度 |
winheight wh | global | number | 1 | 当前窗口的最小行数 |
winhighlight winhl | window | string | "" | 窗口本地突出显示 |
winminheight wmh | global | number | 1 | 窗口的最小高度 |
winminwidth wmw | global | number | 1 | 窗口的最小宽度 |
winwidth wiw | global | number | 20 | 当前窗口的最小列数 |
wrap | window | boolean | on | 自动换行 |
wrapmargin wm | buffer | number | 0 | 从右侧窗口边框开始的字符数 |
wrapscan ws | global | boolean | on | 搜索环绕文件末尾 |
write | global | boolean | on | 允许写入文件 |
writeany wa | global | boolean | off | 允许写入任何文件 |
writebackup wb | global | boolean | on | 在覆盖文件之前进行备份 |
writedelay wd | global | number | 0 | 仅与 ‘redrawdebug’ 一起生效, 每行或每次刷新后等待的毫秒数 |