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