*version8.txt* For Vim version 8.2. Last change: 2021 Jul 24
VIM REFERENCE MANUAL by Bram Moolenaar
*vim8* *vim-8* *version-8.0* *version8.0*
Welcome to Vim 8! A large number of bugs have been fixed and several nice
features have been added. This file mentions all the new items and changes to
existing features since Vim 7.4. The patches up to Vim 7.4 can be found here:
|vim-7.4|.
Use this command to see the full version and features information of the Vim
program you are using: >
:version
NEW FEATURES |new-8|
Vim script enhancements |new-vim-script-8|
Various new items |new-items-8|
INCOMPATIBLE CHANGES |incompatible-8|
IMPROVEMENTS |improvements-8|
COMPILE TIME CHANGES |compile-changes-8|
PATCHES |patches-8|
VERSION 8.1 |version-8.1|
Changed |changed-8.1|
Added |added-8.1|
Patches |patches-8.1|
VERSION 8.2 |version-8.2|
Changed |changed-8.2|
Added |added-8.2|
Patches |patches-8.2|
See |vi_diff.txt| for an overview of differences between Vi and Vim 8.0.
See |version4.txt|, |version5.txt|, |version6.txt| and |version7.txt| for
differences between other versions.
*vim-changelog*
You can find an overview of the most important changes (according to Martin
Tournoij) on this site: https://www.arp242.net/vimlog/
==============================================================================
NEW FEATURES *new-8*
First an overview of the more interesting new features. A comprehensive list
is below.
Asynchronous I/O support, channels ~
Vim can now exchange messages with other processes in the background. This
makes it possible to have servers do work and send back the results to Vim.
See |channel-demo| for an example, this shows communicating with a Python
server.
Closely related to channels is JSON support. JSON is widely supported and can
easily be used for inter-process communication, allowing for writing a server
in any language. The functions to use are |json_encode()| and |json_decode()|.
This makes it possible to build very complex plugins, written in any language
and running in a separate process.
Jobs ~
Vim can now start a job, communicate with it and stop it. This is very useful
to run a process for completion, syntax checking, etc. Channels are used to
communicate with the job. Jobs can also read from or write to a buffer or a
file. See |job_start()|.
Timers ~
Also asynchronous are timers. They can fire once or repeatedly and invoke a
function to do any work. For example: >
let tempTimer = timer_start(4000, 'CheckTemp')
This will call the CheckTemp() function four seconds (4000 milliseconds)
later. See |timer_start()|.
Partials ~
Vim already had a Funcref, a reference to a function. A partial also refers
to a function, and additionally binds arguments and/or a dictionary. This is
especially useful for callbacks on channels and timers. E.g., for the timer
example above, to pass an argument to the function: >
let tempTimer = timer_start(4000, function('CheckTemp', ['out']))
This will call CheckTemp('out') four seconds later.
Lambda and Closure ~
A short way to create a function has been added: {args -> expr}. See |lambda|.
This is useful for functions such as `filter()` and `map()`, which now also
accept a function argument. Example: >
:call filter(mylist, {idx, val -> val > 20})
A lambda can use variables defined in the scope where the lambda is defined.
This is usually called a |closure|.
User defined functions can also be a closure by adding the "closure" argument
|:func-closure|.
Packages ~
Plugins keep growing and more of them are available than ever before. To keep
the collection of plugins manageable package support has been added. This is
a convenient way to get one or more plugins, drop them in a directory and
possibly keep them updated. Vim will load them automatically, or only when
desired. See |packages|.
New style tests ~
This is for Vim developers. So far writing tests for Vim has not been easy.
Vim 8 adds assert functions and a framework to run tests. This makes it a lot
simpler to write tests and keep them updated. Also new are several functions
that are added specifically for testing. See |test-functions|.
Window IDs ~
Previously windows could only be accessed by their number. And every time a
window would open, close or move that number changes. Each window now has a
unique ID, so that they are easy to find. See |win_getid()| and |win_id2win()|.
Viminfo uses timestamps ~
Previously the information stored in viminfo was whatever the last Vim wrote
there. Now timestamps are used to always keep the most recent items.
See |viminfo-timestamp|.
Wrapping lines with indent ~
The 'breakindent' option has been added to be able to wrap lines without
changing the amount of indent.
Windows: DirectX support ~
This adds the 'renderoptions' option to allow for switching on DirectX
(DirectWrite) support on MS-Windows.
GTK+ 3 support ~
The GTK+ 3 GUI works just like GTK+ 2 except for hardly noticeable technical
differences between them. Configure still chooses GTK+ 2 if both 2 and 3 are
available. See src/Makefile for how to use GTK+ 3 instead. See
|gui-x11-compiling| for other details.
Vim script enhancements *new-vim-script-8*
-----------------------
In Vim script the following types have been added:
|Special| |v:false|, |v:true|, |v:none| and |v:null|
|Channel| connection to another process for asynchronous I/O
|Job| process control
Many functions and commands have been added to support the new types.
On some systems the numbers used in Vim script are now 64 bit. This can be
checked with the |+num64| feature.
Many items were added to support |new-style-testing|.
printf() now accepts any type of argument for %s. It is converted to a string
like with string().
Various new items *new-items-8*
-----------------
Visual mode commands: ~
|v_CTRL-A| CTRL-A add N to number in highlighted text
|v_CTRL-X| CTRL-X subtract N from number in highlighted text
|v_g_CTRL-A| g CTRL-A add N to number in highlighted text
|v_g_CTRL-X| g CTRL-X subtract N from number in highlighted text
Insert mode commands: ~
|i_CTRL-G_U| CTRL-G U don't break undo with next cursor movement
Cmdline mode commands: ~
|/_CTRL-G| CTRL-G move to the next match in 'incsearch' mode
|/_CTRL-T| CTRL-T move to the previous match in 'incsearch' mode
Options: ~
'belloff' do not ring the bell for these reasons
'breakindent' wrapped line repeats indent
'breakindentopt' settings for 'breakindent'.
'emoji' emoji characters are considered full width
'fixendofline' make sure last line in file has <EOL>
'langremap' do apply 'langmap' to mapped characters
'luadll' name of the Lua dynamic library
'packpath' list of directories used for packages
'perldll' name of the Perl dynamic library
'pythondll' name of the Python 2 dynamic library
'pythonthreedll' name of the Python 3 dynamic library
'renderoptions' options for text rendering on Windows
'rubydll' name of the Ruby dynamic library
'signcolumn' when to display the sign column
'tagcase' how to handle case when searching in tags files
'tcldll' name of the Tcl dynamic library
'termguicolors' use GUI colors for the terminal
Ex commands: ~
|:cbottom| scroll to the bottom of the quickfix window
|:cdo| execute command in each valid error list entry
|:cfdo| execute command in each file in error list
|:chistory| display quickfix list stack
|:clearjumps| clear the jump list
|:filter| only output lines that (do not) match a pattern
|:helpclose| close one help window
|:lbottom| scroll to the bottom of the location window
|:ldo| execute command in valid location list entries
|:lfdo| execute command in each file in location list
|:lhistory| display location list stack
|:noswapfile| following commands don't create a swap file
|:packadd| add a plugin from 'packpath'
|:packloadall| load all packages under 'packpath'
|:smile| make the user
没有合适的资源?快使用搜索试试~ 我知道了~
GIT 压缩包 适用于压缩包式安装git
共2000个文件
vim:1475个
pm:660个
pl:557个
5星 · 超过95%的资源 需积分: 5 18 下载量 166 浏览量
2022-06-18
10:13:56
上传
评论
收藏 89.45MB 7Z 举报
温馨提示
GIT 压缩包 适用于压缩包式安装git
资源详情
资源评论
资源推荐
收起资源包目录
GIT 压缩包 适用于压缩包式安装git (2000个子文件)
COPYING.LGPLv2.1 26KB
ccfilter.1 2KB
shtags.1 2KB
maze_5.78 626B
Abidjan 141B
Accra 2KB
Acre 189B
ACT 185B
Adak 8KB
addgnupghome 3KB
Addis_Ababa 184B
Adelaide 8KB
Aden 166B
ssl_write_all.al 6KB
sslcat.al 3KB
ssl_read_until.al 3KB
https_cat.al 3KB
new_x_ctx.al 2KB
do_httpx3.al 2KB
open_tcp_connection.al 1KB
tcpcat.al 1KB
open_proxy_tcp_connection.al 1KB
tcp_write_all.al 1KB
http_cat.al 1KB
ssl_read_all.al 1KB
randomize.al 1KB
tcp_read_until.al 970B
dump_peer_certificate.al 958B
set_cert_and_key.al 828B
initialize.al 815B
ssl_write_CRLF.al 812B
tcp_write_CRLF.al 793B
tcp_read_all.al 756B
debug_read.al 677B
make_form.al 604B
make_headers.al 575B
do_httpx2.al 559B
httpx_cat.al 558B
do_httpx4.al 544B
set_proxy.al 540B
do_https.al 508B
tcpxcat.al 485B
do_https3.al 466B
do_https2.al 446B
want_X509_lookup.al 441B
set_server_cert_and_key.al 413B
tcp_read_CRLF.al 400B
head_httpx4.al 399B
ssl_read_CRLF.al 384B
do_https4.al 357B
want_nothing.al 357B
head_http4.al 346B
head_https4.al 333B
head_https3.al 325B
post_https3.al 324B
post_https4.al 324B
put_https4.al 322B
put_https3.al 322B
get_https4.al 322B
head_https.al 322B
get_https3.al 322B
head_httpx3.al 322B
head_http3.al 322B
post_http3.al 321B
post_http4.al 321B
post_httpx4.al 321B
post_httpx3.al 321B
post_https.al 321B
get_httpx4.al 319B
put_httpx4.al 319B
head_http.al 319B
get_https.al 319B
get_http4.al 319B
put_httpx3.al 319B
get_http3.al 319B
put_http4.al 319B
put_http3.al 319B
head_httpx.al 319B
put_https.al 319B
get_httpx3.al 319B
post_http.al 318B
post_httpx.al 318B
get_httpx.al 316B
put_httpx.al 316B
put_http.al 316B
get_http.al 316B
want_write.al 312B
want_read.al 309B
Alaska 184B
Aleutian 171B
Algiers 1KB
Almaty 2KB
Amman 7KB
Amsterdam 9KB
Anadyr 2KB
Anchorage 8KB
Andorra 7KB
Anguilla 203B
Antananarivo 185B
Antigua 202B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
CMCST
- 粉丝: 26
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论5