blob: bb8d62d95c9a25eadda3fa5dc6bd560ae057134b [file] [log] [blame]
Bram Moolenaar82af8712016-06-04 20:20:29 +02001*version8.txt* For Vim version 8.0. Last change: 2016 Jun 04
Bram Moolenaar03413f42016-04-12 21:07:15 +02002
3
4 VIM REFERENCE MANUAL by Bram Moolenaar
5
6NOTE: THIS FILE IS STILL BEING WORKED ON
7
8 *vim8* *vim-8* *version-8.0* *version8.0*
9Welcome to Vim 8! A large number of bugs have been fixed and several
10features have been added. This file mentions all the new items and changes to
11existing features since Vim 7.4. Bug fixes, the patches for Vim 7.4, can be
12found below |vim-7.4|. Use this command to see the version you are using: >
13 :version
14
15See |vi_diff.txt| for an overview of differences between Vi and Vim 7.0.
Bram Moolenaar06d2d382016-05-20 17:24:11 +020016See |version4.txt|, |version5.txt|, |version6.txt| and |version7.txt| for
17differences between other versions.
Bram Moolenaar03413f42016-04-12 21:07:15 +020018
19INCOMPATIBLE CHANGES |incompatible-8|
20
21NEW FEATURES |new-8|
22
23Vim script enhancements |new-vim-script-8|
24
25IMPROVEMENTS |improvements-8|
26
27COMPILE TIME CHANGES |compile-changes-8|
28
29PATCHES |patches-8|
30
31
32==============================================================================
33INCOMPATIBLE CHANGES *incompatible-8*
34
35These changes are incompatible with previous releases. Check this list if you
36run into a problem when upgrading from Vim 7.4 to 8.0.
37
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +020038The support for MS-DOS has been removed. It hasn't been working for a while
39and removing it cleans up the code quite a bit.
Bram Moolenaar03413f42016-04-12 21:07:15 +020040
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +020041The support for Windows 16 bit (Windows 95 and older) has been removed.
Bram Moolenaar03413f42016-04-12 21:07:15 +020042
43Minor incompatibilities:
44
45For filetype detection: ...
46
47==============================================================================
48NEW FEATURES *new-8*
49
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +020050First a list of the bigger new features. A comprehensive list is below.
Bram Moolenaar03413f42016-04-12 21:07:15 +020051
52
53Asynchronous I/O support, channels ~
54
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +020055Vim can now exchange messages with another process in the background. The
56messages are received and handled while Vim is waiting for a character. See
Bram Moolenaar03413f42016-04-12 21:07:15 +020057|channel-demo| for an example, communicating with a Python server.
58
59Closely related to channels is JSON support. JSON is widely supported and can
60easily be used for inter-process communication, allowing for writing a server
61in any language. The functions to use are |json_encode()| and |json_decode()|.
62
63
64Jobs ~
65
66Vim can now start a job, communicate with it and stop it. This is very useful
67to run a process for completion, syntax checking, etc. Channels are used to
68communicate with the job. Jobs can also read from or write to a buffer or a
69file. See |job_start()|.
70
71
72Timers ~
73
74Also asynchronous are timers. They can fire once or repeatedly and invoke a
75function to do any work. For example: >
76 let tempTimer = timer_start(4000, 'CheckTemp')
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +020077This will make a call four seconds (4000 milli seconds) later, like: >
Bram Moolenaar03413f42016-04-12 21:07:15 +020078 call CheckTemp()
79
80
81Partials ~
82
83Vim already had a Funcref, a reference to a function. A partial also refers
84to a function, and additionally binds arguments and/or a dictionary. This is
85especially useful for callbacks on channels and timers. E.g., for the timer
86example above, to pass an argument to the function: >
87 let tempTimer = timer_start(4000, function('CheckTemp', ['out']))
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +020088This will a make call four seconds later, like: >
Bram Moolenaar03413f42016-04-12 21:07:15 +020089 call CheckTemp('out')
90
91
92Packages ~
93
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +020094Plugins keep growing and more of them are available than ever before. To keep
Bram Moolenaar03413f42016-04-12 21:07:15 +020095the collection of plugins manageable package support has been added. This is
96a convenient way to get one or more plugins, drop them in a directory and
97possibly keep them updated. Vim will load them automatically, or only when
98desired. See |packages|.
99
100
101New style tests ~
102
103This is for Vim developers. So far writing tests for Vim has not been easy.
104Vim 8 adds assert functions and a framework to run tests. This makes it a lot
Bram Moolenaar82af8712016-06-04 20:20:29 +0200105simpler to write tests and keep them updated. Also new are several functions
106that are added specifically for testing.
Bram Moolenaar03413f42016-04-12 21:07:15 +0200107
108These functions have been added:
109 |assert_equal()|
110 |assert_notequal()|
111 |assert_exception()|
112 |assert_fails()|
113 |assert_false()|
114 |assert_match()|
115 |assert_notmatch()|
116 |assert_true()|
Bram Moolenaar82af8712016-06-04 20:20:29 +0200117 |test_alloc_fail()|
118 |test_disable_char_avail()|
119 |test_garbagecollect_now()|
120 |test_null_channel()|
121 |test_null_dict()|
122 |test_null_job()|
123 |test_null_list()|
124 |test_null_partial()|
125 |test_null_string()|
Bram Moolenaar03413f42016-04-12 21:07:15 +0200126
127
128Window IDs ~
129
130Previously windows could only be accessed by their number. And every time a
131window would open, close or move that number changes. Each window now has a
Bram Moolenaar82af8712016-06-04 20:20:29 +0200132unique ID, so that they are easy to find. See |win_getid()| and |win_id2win()|.
Bram Moolenaar03413f42016-04-12 21:07:15 +0200133
134
135Wrapping lines with indent ~
136
137The 'breakindent' option has been added to be able to wrap lines without
138changing the amount of indent.
139
140
141Windows: Direct-X support ~
142
143This adds the 'renderoptions' option to allow for switching on Direct-X
144(DirectWrite) support on MS-Windows.
145
146
147GTK+ 3 support ~
148
149GTK+ 2 is getting old, GTK+ 3 is here. Support has been added and it already
150works quite well, mostly just like GTK+ 2.
151
152
153Vim script enhancements *new-vim-script-8*
154-----------------------
155
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +0200156In Vim script the following types have been added:
Bram Moolenaar03413f42016-04-12 21:07:15 +0200157
158 |Special| |v:false|, |v:true|, |v:none| and |v:null|
159 |Channel| connection to another process for asynchronous I/O
160 |Job| process control
161
162Many functions and commands have been added to support the new types.
163
164
165
166Various new items *new-items-8*
167-----------------
168
169Normal mode commands: ~
170
171
172Insert mode commands: ~
173
174
175Options: ~
176
177
178Ex commands: ~
179
180
181Ex command modifiers: ~
182
183
184Ex command arguments: ~
185
186
187New and extended functions: ~
188
189
190
191New Vim variables: ~
192
193|v:vim_did_enter| Set when VimEnter autocommands are triggered
194
195
196New autocommand events: ~
197
198
199
200New highlight groups: ~
201
202
203New items in search patterns: ~
204
205
206New Syntax/Indent/FTplugin files: ~
207
208
209New Keymaps: ~
210
211
212New message translations: ~
213
214
215Others: ~
216
217
218==============================================================================
219IMPROVEMENTS *improvements-8*
220
221The existing blowfish encryption turned out to be much weaker than it was
222supposed to be. The blowfish2 method has been added to fix that. Note that
223this still isn't a state-of-the-art encryption, but good enough for most
224usage. See 'cryptmethod'.
225
226==============================================================================
227COMPILE TIME CHANGES *compile-changes-8*
228
229Dropped the support for MS-DOS. It was too big to fit in memory.
230
231
232==============================================================================
233PATCHES *patches-8* *bug-fixes-8*
234
235The list of patches that got included since 7.4.0. This includes all the new
236features, but does not include runtime file changes (syntax, indent, help,
237etc.)
238
239TODO: INCLUDE PATCH LIST.
240
241 vim:tw=78:ts=8:ft=help:norl: