2023
better UTF-16
support
Add strutf16len()
and utf16idx()
, and add flags in byteidx(),byteidxcomp()
and , in the document.charidx()
utf16
内置.txt
Add to'crypymethod' xchacha20v2
Basically xchacha20
the same as, but more resistant libsodium
to change.
2022
Add to"smoothscroll"
Use the mouse to scroll 换行
the screen rows instead 文本行
.
Add to "statusline"
and"tabline"
'showcmdloc',%S
controlled "showcmd"
, 显示位置
or added to 状态行或标签行
.
Support kitty-keyboard-protocol
keyboard protocol, add'keyprotocol'
To KiTTY
the terminal; better handling 修改键
.
Add WinResized
event
Event窗口
fired when the size is changed .
WinScrolled
Fits inactive windows, more information available
Previously, it only fit 当前窗口
, and was not 更改内容
informative, scrolling .
Add options to col()
andcharcol()
winid
另一个
Get 光标列
, col , char from window .
readblob()
Add the offset
and parameters in size
to allow reading character devices
Before, it was always read 整个文件
, read block .
Add to'lispoptions'
Settings lispoptions=indentexpr:1
, 'lisp'
allow use when enabled 'indentexpr'
.
Add toTextChangedT
Fires after text in a 终端
window更改
.
"shortmess"
add in"C"
Suppress messages during 补全(ins-completion)
process
The sound feature macOS
works on
sound_playevent()
It fits here now macOS
.
Add to:echowindow
Show message in 弹窗
; Also add popup_findecho()
here.here
"fillchars"
Add the last line in
Sets the character when 'display'
containing fillchars
or .truncate
使用
Add to"splitkeep"
When controlling 打开,关闭或调整
the level .分割
滚动行为
matchaddpos()
Many matches can be added
Previously the limit was 8, here .
dummy text
Allow adding dummy text to the buffer.
Give up support for WindowsXP
peaceVista
Add tokeytrans()
Convert 转义序列
to string, here .
Add to:defer
函数
Run code on exit , here .
Add flags to writefile()
andmkdir()
'D'
On exit 函数
, delete 文件或目录
, 1 , 2 .
窗口
Set cursor shape in terminal
termcap-cursor-shape
Suitable 窗口
, here .
Add togetscriptinfo()
:scriptnames
, but more convenient for scripts, here , 1 .
Add tosetcmdline()
From 脚本
Settings 命令行内容和光标位置
, here .
Add toindexof()
Use 回调函数
, to find a value in a list, here .
Support 双,点和虚线
underline
The underline attribute can :highlight
be used in 双,点和虚
.
Add tovirtcol2col()
虚列
Take it from 字节索引
, here .
Add <<
ampersand >>
_
按位移位
symbol.
Add toautocmd_add(),autocmd_get(),autocmd_delete()
autocmd
Functions for operations , add , take , delete .
'formatoptions'
Add / in
When used on rows with 内联注释
(only ) , do not insert .'cindent'
o
\\
addgetcmdcompltype(),getcmdscreenpos()
Get 当前命令行
the complement of 类型和位置
1 , 2 .
Add string interpolation
$
When used as a string 前缀
, {...}
internal 式
; such as
$"Hello, {$USER} at {strftime('%c', localtime())}"
add column to"breakindentopt"
In 指定列
the 缩进
flexible packaging industry.
restore mapping
mapset()
Accepts returned from maparg()
or allowing for easy mapping. 1 , 2 , 3maplist()
字典
保存和恢复
Add toisabsolutepath()
Check 路径
if it is 绝对路径
, 1 .
Add tomaplist()
Get all映射
lists.here
Add tohl-CurSearch
高亮
Current.here 搜索匹配项
_ _
Allowed to heredoc
be used in
If added eval
, expressions for heredoc
middle presses are allowed =expr
:
let lines =<< trim eval END
See the file `=$HOME`/.vimrc
END
Support channelLSP
通道
Supported in 语言-服务器-协议(LSP)
.
Add to--log
启动
Start recording when .
WinScrolled
event
滚动
Fired after window content.
Add :profile
stop and dump
(previously only on exit Vim
), allows 停止
analysis and 配置文件
dumping 文件
into. here
Unix
Open channel on domain socket
ch_open("unix:/tmp/socket")
Add "fuzzy"
to "wildoptions"
_
Command line "模糊"
completion.
DirChangedPre
event
Triggered before directory 更改
.
Add and "errorformat"
_%e
%k
尾行和列
.
will "pum:"
be added to'wildoptions'
Yes 命令行补全
, show 弹出菜单
.
add "timeout"
to"spellsuggest"
Limit 搜索
spell suggestion time; previously it was always 5000
milliseconds.
P in visual mode
( ) text in 可视
mode without copying the text into."放"
粘贴
已删除
未命名寄存器
win_move_separator(),win_move_statusline()
移动
and resize the window. 1 , 2
2021
内置.txt
eval.txt
split into内置.txt
*expr
Allow local script functions in options
Now available as setdiffexpr=s:MyDiffExpr()
.
Add to:argdedeupe
参数列表
Duplicate items from 删除
.
reduce(),filter()
and map()
works on strings
Assign a value λ
to an option with a function
'operatorfunc','tagfunc','completefunc','omnifunc'
and 'imactivatefunc'
now acceptable λ
.
Add tohl-CursorLineSign,hl-CursorLineFold
Adjust " 'cursorline'
" 符号高亮
.
Add tohlget(),hlset()
Programming operations 高亮
. 1 , 2
Add WinClosed
event
关闭
Triggered when the window is opened.
Add tov:colornames
Maps 颜色名
to hexadecimal code.
Add to"guiligatures"
Supported for GTKGUI
use in 连字
.
Add to'thesaurusfunc'
同义
Completion function.
ModeChanged
event
模式
Triggered on change.here
Add multiple spaces to"listchars"
No matter where it is, 两个或多个
spaces are displayed.
Add todigraph_get(),digraph_getlist(),digraph_set(),digraph_setlist()
列举并定义
Dichotomy of functions. 1
2
3
4
add list to"breakindentopt"
Extra indent (with "formatlistpat"
settings) 编号列表或项目符号
lines matching the list .添加
Add \%.l,\%<.l
and \%>.l
pattern
Matches 光标
the current line; see /\%l
here .
Add to'cryptmethod'=xchaha20
libsodium
of 更安全加密
.
Add tozp,zP,zy
zp
Without 尾随空格
block mode 粘贴
, zy
without 尾随空格
copying.
Add to{%
"Status Line"
{%expr%}
According to "statusline"
format string 重新计算
.
:vimgrep
Add f flag in
"模糊"
Matching :vimgrep
results.Here _
Add to"autoshelldir"
终端
Automatically change the directory in the window Vim
.
Add tostrcharlen()
Separate combination symbols, take 串计数的长度
here .
Traverse string
The loop string is 'for char in "str"'
; loops use combinators 按代码点
.
Expand"fillchars"
New values: rows represented by "eob"
changes , and change flags. Can be set on a per-window basis (previously always ). Also allowed for use in and .(~)
不存在
"foldopen","foldclose"
"foldsep"
"foldcolumn"
"fillchars"
全局
"fillchars"
"statusline"
多字节符
add followwrap
to"diffopt"
Yes 差异窗口
, don't reset "换行"
.
Add tofullcommand()
缩写
Take from 完整命令名
(eg :s->:substitute
), here
lead
: "ListChars"
in
When set "list"
, 高亮
leading spaces.
Detect focus events in terminal
FocusGain
and FocusLost
autocommands can work 终端
within . See xterm-focus-event
.
:sleep!
休息并隐藏
cursor.
Add tocharcol(),getcharpos(),setcharpos(),getcursorcharpos(),setcursorcharpos()
col(),getpos(),setpos(),getcurpos(),cursor()
related 多字节
versions.
2020
addcharidx()
Convert 字节索引
to 符索引
.
add VimSuspend
andVimResume
暂停/恢复
Triggers when; only on <C-z>
, not SIGSTP/SIGCONT
signals. 1 , 2
Add to<Cmd>
Do not use this更改
so that there is no need to use or , always in the mode . For example,键映射
模式
<C-u>
<C-o>
插入或可视
映射
有效
noremap<C-q><Cmd>:normal!K<CR>
:sort
and sort()
can be sorted locally relevantly
:sortl
or sort(...,'l')
.
matchfuzzy(),matchfuzzypos()
"模糊"
match.
Add toInsertLeavePre
离开
Trigger here before insert mode .
??symbol
echo value ??
If the value is empty, use the above.
Add togettext()
Available for翻译
plugins.Here
Add tosetcellwidths(),charclass()
宽度歧义符
Coverage is allowed 显示宽度
.
Add g<Tab>;
support :tabnext#
, :tabclose#
etc.
g<Tab>
Returns 上次访问的选项卡
the reference :tab*
in the command .#
上次访问的选项卡
expand('<SID>')
Useful for *func
and settings, such as*expr
let &includexpr = expand('<SID>') .. 'fun()'
to uses:fun()
Add to"quickfixtextfunc"
Customized ; can also be passed here快修窗口
according to parameters文本内容
setqflist()
Sort for readir(),readirex()
adding
Add to readdir()
and to sort. here and herereaddirex()
可选参数
控制
Add toterminalprops()
List 此终端
supported functions .
Add to'spelloptions'
唯一
The accepted values are words 驼峰(camel)
to spell check CamelCase
.
Add toSigUSR1autocmd
Events to SIG_USR1
detect .
Add toflatten()
flatten list
Add togetreginfo()
Returns register information details; can be passed setreg()
here恢复
.
Add tosearchcount()
Get 当前搜索
relevant details .
Allow setting underline color in terminal
Can be set :highlight
using , available if enabled .ctermul
下划线颜色
'termguicolors'
guisp
Add toreduce()
化简
List as single value here .
Add toreadirex()
Similar to readdir()
, but returns 带属性
a dictionary (i.e. Unix
above stat()
).
Add togetmarklist()
Similar :marks
, take 标记列表
here
add unsigned
to"nrformats"
数字
Ignore the preceding -
and always treat it <C-a>
as <C-x>
the positive of the sum so 1985-06-18
that 正常
it works as above.
Add tomapset()
Map from script 设置
, and 恢复
mappable, here .
Lua
Call Vim
function from
vim.call("fun_name", "arg")
vim.fn.fun_name("arg")
Lua
Call the function from Vim
.
IPv6
Support in channels
IPv6
Support in channels
Add toechoraw()
No processing required, output 串
to terminal; can be used to send 转义码
, here .
Add optional error code to:cquit
Use 指定代码
exit instead of always use 1
. Added v:exiting
in 8.2.2070
.
2019
rand()
andsrand()
interrupt()
Aborted运行
script.
strptime()
解析
Time string here
:terminal ++shell
shell
Run the:terminal
command in.here
v:argv
Vim
used when calling 命令行参数
.
Add togM
Move 行的中间
here .
hl-LineNrAbove,hl-LineNrBelow
Highlighted "relativenumber"
when setting .光标上下方
行号
Add to'cursorlineopt'
更多控制
How to display "光标"
.
Borders and alignment'completepopup'
Control 补全弹出
menu 更多选项
.
"completeopt"
Pop-ups in
(Alternative to press 预览窗口
) 弹窗
Show 额外
completion information in .
:spellrare
Mark words by rarity in spell files .
->
symbol
expr->fun(args)
is fun(expr, args)
a quick way to improve readability:
[1, 2]->map({
_, v -> v + 1})
see method
Pop-ups
弹窗
Similar 补全窗口
, but can be controlled to VimScript
a moderate 更大
degree. See popup "previewpopup"
. This is still an experimental feature.
"Complete slash"
Override 'shellslash'
to complete.
#{}
dictionary annotation
The notation is the same as a normal dictionary except that it 键值
is not required :引号
#{}
{}
表示法
#{
foo: "bar"}
sound function
Playable sound; see sound_playevent()
.
v:option_command,v:option_oldlocal,v:option_oldglobal
Improved OptionSet
events.
:constant
Constant , equivalent to the following
:let v = 1 | :lockvar v
win_execute()
in the context of the specified windowexecute()
.
"wincolor"
(warm color)
Yes 此窗口
, use it 高亮组
instead of hl-Normal
.
g:actual_curwin
,g:statusline_winid
When running in " 状态行
"( %{expr}
) .表达式
临时设置
:let=<<
Heredoc
Assignment, here :
let text =<< trim END
text
END
text attribute
Assigned 元数据
to , as an alternative to syntax highlighting. See . This is still the 缓冲
case .文本
Vim
textprop
实验性功能
listener_add()
A callback缓冲
called when a change is added .
Default values for function parameters
Such as function Fun(value=10)
. See optional-function-argument
.
:xrestore
重启
重新连接
Arrive later X服务器
.
environ(),getenv()
andsetenv()
处理
environment variables, 1 2 3 .
chdir()
Use the 域和恢复
capability 更改
catalog.
:cbefore,:cafter
Browse 光标
before and after 错误
.
Show matching locations when searching
When n is used "S"
and is not in "shortmess"
the middle tense, it is displayed "3/44"
.
:cabove,:cbelow,:labove,:lbelow
Browse 光标
related errors.
Control 窗口
font weight on
"guifont"
Used in to "W"
control 窗口
font weight on. See gui-font
.
Tab-local
Table of contents
See.similar directory :tcd
with .:lcd
window-local
v:
Prefix is required
In the past, counting was also possible. :scriptversion>=3
At that time , v:
a prefix was required.
winnr()
Add more parameters to
Find the neighbor window .
CompleteChanged
event
After every change " 插入模式
" 补全
menu, here .
str2list()
andlist2str()
按字节列表
Conversion 串
, and vice versa.
readdir()
Get 目录
content here .
:scriptversion
Specify VimScript
compatible versions.
..
symbol
串
Concatenation symbols, since one .
is ambiguous, "a"..'b'
and 'a'."b"
are the same. Also added ..=
.
:autocmd
Parameters ++once
_
Only run once 自动命令
, such as:
au CursorMoved * ++once :echom 'ONCE'
Add window ID
parameters tomatchdelete(),clearmatches(),getmatches(),setmatches()
complete_info()
Get information about the current completion .
rubyeval()
Calculation Ruby
formula.
CTRL-W_gt
key combination, CTRL-W_gT
key combination
Like gt
and gT
switch tabs. Mainly used to 终端窗口
switch from.
*=,/=,%=
like,let var*=2
a:
variables are immutable
Previously, variables could sometimes be changed a:
.
[:ident:], [:keyword:], [:fname:]
The third character allowed "listchars"
in"tab:"
set listchars=tab:(_)
As above, 按制表符
set 最后符
the settings 第三个符
and press to (______)
display tabs.
Blob
type
Blob
Stores text starting with, as in 二进制数据
. See here .Blob
0z
0zDEADBEEF
blob
"FormatOptions"
"p"
logo in
Not in the 句点
back .单个空格
换行
:redrawtabline
"tabline"
Redraw after changes tabline
(for plug-ins).
sign_place(),sign_unplace()
wait
Allow functions and commands to redefine themselves
In the past, functions always had to be added !
to 函数
. Now it is smarter, and it allows overwriting . That is, in or , there is no need or addition anymore.覆盖
相同名字
Vim
函数
自身
vimrc
插件
自动加载
!
:filter
Support more commands
:tlmenu
终端
of 弹出菜单
.
include xdiff
libraries
Include diff
libraries without dependencies 外部工具
to improve diff
quality. Many new "diffopt"
settings like:
set diffopt+=internal,algorithm:patience
It's a very good setup.
"\
继续行注释
;See line-continuation-comment
:
au FileType git
"\ Go to commit.
\ nnoremap <Leader>g :exe printf(":!cd ~/src/vim && git diff %s^\!", split(getline("."), ' ')[1])<CR>
"\ Delete commit.
\| nnoremap <Leader>d :call search('^commit ', 'bc') \| :exe 'd' . (search('^commit ', 'n') - line("."))<CR>
cfilter
plug-in
filter快修/位置列表
'vartabstop','varsofttabstop'
Variable 制表位宽度
, such as set vartabstop=4,8
making the first one 制表符
a 4个
space and the rest as 8个
spaces.
OptionSetautocmd
Fires whenever 设置
an option is selected.
prompt buffering
Mainly used to 作业
provide 用户输入
.
Allowed :unlet
_$ENV
取消
It couldn't really be set before 环境变量
(just set to 空串
).
CTRL-R CTRL-L
In 命令行
, 缓冲
insert rows from
job_info()
List all jobs without parameters
mkdir('p')
Does not fail if directory already exists
Add terminal API
.
See terminal-api
here .
trim()
clear 空格
; must be used before substitute()
, here .
will "!"
be added to"guioptions"
For !shell
commands, use Vim
a terminal window.
terminal menu
Make :popup
and right click and 终端
work in.
窗口
24
Bit color in console
See "termguicolors"
.
‘pumwidth’
补全
of the menu 最小宽度
.
DirChanged
event
(Use :cd,:lcd
etc. 目录
when changed, [here] 9https://vimhelp.org/autocmd.txt.html#DirChanged)
CmdlineChanged
event
In 命令行
, 更改
after text, here .
2017
TextYankPost
event
复制或删除
After the text, here .
win_screenpos()
.
Get 窗口
location here .
CmdlineEnter,CmdlineLeave
进入和离开
When using the command line. 1 , 2
:terminal
--clean,'viminfofile'
No plug-ins are needed, 默认
just start using settings Vim
.
"cinoptions"
E mark in
Indent extern
blocks 设置
.
'pyxversion'
,:pythonx
Make it easier to run code in Python2
and out of available code.3
Python