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