blob: eb420539398bdef2068f826c596523300f37ba4a [file] [log] [blame]
Bram Moolenaar06d2d382016-05-20 17:24:11 +02001*version8.txt* For Vim version 8.0. Last change: 2016 May 20
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
105simpler to write tests and keep them updated.
106
107These functions have been added:
108 |assert_equal()|
109 |assert_notequal()|
110 |assert_exception()|
111 |assert_fails()|
112 |assert_false()|
113 |assert_match()|
114 |assert_notmatch()|
115 |assert_true()|
116 |alloc_fail()|
117 |disable_char_avail_for_testing()|
118
119
120Window IDs ~
121
122Previously windows could only be accessed by their number. And every time a
123window would open, close or move that number changes. Each window now has a
124unique ID, so that they are easy to find.
125
126
127Wrapping lines with indent ~
128
129The 'breakindent' option has been added to be able to wrap lines without
130changing the amount of indent.
131
132
133Windows: Direct-X support ~
134
135This adds the 'renderoptions' option to allow for switching on Direct-X
136(DirectWrite) support on MS-Windows.
137
138
139GTK+ 3 support ~
140
141GTK+ 2 is getting old, GTK+ 3 is here. Support has been added and it already
142works quite well, mostly just like GTK+ 2.
143
144
145Vim script enhancements *new-vim-script-8*
146-----------------------
147
Bram Moolenaaraa3b15d2016-04-21 08:53:19 +0200148In Vim script the following types have been added:
Bram Moolenaar03413f42016-04-12 21:07:15 +0200149
150 |Special| |v:false|, |v:true|, |v:none| and |v:null|
151 |Channel| connection to another process for asynchronous I/O
152 |Job| process control
153
154Many functions and commands have been added to support the new types.
155
156
157
158Various new items *new-items-8*
159-----------------
160
161Normal mode commands: ~
162
163
164Insert mode commands: ~
165
166
167Options: ~
168
169
170Ex commands: ~
171
172
173Ex command modifiers: ~
174
175
176Ex command arguments: ~
177
178
179New and extended functions: ~
180
181
182
183New Vim variables: ~
184
185|v:vim_did_enter| Set when VimEnter autocommands are triggered
186
187
188New autocommand events: ~
189
190
191
192New highlight groups: ~
193
194
195New items in search patterns: ~
196
197
198New Syntax/Indent/FTplugin files: ~
199
200
201New Keymaps: ~
202
203
204New message translations: ~
205
206
207Others: ~
208
209
210==============================================================================
211IMPROVEMENTS *improvements-8*
212
213The existing blowfish encryption turned out to be much weaker than it was
214supposed to be. The blowfish2 method has been added to fix that. Note that
215this still isn't a state-of-the-art encryption, but good enough for most
216usage. See 'cryptmethod'.
217
218==============================================================================
219COMPILE TIME CHANGES *compile-changes-8*
220
221Dropped the support for MS-DOS. It was too big to fit in memory.
222
223
224==============================================================================
225PATCHES *patches-8* *bug-fixes-8*
226
227The list of patches that got included since 7.4.0. This includes all the new
228features, but does not include runtime file changes (syntax, indent, help,
229etc.)
230
231TODO: INCLUDE PATCH LIST.
232
233 vim:tw=78:ts=8:ft=help:norl: