diff options
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/autocmd.txt | 2 | ||||
-rw-r--r-- | runtime/doc/change.txt | 6 | ||||
-rw-r--r-- | runtime/doc/develop.txt | 9 | ||||
-rw-r--r-- | runtime/doc/editing.txt | 4 | ||||
-rw-r--r-- | runtime/doc/eval.txt | 61 | ||||
-rw-r--r-- | runtime/doc/help.txt | 2 | ||||
-rw-r--r-- | runtime/doc/helphelp.txt | 15 | ||||
-rw-r--r-- | runtime/doc/index.txt | 4 | ||||
-rw-r--r-- | runtime/doc/job_control.txt | 15 | ||||
-rw-r--r-- | runtime/doc/message.txt | 2 | ||||
-rw-r--r-- | runtime/doc/nvim_terminal_emulator.txt | 10 | ||||
-rw-r--r-- | runtime/doc/options.txt | 13 | ||||
-rw-r--r-- | runtime/doc/os_win32.txt | 27 | ||||
-rw-r--r-- | runtime/doc/pattern.txt | 6 | ||||
-rw-r--r-- | runtime/doc/pi_vimball.txt | 273 | ||||
-rw-r--r-- | runtime/doc/quickfix.txt | 6 | ||||
-rw-r--r-- | runtime/doc/quickref.txt | 3 | ||||
-rw-r--r-- | runtime/doc/repeat.txt | 273 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 13 | ||||
-rw-r--r-- | runtime/doc/syntax.txt | 55 | ||||
-rw-r--r-- | runtime/doc/usr_05.txt | 64 | ||||
-rw-r--r-- | runtime/doc/usr_25.txt | 10 | ||||
-rw-r--r-- | runtime/doc/usr_29.txt | 2 | ||||
-rw-r--r-- | runtime/doc/usr_41.txt | 10 | ||||
-rw-r--r-- | runtime/doc/usr_toc.txt | 11 | ||||
-rw-r--r-- | runtime/doc/various.txt | 3 | ||||
-rw-r--r-- | runtime/doc/vim_diff.txt | 9 |
27 files changed, 520 insertions, 388 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index 6641732679..dc37ff1d6d 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -1,4 +1,4 @@ -*autocmd.txt* For Vim version 7.4. Last change: 2015 Dec 05 +*autocmd.txt* For Vim version 7.4. Last change: 2016 Mar 26 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/change.txt b/runtime/doc/change.txt index 4565cdf63e..2ccb9188a9 100644 --- a/runtime/doc/change.txt +++ b/runtime/doc/change.txt @@ -1,4 +1,4 @@ -*change.txt* For Vim version 7.4. Last change: 2016 Feb 10 +*change.txt* For Vim version 7.4. Last change: 2016 Mar 08 VIM REFERENCE MANUAL by Bram Moolenaar @@ -108,7 +108,9 @@ is an error when 'cpoptions' includes the 'E' flag. *J* J Join [count] lines, with a minimum of two lines. Remove the indent and insert up to two spaces (see - below). + below). Fails when on the last line of the buffer. + If [count] is too big it is reduce to the number of + lines available. *v_J* {Visual}J Join the highlighted lines, with a minimum of two diff --git a/runtime/doc/develop.txt b/runtime/doc/develop.txt index 1b77d87aac..6ecbf9fb0d 100644 --- a/runtime/doc/develop.txt +++ b/runtime/doc/develop.txt @@ -124,8 +124,14 @@ include the kitchen sink... but you can use it for plumbing." ============================================================================== 2. Design decisions *design-decisions* -Window +Jargon *dev-jargon* +Host ~ +A plugin "host" is both a client (of the Nvim API) and a server (of an +external platform, e.g. python). It is a remote plugin that hosts other +plugins. + +Window ~ The word "window" is commonly used for several things: A window on the screen, the xterm window, a window inside Vim to view a buffer. To avoid confusion, other items that are sometimes called window have been @@ -139,7 +145,6 @@ window View on a buffer. There can be several windows in Vim, together with the command line, menubar, toolbar, etc. they fit in the shell. - Providers *dev-provider* A goal of Nvim is to allow extension of the editor without special knowledge diff --git a/runtime/doc/editing.txt b/runtime/doc/editing.txt index 69f834b04d..6f85436ab4 100644 --- a/runtime/doc/editing.txt +++ b/runtime/doc/editing.txt @@ -1,4 +1,4 @@ -*editing.txt* For Vim version 7.4. Last change: 2016 Feb 16 +*editing.txt* For Vim version 7.4. Last change: 2016 Mar 28 VIM REFERENCE MANUAL by Bram Moolenaar @@ -358,7 +358,7 @@ These are the common ones: To avoid the special meaning of the wildcards prepend a backslash. However, on MS-Windows the backslash is a path separator and "path\[abc]" is still seen as a wildcard when "[" is in the 'isfname' option. A simple way to avoid this -is to use "path\[[]abc]". Then the file "path[abc]" literally. +is to use "path\[[]abc]", this matches the file "path\[abc]". *starstar-wildcard* Expanding "**" is possible on Unix, Win32, Mac OS/X and a few other systems. diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 193153e8a3..0ca41370e9 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 7.4. Last change: 2016 Feb 19 +*eval.txt* For Vim version 7.4. Last change: 2016 Apr 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -413,7 +413,8 @@ only appear once. Examples: > A key is always a String. You can use a Number, it will be converted to a String automatically. Thus the String '4' and the number 4 will find the same entry. Note that the String '04' and the Number 04 are different, since the -Number will be converted to the String '4'. +Number will be converted to the String '4'. The empty string can be used as a +key. A value can be any expression. Using a Dictionary for a value creates a nested Dictionary: > @@ -861,11 +862,12 @@ These three can be repeated and mixed. Examples: expr8 *expr8* ----- expr8[expr1] item of String or |List| *expr-[]* *E111* + *subscript* If expr8 is a Number or String this results in a String that contains the expr1'th single byte from expr8. expr8 is used as a String, expr1 as a Number. This doesn't recognize multi-byte encodings, see |byteidx()| for -an alternative. +an alternative, or use `split()` to turn the string into a list of characters. Index zero gives the first byte. This is like it works in C. Careful: text column numbers start with one! Example, to get the byte under the @@ -2155,6 +2157,7 @@ writefile({list}, {fname} [, {flags}]) Number write list of lines to file {fname} xor({expr}, {expr}) Number bitwise XOR + abs({expr}) *abs()* Return the absolute value of {expr}. When {expr} evaluates to a |Float| abs() returns a |Float|. When {expr} can be @@ -2507,11 +2510,9 @@ capture({command}) *capture()* echo capture(['echon "foo"', 'echon "bar"']) < foobar This function is not available in the |sandbox|. - Note: {command}s run as if prepended with |:silent| (output is - captured, but not displayed). If multiple capture() calls are - nested, the outer capture() will not catch the command output - of the inner capture(); the inner capture will not cancel the - outer. + Note: {command} executes as if prepended with |:silent| + (output is collected, but not displayed). If nested, an outer + capture() will not observe the output of inner calls. Note: Text attributes (highlights) are not captured. ceil({expr}) *ceil()* @@ -2781,6 +2782,7 @@ cursor({list}) When there is one argument {list} this is used as a |List| with two, three or four item: + [{lnum}, {col}] [{lnum}, {col}, {off}] [{lnum}, {col}, {off}, {curswant}] This is like the return value of |getpos()| or |getcurpos()|, @@ -2847,6 +2849,13 @@ dictwatcheradd({dict}, {pattern}, {callback}) *dictwatcheradd()* After this is called, every change on {dict} and on keys matching {pattern} will result in {callback} being invoked. + For example, to watch all global variables: > + silent! call dictwatcherdel(g:, '*', 'OnDictChanged') + function! OnDictChanged(d,k,z) + echomsg string(a:k) string(a:z) + endfunction + call dictwatcheradd(g:, '*', 'OnDictChanged') +< For now {pattern} only accepts very simple patterns that can contain a '*' at the end of the string, in which case it will match every key that begins with the substring before the '*'. @@ -2857,7 +2866,7 @@ dictwatcheradd({dict}, {pattern}, {callback}) *dictwatcheradd()* - The dictionary being watched. - The key which changed. - - A dictionary containg the new and old values for the key. + - A dictionary containing the new and old values for the key. The type of change can be determined by examining the keys present on the third argument: @@ -3202,7 +3211,10 @@ feedkeys({string} [, {mode}]) *feedkeys()* similar to using ":normal!". You can call feedkeys() several times without 'x' and then one time with 'x' (possibly with an empty {string}) to execute all the - typeahead. + typeahead. Note that when Vim ends in Insert mode it + will behave as if <Esc> is typed, to avoid getting + stuck, waiting for a character to be typed before the + script continues. Return value is always 0. filereadable({file}) *filereadable()* @@ -4325,19 +4337,18 @@ jobsend({job}, {data}) {Nvim} *jobsend()* < will send "abc<NL>123<NUL>456<NL>". jobstart({cmd}[, {opts}]) {Nvim} *jobstart()* - Spawns {cmd} as a job. If {cmd} is a |List|, it will be run - directly. If {cmd} is a |string|, it will be roughly - equivalent to > - :call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}']) + Spawns {cmd} as a job. If {cmd} is a |List| it is run + directly. If {cmd} is a |String| it is processed like this: > + :call jobstart(split(&shell) + split(&shellcmdflag) + ['{cmd}']) < NOTE: read |shell-unquoting| before constructing any lists with 'shell' or 'shellcmdflag' options. The above call is only written to show the idea, one needs to perform unquoting and do split taking quotes into account. {opts} is a dictionary with these keys: - on_stdout: stdout event handler - on_stderr: stderr event handler - on_exit : exit event handler + on_stdout: stdout event handler (function name or |Funcref|) + on_stderr: stderr event handler (function name or |Funcref|) + on_exit : exit event handler (function name or |Funcref|) cwd : Working directory of the job; defaults to |current-directory|. pty : If set, the job will be connected to a new pseudo @@ -4351,17 +4362,12 @@ jobstart({cmd}[, {opts}]) {Nvim} *jobstart()* when nvim exits. If the process dies before nvim exits, on_exit will still be invoked. - Either funcrefs or function names can be passed as event - handlers. The {opts} object is also used as the "self" - argument for the callback, so the caller may pass arbitrary - data by setting other key.(see |Dictionary-function| for more - information). + {opts} is passed as |self| to the callback; the caller may + pass arbitrary data by setting other keys. Returns: - - The job ID on success, which is used by |jobsend()| and - |jobstop()| - - 0 when the job table is full or on invalid arguments - - -1 when {cmd}[0] is not executable. Will never fail if - {cmd} is a string unless 'shell' is not executable. + - job ID on success, used by |jobsend()| and |jobstop()| + - 0 on invalid arguments or if the job table is full + - -1 if {cmd}[0] is not executable. See |job-control| for more information. jobstop({job}) {Nvim} *jobstop()* @@ -7409,6 +7415,7 @@ unix Unix version of Vim. user_commands User-defined commands. vertsplit Compiled with vertically split windows |:vsplit|. vim_starting True while initial source'ing takes place. |startup| + *vim_starting* virtualedit Compiled with 'virtualedit' option. visual Compiled with Visual mode. visualextra Compiled with extra Visual mode commands. diff --git a/runtime/doc/help.txt b/runtime/doc/help.txt index 342c475f9b..fc4816a6c8 100644 --- a/runtime/doc/help.txt +++ b/runtime/doc/help.txt @@ -1,4 +1,4 @@ -*help.txt* For Vim version 7.4. Last change: 2016 Jan 10 +*help.txt* For Vim version 7.4. Last change: 2016 Mar 31 VIM - main help file k diff --git a/runtime/doc/helphelp.txt b/runtime/doc/helphelp.txt index f3533b8815..ca341af200 100644 --- a/runtime/doc/helphelp.txt +++ b/runtime/doc/helphelp.txt @@ -1,4 +1,4 @@ -*helphelp.txt* For Vim version 7.4. Last change: 2014 Sep 19 +*helphelp.txt* For Vim version 7.4. Last change: 2016 Apr 01 VIM REFERENCE MANUAL by Bram Moolenaar @@ -188,6 +188,9 @@ command: > *E154* *E150* *E151* *E152* *E153* *E670* :helpt[ags] [++t] {dir} Generate the help tags file(s) for directory {dir}. + When {dir} is ALL then all "doc" directories in + 'runtimepath' will be used. + All "*.txt" and "*.??x" files in the directory and sub-directories are scanned for a help tag definition in between stars. The "*.??x" files are for @@ -196,9 +199,11 @@ command: > sorted. When there are duplicates an error message is given. An existing tags file is silently overwritten. + The optional "++t" argument forces adding the "help-tags" tag. This is also done when the {dir} is equal to $VIMRUNTIME/doc. + To rebuild the help tags in the runtime directory (requires write permission there): > :helptags $VIMRUNTIME/doc @@ -249,7 +254,9 @@ The second one finds the English user manual, even when 'helplang' is set to When using command-line completion for the ":help" command, the "@en" extension is only shown when a tag exists for multiple languages. When the -tag only exists for English "@en" is omitted. +tag only exists for English "@en" is omitted. When the first candidate has an +"@ab" extension and it matches the first language in 'helplang' "@ab" is also +omitted. When using |CTRL-]| or ":help!" in a non-English help file Vim will try to find the tag in the same language. If not found then 'helplang' will be used @@ -306,6 +313,10 @@ aligned on a line. When referring to an existing help tag and to create a hot-link, place the name between two bars (|) eg. |help-writing|. +When referring to a Vim command and to create a hot-link, place the +name between two backticks, eg. inside `:filetype`. You will see this is +highlighted as a command, like a code block (see below). + When referring to a Vim option in the help file, place the option name between two single quotes, eg. 'statusline' diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index e75031ccef..bd2df5d1e5 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1,4 +1,4 @@ -*index.txt* For Vim version 7.4. Last change: 2016 Jan 19 +*index.txt* For Vim version 7.4. Last change: 2016 Mar 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1378,6 +1378,8 @@ tag command action ~ |:ounmap| :ou[nmap] like ":unmap" but for Operator-pending mode |:ounmenu| :ounme[nu] remove menu for Operator-pending mode |:ownsyntax| :ow[nsyntax] set new local syntax highlight for this window +|:packadd| :pa[ckadd] add a plugin from 'packpath' +|:packloadall| :packl[oadall] load all packages under 'packpath' |:pclose| :pc[lose] close preview window |:pedit| :ped[it] edit file in the preview window |:print| :p[rint] print lines diff --git a/runtime/doc/job_control.txt b/runtime/doc/job_control.txt index 587eba4162..5cb172f90a 100644 --- a/runtime/doc/job_control.txt +++ b/runtime/doc/job_control.txt @@ -40,7 +40,7 @@ for details. Job control is achieved by calling a combination of the |jobstart()|, |jobsend()| and |jobstop()| functions. Here's an example: > - function s:JobHandler(job_id, data, event) + function! s:JobHandler(job_id, data, event) if a:event == 'stdout' let str = self.shell.' stdout: '.join(a:data) elseif a:event == 'stderr' @@ -84,6 +84,19 @@ Here's what is happening: program. 2: The event type, which is "stdout", "stderr" or "exit". + Note: Buffered stdout/stderr data which has not been flushed by the sender + will not trigger the "stdout" callback (but if the process ends, the + "exit" callback will be triggered). + For example, "ruby -e" buffers output, so small strings will be + buffered unless "auto-flushing" ($stdout.sync=true) is enabled. > + function! Receive(job_id, data, event) + echom printf('%s: %s',a:event,string(a:data)) + endfunction + call jobstart(['ruby', '-e', + \ '$stdout.sync = true; 5.times do sleep 1 and puts "Hello Ruby!" end'], + \ {'on_stdout': 'Receive'}) +< https://github.com/neovim/neovim/issues/1592 + The options dictionary is passed as the "self" variable to the callback function. Here's a more object-oriented version of the above: > diff --git a/runtime/doc/message.txt b/runtime/doc/message.txt index 114bb61d99..7ceddeb674 100644 --- a/runtime/doc/message.txt +++ b/runtime/doc/message.txt @@ -1,4 +1,4 @@ -*message.txt* For Vim version 7.4. Last change: 2013 Feb 23 +*message.txt* For Vim version 7.4. Last change: 2016 Feb 27 VIM REFERENCE MANUAL by Bram Moolenaar diff --git a/runtime/doc/nvim_terminal_emulator.txt b/runtime/doc/nvim_terminal_emulator.txt index 45695ccf02..4296ef6490 100644 --- a/runtime/doc/nvim_terminal_emulator.txt +++ b/runtime/doc/nvim_terminal_emulator.txt @@ -33,9 +33,15 @@ There are 3 ways to create a terminal buffer: - By editing a file with a name matching `term://(.{-}//(\d+:)?)?\zs.*`. For example: > - :e term://bash - :vsp term://top + :edit term://bash + :vsplit term://top < + Note: The "term://" pattern is handled by a BufReadCmd handler, so the + |autocmd-nested| modifier is required to use it in an autocmd. > + autocmd VimEnter * nested split term://sh +< This is only mentioned for reference; you should use the |:terminal| + command instead. + When the terminal spawns the program, the buffer will start to mirror the terminal display and change its name to `term://$CWD//$PID:$COMMAND`. Note that |:mksession| will "save" the terminal buffers by restarting all diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 8c2b7786a7..e00f27f9f0 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1,4 +1,4 @@ -*options.txt* For Vim version 7.4. Last change: 2016 Feb 20 +*options.txt* For Vim version 7.4. Last change: 2016 Apr 12 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2458,8 +2458,8 @@ A jump table for the options with a short description can be found at |Q_op|. file only, the option is not changed. When 'binary' is set, the value of 'fileformats' is not used. - Note that when Vim starts up with an empty buffer this option is not - used. Set 'fileformat' in your vimrc instead. + When Vim starts up with an empty buffer the first item is used. You + can overrule this by setting 'fileformat' in your .vimrc. For systems with a Dos-like <EOL> (<CR><NL>), when reading files that are ":source"ed and for vimrc files, automatic <EOL> detection may be @@ -4238,6 +4238,7 @@ A jump table for the options with a short description can be found at |Q_op|. written. A ":set nomodified" command also resets the original values to the current values and the 'modified' option will be reset. + Similarly for 'eol' and 'bomb'. This option is not set when a change is made to the buffer as the result of a BufNewFile, BufRead/BufReadPost, BufWritePost, FileAppendPost or VimLeave autocommand event. See |gzip-example| for @@ -4499,6 +4500,12 @@ A jump table for the options with a short description can be found at |Q_op|. This option cannot be set from a |modeline| or in the |sandbox|, for security reasons. + *'packpath'* *'pp'* +'packpath' 'pp' string (default: see 'runtimepath') + {not in Vi} + Directories used to find packages. See |packages|. + + *'paragraphs'* *'para'* 'paragraphs' 'para' string (default "IPLPPPQPP TPHPLIPpLpItpplpipbp") global diff --git a/runtime/doc/os_win32.txt b/runtime/doc/os_win32.txt index 3c7ca4e36a..5dc276c9df 100644 --- a/runtime/doc/os_win32.txt +++ b/runtime/doc/os_win32.txt @@ -1,4 +1,4 @@ -*os_win32.txt* For Vim version 7.4. Last change: 2014 Sep 25 +*os_win32.txt* For Vim version 7.4. Last change: 2016 Mar 05 VIM REFERENCE MANUAL by George Reilly @@ -75,6 +75,31 @@ The directory of the Vim executable is appended to $PATH. This is mostly to make "!xxd" work, as it is in the Tools menu. And it also means that when executable() returns 1 the executable can actually be executed. +Quotes in file names *win32-quotes* + +Quotes inside a file name (or any other command line argument) can be escaped +with a backslash. E.g. > + vim -c "echo 'foo\"bar'" + +Alternatively use three quotes to get one: > + vim -c "echo 'foo"""bar'" + +The quotation rules are: + +1. A `"` starts quotation. +2. Another `"` or `""` ends quotation. If the quotation ends with `""`, a `"` + is produced at the end of the quoted string. + +Examples, with [] around an argument: + "foo" -> [foo] + "foo"" -> [foo"] + "foo"bar -> [foobar] + "foo" bar -> [foo], [bar] + "foo""bar -> [foo"bar] + "foo"" bar -> [foo"], [bar] + "foo"""bar" -> [foo"bar] + + ============================================================================== 3. Using the mouse *win32-mouse* diff --git a/runtime/doc/pattern.txt b/runtime/doc/pattern.txt index 5897f756d8..0fe6106ec5 100644 --- a/runtime/doc/pattern.txt +++ b/runtime/doc/pattern.txt @@ -1,4 +1,4 @@ -*pattern.txt* For Vim version 7.4. Last change: 2016 Jan 03 +*pattern.txt* For Vim version 7.4. Last change: 2016 Apr 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -1096,8 +1096,8 @@ x A single character, with no special meaning, matches itself '/', alphabetic, numeric, '_' or '~'. These items only work for 8-bit characters, except [:lower:] and [:upper:] also work for multi-byte characters when using the new - regexp engine. In the future these items may work for multi-byte - characters. + regexp engine. See |two-engines|. In the future these items may + work for multi-byte characters. */[[=* *[==]* - An equivalence class. This means that characters are matched that have almost the same meaning, e.g., when ignoring accents. This diff --git a/runtime/doc/pi_vimball.txt b/runtime/doc/pi_vimball.txt deleted file mode 100644 index bbc74988ca..0000000000 --- a/runtime/doc/pi_vimball.txt +++ /dev/null @@ -1,273 +0,0 @@ -*pi_vimball.txt* For Vim version 7.4. Last change: 2012 Jan 17 - - ---------------- - Vimball Archiver - ---------------- - -Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM> - (remove NOSPAM from Campbell's email first) -Copyright: (c) 2004-2012 by Charles E. Campbell, Jr. *Vimball-copyright* - The VIM LICENSE (see |copyright|) applies to the files in this - package, including vimballPlugin.vim, vimball.vim, and pi_vimball.txt. - except use "vimball" instead of "VIM". Like anything else that's free, - vimball.vim and its associated files are provided *as is* and comes with - no warranty of any kind, either expressed or implied. No guarantees - of merchantability. No guarantees of suitability for any purpose. By - using this plugin, you agree that in no event will the copyright - holder be liable for any damages resulting from the use of this - software. Use at your own risk! - -============================================================================== -1. Contents *vba* *vimball* *vimball-contents* - - 1. Contents......................................: |vimball-contents| - 2. Vimball Introduction..........................: |vimball-intro| - 3. Vimball Manual................................: |vimball-manual| - MkVimball.....................................: |:MkVimball| - UseVimball....................................: |:UseVimball| - RmVimball.....................................: |:RmVimball| - 4. Vimball History...............................: |vimball-history| - - -============================================================================== -2. Vimball Introduction *vimball-intro* - - Vimball is intended to make life simpler for users of plugins. All - a user needs to do with a vimball is: > - vim someplugin.vba - :so % - :q -< and the plugin and all its components will be installed into their - appropriate directories. Note that one doesn't need to be in any - particular directory when one does this. Plus, any help for the - plugin will also be automatically installed. - - If a user has decided to use the AsNeeded plugin, vimball is smart - enough to put scripts nominally intended for .vim/plugin/ into - .vim/AsNeeded/ instead. - - Removing a plugin that was installed with vimball is really easy: > - vim - :RmVimball someplugin -< This operation is not at all easy for zips and tarballs, for example. - - Vimball examines the user's |'runtimepath'| to determine where to put - the scripts. The first directory mentioned on the runtimepath is - usually used if possible. Use > - :echo &rtp -< to see that directory. - - -============================================================================== -3. Vimball Manual *vimball-manual* - -MAKING A VIMBALL *:MkVimball* - :[range]MkVimball[!] filename [path] - - The range is composed of lines holding paths to files to be included - in your new vimball, omitting the portion of the paths that is - normally specified by the runtimepath (|'rtp'|). As an example: > - plugin/something.vim - doc/something.txt -< using > - :[range]MkVimball filename -< - on this range of lines will create a file called "filename.vba" which - can be used by Vimball.vim to re-create these files. If the - "filename.vba" file already exists, then MkVimball will issue a - warning and not create the file. Note that these paths are relative - to your .vim (vimfiles) directory, and the files should be in that - directory. The vimball plugin normally uses the first |'runtimepath'| - directory that exists as a prefix; don't use absolute paths, unless - the user has specified such a path. - - If you use the exclamation point (!), then MkVimball will create the - "filename.vba" file, overwriting it if it already exists. This - behavior resembles that for |:w|. - - If you wish to force slashes into the filename, that can also be done - by using the exclamation mark (ie. :MkVimball! path/filename). - - The tip at http://vim.wikia.com/wiki/Using_VimBall_with_%27Make%27 - has a good idea on how to automate the production of vimballs using - make. - - -MAKING DIRECTORIES VIA VIMBALLS *g:vimball_mkdir* - - First, the |mkdir()| command is tried (not all systems support it). - - If it doesn't exist, then if g:vimball_mkdir doesn't exist, it is set - as follows: > - |g:netrw_local_mkdir|, if it exists - "mkdir" , if it is executable - "makedir" , if it is executable - Otherwise , it is undefined. -< One may explicitly specify the directory making command using - g:vimball_mkdir. This command is used to make directories that - are needed as indicated by the vimball. - - -CONTROLLING THE VIMBALL EXTRACTION DIRECTORY *g:vimball_home* - - You may override the use of the |'runtimepath'| by specifying a - variable, g:vimball_home. - - *vimball-extract* - vim filename.vba - - Simply editing a Vimball will cause Vimball.vim to tell the user to - source the file to extract its contents. - - Extraction will only proceed if the first line of a putative vimball - file holds the "Vimball Archiver by Charles E. Campbell, Jr., Ph.D." - line. - -LISTING FILES IN A VIMBALL *:VimballList* - - :VimballList - - This command will tell Vimball to list the files in the archive, along - with their lengths in lines. - -MANUALLY INVOKING VIMBALL EXTRACTION *:UseVimball* - - :UseVimball [path] - - This command is contained within the vimball itself; it invokes the - vimball#Vimball() routine which is responsible for unpacking the - vimball. One may choose to execute it by hand instead of sourcing - the vimball; one may also choose to specify a path for the - installation, thereby overriding the automatic choice of the first - existing directory on the |'runtimepath'|. - -REMOVING A VIMBALL *:RmVimball* - - :RmVimball vimballfile [path] - - This command removes all files generated by the specified vimball - (but not any directories it may have made). One may choose a path - for de-installation, too (see |'runtimepath'|); otherwise, the - default is the first existing directory on the |'runtimepath'|. - To implement this, a file (.VimballRecord) is made in that directory - containing a record of what files need to be removed for all vimballs - used thus far. - -PREVENTING LOADING - - If for some reason you don't want to be able to extract plugins - using vimballs: you may prevent the loading of vimball.vim by - putting the following two variables in your <.vimrc>: > - - let g:loaded_vimballPlugin= 1 - let g:loaded_vimball = 1 -< -WINDOWS *vimball-windows* - - Many vimball files are compressed with gzip. Windows, unfortunately, - does not come provided with a tool to decompress gzip'ped files. - Fortunately, there are a number of tools available for Windows users - to un-gzip files: -> - Item Tool/Suite Free Website - ---- ---------- ---- ------- - 7zip tool y http://www.7-zip.org/ - Winzip tool n http://www.winzip.com/downwz.htm - unxutils suite y http://unxutils.sourceforge.net/ - cygwin suite y http://www.cygwin.com/ - GnuWin32 suite y http://gnuwin32.sourceforge.net/ - MinGW suite y http://www.mingw.org/ -< - -============================================================================== -4. Vimball History *vimball-history* {{{1 - - 34 : Sep 22, 2011 * "UseVimball path" now supports a non-full path by - prepending the current directory to it. - 33 : Apr 02, 2011 * Gave priority to *.vmb over *.vba - * Changed silent! to sil! (shorter) - * Safed |'swf'| setting (during vimball extraction, - its now turned off) - 32 : May 19, 2010 * (Christian Brabandt) :so someplugin.vba and - :so someplugin.vba.gz (and the other supported - compression types) now works - * (Jan Steffens) added support for xz compression - * fenc extraction was erroneously picking up the - end of the line number when no file encoding - was present. Fixed. - * By request, beginning the switchover from the vba - extension to vmb. Currently both are supported; - MkVimball, however, now will create *.vmb files. - Feb 11, 2011 * motoyakurotsu reported an error with vimball's - handling of zero-length files - 30 : Dec 08, 2008 * fnameescape() inserted to protect error - messaging using corrupted filenames from - causing problems - * RmVimball supports filenames that would - otherwise be considered to have "magic" - characters (ie. Abc[1].vba) - Feb 18, 2009 * s:Escape(), g:vimball_shq, and g:netrw_shq - removed (shellescape() used directly) - Oct 05, 2009 * (Nikolai Weibull) suggested that MkVimball - be allowed to use slashes in the filename. - 26 : May 27, 2008 * g:vimball_mkdir usage installed. Makes the - $HOME/.vim (or $HOME\vimfiles) directory if - necessary. - May 30, 2008 * (tnx to Bill McCarthy) found and fixed a bug: - vimball wasn't updating plugins to AsNeeded/ - when it should - 25 : Mar 24, 2008 * changed vimball#Vimball() to recognize doc/*.??x - files as help files, too. - Apr 18, 2008 * RmVimball command is now protected by saving and - restoring settings -- in particular, acd was - causing problems as reported by Zhang Shuhan - 24 : Nov 15, 2007 * g:vimball_path_escape used by s:Path() to - prevent certain characters from causing trouble - (defunct: |fnameescape()| and |shellescape()| - now used instead) - 22 : Mar 21, 2007 * uses setlocal instead of set during BufEnter - 21 : Nov 27, 2006 * (tnx to Bill McCarthy) vimball had a header - handling problem and it now changes \s to /s - 20 : Nov 20, 2006 * substitute() calls have all had the 'e' flag - removed. - 18 : Aug 01, 2006 * vimballs now use folding to easily display their - contents. - * if a user has AsNeeded/somefile, then vimball - will extract plugin/somefile to the AsNeeded/ - directory - 17 : Jun 28, 2006 * changes all \s to /s internally for Windows - 16 : Jun 15, 2006 * A. Mechelynck's idea to allow users to specify - installation root paths implemented for - UseVimball, MkVimball, and RmVimball. - * RmVimball implemented - 15 : Jun 13, 2006 * bugfix - 14 : May 26, 2006 * bugfixes - 13 : May 01, 2006 * exists("&acd") used to determine if the acd - option exists - 12 : May 01, 2006 * bugfix - the |'acd'| option is not always defined - 11 : Apr 27, 2006 * VimballList would create missing subdirectories that - the vimball specified were needed. Fixed. - 10 : Apr 27, 2006 * moved all setting saving/restoration to a pair of - functions. Included some more settings in them - which frequently cause trouble. - 9 : Apr 26, 2006 * various changes to support Windows' predilection - for backslashes and spaces in file and directory - names. - 7 : Apr 25, 2006 * bypasses foldenable - * uses more exe and less norm! (:yank :put etc) - * does better at insuring a "Press ENTER" prompt - appears to keep its messages visible - 4 : Mar 31, 2006 * BufReadPost seems to fire twice; BufReadEnter - only fires once, so the "Source this file..." - message is now issued only once. - 3 : Mar 20, 2006 * removed query, now requires sourcing to be - extracted (:so %). Message to that effect - included. - * :VimballList now shows files that would be - extracted. - 2 : Mar 20, 2006 * query, :UseVimball included - 1 : Mar 20, 2006 * initial release - - -============================================================================== -vim:tw=78:ts=8:ft=help:fdm=marker diff --git a/runtime/doc/quickfix.txt b/runtime/doc/quickfix.txt index 317226108f..3b54faf18e 100644 --- a/runtime/doc/quickfix.txt +++ b/runtime/doc/quickfix.txt @@ -1,4 +1,4 @@ -*quickfix.txt* For Vim version 7.4. Last change: 2016 Jan 21 +*quickfix.txt* For Vim version 7.4. Last change: 2016 Mar 19 VIM REFERENCE MANUAL by Bram Moolenaar @@ -49,6 +49,10 @@ The following quickfix commands can be used. The location list commands are similar to the quickfix commands, replacing the 'c' prefix in the quickfix command with 'l'. + *E924* +If the current window was closed by an |autocommand| while processing a +location list command, it will be aborted. + *:cc* :cc[!] [nr] Display error [nr]. If [nr] is omitted, the same error is displayed again. Without [!] this doesn't diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 8e40628e25..fcfecc02a1 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -1,4 +1,4 @@ -*quickref.txt* For Vim version 7.4. Last change: 2015 Nov 10 +*quickref.txt* For Vim version 7.4. Last change: 2016 Mar 30 VIM REFERENCE MANUAL by Bram Moolenaar @@ -794,6 +794,7 @@ Short explanation of each option: *option-list* 'omnifunc' 'ofu' function for filetype-specific completion 'opendevice' 'odev' allow reading/writing devices on MS-Windows 'operatorfunc' 'opfunc' function to be called for |g@| operator +'packpath' 'pp' list of directories used for packages 'paragraphs' 'para' nroff macros that separate paragraphs 'paste' allow pasting text 'pastetoggle' 'pt' key code that causes 'paste' to toggle diff --git a/runtime/doc/repeat.txt b/runtime/doc/repeat.txt index 5b382f95f2..e84bbe5439 100644 --- a/runtime/doc/repeat.txt +++ b/runtime/doc/repeat.txt @@ -1,4 +1,4 @@ -*repeat.txt* For Vim version 7.4. Last change: 2016 Feb 12 +*repeat.txt* For Vim version 7.4. Last change: 2016 Apr 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -8,12 +8,14 @@ Repeating commands, Vim scripts and debugging *repeating* Chapter 26 of the user manual introduces repeating |usr_26.txt|. -1. Single repeats |single-repeat| -2. Multiple repeats |multi-repeat| -3. Complex repeats |complex-repeat| -4. Using Vim scripts |using-scripts| -5. Debugging scripts |debug-scripts| -6. Profiling |profiling| +1. Single repeats |single-repeat| +2. Multiple repeats |multi-repeat| +3. Complex repeats |complex-repeat| +4. Using Vim scripts |using-scripts| +5. Using Vim packages |packages| +6. Creating Vim packages |package-create| +7. Debugging scripts |debug-scripts| +8. Profiling |profiling| ============================================================================== 1. Single repeats *single-repeat* @@ -68,8 +70,8 @@ examples. The global commands work by first scanning through the [range] lines and marking each line where a match occurs (for a multi-line pattern, only the start of the match matters). -In a second scan the [cmd] is executed for each marked line with its line -number prepended. For ":v" and ":g!" the command is executed for each not +In a second scan the [cmd] is executed for each marked line, as if the cursor +was in that line. For ":v" and ":g!" the command is executed for each not marked line. If a line is deleted its mark disappears. The default for [range] is the whole buffer (1,$). Use "CTRL-C" to interrupt the command. If an error message is given for a line, the command for that @@ -173,10 +175,12 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. commands. *:ru* *:runtime* -:ru[ntime][!] {file} .. +:ru[ntime][!] [where] {file} .. Read Ex commands from {file} in each directory given - by 'runtimepath'. There is no error for non-existing - files. Example: > + by 'runtimepath' and/or 'packpath'. There is no error + for non-existing files. + + Example: > :runtime syntax/c.vim < There can be multiple {file} arguments, separated by @@ -190,6 +194,15 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. When it is not included only the first found file is sourced. + When [where] is omitted only 'runtimepath' is used. + Other values: + START search under "start" in 'packpath' + OPT search under "opt" in 'packpath' + PACK search under "start" and "opt" in + 'packpath' + ALL first use 'runtimepath', then search + under "start" and "opt" in 'packpath' + When {file} contains wildcards it is expanded to all matching files. Example: > :runtime! plugin/*.vim @@ -203,6 +216,57 @@ For writing a Vim script, see chapter 41 of the user manual |usr_41.txt|. When 'verbose' is two or higher, there is a message about each searched file. + *:pa* *:packadd* *E919* +:pa[ckadd][!] {name} Search for an optional plugin directory in 'packpath' + and source any plugin files found. The directory must + match: + pack/*/opt/{name} ~ + The directory is added to 'runtimepath' if it wasn't + there yet. + + Note that {name} is the directory name, not the name + of the .vim file. All the files matching the pattern + pack/*/opt/{name}/plugin/**/*.vim ~ + will be sourced. This allows for using subdirectories + below "plugin", just like with plugins in + 'runtimepath'. + + If the filetype detection was not enabled yet (this + is usually done with a "syntax enable" or "filetype + on" command in your .vimrc file), this will also look + for "{name}/ftdetect/*.vim" files. + + When the optional ! is added no plugin files or + ftdetect scripts are loaded, only the matching + directories are added to 'runtimepath'. This is + useful in your .vimrc. The plugins will then be + loaded during initialization, see |load-plugins|. + + Also see |pack-add|. + + *:packl* *:packloadall* +:packl[oadall][!] Load all packages in the "start" directory under each + entry in 'packpath'. + + First all the directories found are added to + 'runtimepath', then the plugins found in the + directories are sourced. This allows for a plugin to + depend on something of another plugin, e.g. an + "autoload" directory. See |packload-two-steps| for + how this can be useful. + + This is normally done automatically during startup, + after loading your .vimrc file. With this command it + can be done earlier. + + Packages will be loaded only once. After this command + it won't happen again. When the optional ! is added + this command will load packages even when done before. + + An error only causes sourcing the script where it + happens to be aborted, further plugins will be loaded. + See |packages|. + :scripte[ncoding] [encoding] *:scripte* *:scriptencoding* *E167* Specify the character encoding used in the script. The following lines will be converted from [encoding] @@ -373,7 +437,186 @@ Rationale: < Therefore the unusual leading backslash is used. ============================================================================== -5. Debugging scripts *debug-scripts* +5. Using Vim packages *packages* + +A Vim package is a directory that contains one or more plugins. The +advantages over normal plugins: +- A package can be downloaded as an archive and unpacked in its own directory. + Thus the files are not mixed with files of other plugins. That makes it + easy to update and remove. +- A package can be a git, mercurial, etc. repository. That makes it really + easy to update. +- A package can contain multiple plugins that depend on each other. +- A package can contain plugins that are automatically loaded on startup and + ones that are only loaded when needed with `:packadd`. + + +Using a package and loading automatically ~ + +Let's assume your Vim files are in the "~/.local/share/nvim/site" directory +and you want to add a package from a zip archive "/tmp/foopack.zip": + % mkdir -p ~/.local/share/nvim/site/pack/foo + % cd ~/.local/share/nvim/site/pack/foo + % unzip /tmp/foopack.zip + +The directory name "foo" is arbitrary, you can pick anything you like. + +You would now have these files under ~/.local/share/nvim/site: + pack/foo/README.txt + pack/foo/start/foobar/plugin/foo.vim + pack/foo/start/foobar/syntax/some.vim + pack/foo/opt/foodebug/plugin/debugger.vim + +When Vim starts up, after processing your .vimrc, it scans all directories in +'packpath' for plugins under the "pack/*/start" directory. First all those +directories are added to 'runtimepath'. Then all the plugins are loaded. +See |packload-two-steps| for how these two steps can be useful. + +In the example Vim will find "pack/foo/start/foobar/plugin/foo.vim" and adds +"~/.local/share/nvim/site/pack/foo/start/foobar" to 'runtimepath'. + +If the "foobar" plugin kicks in and sets the 'filetype' to "some", Vim will +find the syntax/some.vim file, because its directory is in 'runtimepath'. + +Vim will also load ftdetect files, if there are any. + +Note that the files under "pack/foo/opt" are not loaded automatically, only the +ones under "pack/foo/start". See |pack-add| below for how the "opt" directory +is used. + +Loading packages automatically will not happen if loading plugins is disabled, +see |load-plugins|. + +To load packages earlier, so that 'runtimepath' gets updated: > + :packloadall +This also works when loading plugins is disabled. The automatic loading will +only happen once. + + +Using a single plugin and loading it automatically ~ + +If you don't have a package but a single plugin, you need to create the extra +directory level: + % mkdir -p ~/.local/share/nvim/site/pack/foo/start/foobar + % cd ~/.local/share/nvim/site/pack/foo/start/foobar + % unzip /tmp/someplugin.zip + +You would now have these files: + pack/foo/start/foobar/plugin/foo.vim + pack/foo/start/foobar/syntax/some.vim + +From here it works like above. + + +Optional plugins ~ + *pack-add* +To load an optional plugin from a pack use the `:packadd` command: > + :packadd foodebug +This searches for "pack/*/opt/foodebug" in 'packpath' and will find +~/.local/share/nvim/site/pack/foo/opt/foodebug/plugin/debugger.vim and source +it. + +This could be done if some conditions are met. For example, depending on +whether Vim supports a feature or a dependency is missing. + +You can also load an optional plugin at startup, by putting this command in +your |.vimrc|: > + :packadd! foodebug +The extra "!" is so that the plugin isn't loaded with Vim was started with +|--noplugin|. + +It is perfectly normal for a package to only have files in the "opt" +directory. You then need to load each plugin when you want to use it. + + +Where to put what ~ + +Since color schemes, loaded with `:colorscheme`, are found below +"pack/*/start" and "pack/*/opt", you could put them anywhere. We recommend +you put them below "pack/*/opt", for example +".vim/pack/mycolors/opt/dark/colors/very_dark.vim". + +Filetype plugins should go under "pack/*/start", so that they are always +found. Unless you have more than one plugin for a file type and want to +select which one to load with `:packadd`. E.g. depending on the compiler +version: > + if foo_compiler_version > 34 + packadd foo_new + else + packadd foo_old + endif + +The "after" directory is most likely not useful in a package. It's not +disallowed though. + +============================================================================== +6. Creating Vim packages *package-create* + +This assumes you write one or more plugins that you distribute as a package. + +If you have two unrelated plugins you would use two packages, so that Vim +users can chose what they include or not. Or you can decide to use one +package with optional plugins, and tell the user to add the ones he wants with +`:packadd`. + +Decide how you want to distribute the package. You can create an archive or +you could use a repository. An archive can be used by more users, but is a +bit harder to update to a new version. A repository can usually be kept +up-to-date easily, but it requires a program like "git" to be available. +You can do both, github can automatically create an archive for a release. + +Your directory layout would be like this: + start/foobar/plugin/foo.vim " always loaded, defines commands + start/foobar/plugin/bar.vim " always loaded, defines commands + start/foobar/autoload/foo.vim " loaded when foo command used + start/foobar/doc/foo.txt " help for foo.vim + start/foobar/doc/tags " help tags + opt/fooextra/plugin/extra.vim " optional plugin, defines commands + opt/fooextra/autoload/extra.vim " loaded when extra command used + opt/fooextra/doc/extra.txt " help for extra.vim + opt/fooextra/doc/tags " help tags + +This allows for the user to do: > + mkdir ~/.local/share/nvim/site/pack/myfoobar + cd ~/.local/share/nvim/site/pack/myfoobar + git clone https://github.com/you/foobar.git + +Here "myfoobar" is a name that the user can choose, the only condition is that +it differs from other packages. + +In your documentation you explain what the plugins do, and tell the user how +to load the optional plugin: > + :packadd! fooextra + +You could add this packadd command in one of your plugins, to be executed when +the optional plugin is needed. + +Run the `:helptags` command to generate the doc/tags file. Including this +generated file in the package means that the user can drop the package in his +pack directory and the help command works right away. Don't forget to re-run +the command after changing the plugin help: > + :helptags path/start/foobar/doc + :helptags path/opt/fooextra/doc + + +Dependencies between plugins ~ + *packload-two-steps* +Suppose you have a two plugins that depend on the same functionality. You can +put the common functionality in an autoload directory, so that it will be +found automatically. Your package would have these files: + + pack/foo/start/one/plugin/one.vim > + call foolib#getit() +< pack/foo/start/two/plugin/two.vim > + call foolib#getit() +< pack/foo/start/lib/autoload/foolib.vim > + func foolib#getit() + +This works, because loading packages will first add all found directories to +'runtimepath' before sourcing the plugins. + +============================================================================== +7. Debugging scripts *debug-scripts* Besides the obvious messages that you can add to your scripts to find out what they are doing, Vim offers a debug mode. This allows you to step through a @@ -484,7 +727,7 @@ Additionally, these commands can be used: About the additional commands in debug mode: - There is no command-line completion for them, you get the completion for the normal Ex commands only. -- You can shorten them, up to a single character, unless more then one command +- You can shorten them, up to a single character, unless more than one command starts with the same letter. "f" stands for "finish", use "fr" for "frame". - Hitting <CR> will repeat the previous one. When doing another command, this is reset (because it's not clear what you want to repeat). @@ -597,7 +840,7 @@ OBSCURE user, don't use typeahead for debug commands. ============================================================================== -6. Profiling *profile* *profiling* +8. Profiling *profile* *profiling* Profiling means that Vim measures the time that is spent on executing functions and/or scripts. The |+profile| feature is required for this. diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index ad2649b765..236ed65f46 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -1,4 +1,4 @@ -*starting.txt* For Vim version 7.4. Last change: 2016 Feb 18 +*starting.txt* For Vim version 7.4. Last change: 2016 Apr 05 VIM REFERENCE MANUAL by Bram Moolenaar @@ -41,6 +41,7 @@ filename One or more file names. The first one will be the current nvim -- -filename < All arguments after the "--" will be interpreted as file names, no other options or "+command" argument can follow. + For behavior of quotes on MS-Windows, see |win32-quotes|. *--* - This argument can mean two things, depending on whether Ex @@ -463,6 +464,11 @@ accordingly. Vim proceeds in this order: commands from the command line have not been executed yet. You can use "--cmd 'set noloadplugins'" |--cmd|. + Packages are loaded. These are plugins, as above, but found in the + "start" directory of each entry in 'packpath'. Every plugin directory + found is added in 'runtimepath' and then the plugins are sourced. See + |packages|. + 7. Set 'shellpipe' and 'shellredir' The 'shellpipe' and 'shellredir' options are set according to the value of the 'shell' option, unless they have been set before. @@ -498,8 +504,9 @@ accordingly. Vim proceeds in this order: 14. Execute startup commands If a "-t" flag was given to Vim, the tag is jumped to. The commands given with the |-c| and |+cmd| arguments are executed. - The starting flag is reset, has("vim_starting") will now return zero. If the 'insertmode' option is set, Insert mode is entered. + The starting flag is reset, has("vim_starting") will now return zero. + The |v:vim_did_enter| variable is set to 1. The |VimEnter| autocommands are executed. Some hints on using initializations: @@ -710,7 +717,7 @@ There are several ways to exit Vim: - Use `:cquit`. Also when there are changes. When using `:cquit` or when there was an error message Vim exits with exit -code 1. Errors can be avoide by using `:silent!`. +code 1. Errors can be avoided by using `:silent!`. ============================================================================== 6. Saving settings *save-settings* diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index 4e4ea39e7c..491e5801c8 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -1,4 +1,4 @@ -*syntax.txt* For Vim version 7.4. Last change: 2016 Jan 28 +*syntax.txt* For Vim version 7.4. Last change: 2016 Apr 10 VIM REFERENCE MANUAL by Bram Moolenaar @@ -936,26 +936,27 @@ To disable them use ":unlet". Example: > :unlet c_comment_strings Variable Highlight ~ -c_gnu GNU gcc specific items -c_comment_strings strings and numbers inside a comment -c_space_errors trailing white space and spaces before a <Tab> -c_no_trail_space_error ... but no trailing spaces -c_no_tab_space_error ... but no spaces before a <Tab> -c_no_bracket_error don't highlight {}; inside [] as errors -c_no_curly_error don't highlight {}; inside [] and () as errors; +*c_gnu* GNU gcc specific items +*c_comment_strings* strings and numbers inside a comment +*c_space_errors* trailing white space and spaces before a <Tab> +*c_no_trail_space_error* ... but no trailing spaces +*c_no_tab_space_error* ... but no spaces before a <Tab> +*c_no_bracket_error* don't highlight {}; inside [] as errors +*c_no_curly_error* don't highlight {}; inside [] and () as errors; except { and } in first column -c_curly_error highlight a missing }; this forces syncing from the +*c_curly_error* highlight a missing }; this forces syncing from the start of the file, can be slow -c_no_ansi don't do standard ANSI types and constants -c_ansi_typedefs ... but do standard ANSI types -c_ansi_constants ... but do standard ANSI constants -c_no_utf don't highlight \u and \U in strings -c_syntax_for_h for *.h files use C syntax instead of C++ and use objc +*c_no_ansi* don't do standard ANSI types and constants +*c_ansi_typedefs* ... but do standard ANSI types +*c_ansi_constants* ... but do standard ANSI constants +*c_no_utf* don't highlight \u and \U in strings +*c_syntax_for_h* for *.h files use C syntax instead of C++ and use objc syntax instead of objcpp -c_no_if0 don't highlight "#if 0" blocks as comments -c_no_cformat don't highlight %-formats in strings -c_no_c99 don't highlight C99 standard items -c_no_c11 don't highlight C11 standard items +*c_no_if0* don't highlight "#if 0" blocks as comments +*c_no_cformat* don't highlight %-formats in strings +*c_no_c99* don't highlight C99 standard items +*c_no_c11* don't highlight C11 standard items +*c_no_bsd* don't highlight BSD specific types When 'foldmethod' is set to "syntax" then /* */ comments and { } blocks will become a fold. If you don't want comments to become a fold use: > @@ -2886,7 +2887,7 @@ You may wish to embed languages into sh. I'll give an example courtesy of Lorance Stinson on how to do this with awk as an example. Put the following file into $HOME/.config/nvim/after/syntax/sh/awkembed.vim: > - " AWK Embedding: {{{1 + " AWK Embedding: " ============== " Shamelessly ripped from aspperl.vim by Aaron Hope. if exists("b:current_syntax") @@ -3345,6 +3346,13 @@ Note that schemas are not actually limited to plain scalars, but this is the only difference between schemas defined in YAML specification and the only difference defined in the syntax file. + +ZSH *zsh.vim* *ft-zsh-syntax* + +The syntax script for zsh allows for syntax-based folding: > + + :let g:zsh_fold_enable = 1 + ============================================================================== 5. Defining a syntax *:syn-define* *E410* @@ -4511,9 +4519,9 @@ in their own color. :colo[rscheme] {name} Load color scheme {name}. This searches 'runtimepath' for the file "colors/{name}.vim". The first one that is found is loaded. - To see the name of the currently active color scheme: > - :colo -< The name is also stored in the g:colors_name variable. + Also searches all plugins in 'packpath', first below + "start" and then under "opt". + Doesn't work recursively, thus you can't use ":colorscheme" in a color scheme script. After the color scheme has been loaded the @@ -5019,6 +5027,9 @@ defaults back: > :syntax reset +It is a bit of a wrong name, since it does not reset any syntax items, it only +affects the highlighting. + This doesn't change the colors for the 'highlight' option. Note that the syntax colors that you set in your vimrc file will also be reset diff --git a/runtime/doc/usr_05.txt b/runtime/doc/usr_05.txt index 5aecf33557..f920fd4591 100644 --- a/runtime/doc/usr_05.txt +++ b/runtime/doc/usr_05.txt @@ -1,4 +1,4 @@ -*usr_05.txt* For Vim version 7.4. Last change: 2012 Nov 20 +*usr_05.txt* For Vim version 7.4. Last change: 2016 Mar 28 VIM USER MANUAL - by Bram Moolenaar @@ -12,10 +12,11 @@ Vim's capabilities. Or define your own macros. |05.1| The vimrc file |05.2| The example vimrc file explained |05.3| Simple mappings -|05.4| Adding a plugin -|05.5| Adding a help file -|05.6| The option window -|05.7| Often used options +|05.4| Adding a package +|05.5| Adding a plugin +|05.6| Adding a help file +|05.7| The option window +|05.8| Often used options Next chapter: |usr_06.txt| Using syntax highlighting Previous chapter: |usr_04.txt| Making small changes @@ -245,7 +246,47 @@ The ":map" command (with no arguments) lists your current mappings. At least the ones for Normal mode. More about mappings in section |40.1|. ============================================================================== -*05.4* Adding a plugin *add-plugin* *plugin* +*05.4* Adding a package *add-package* *vimball-install* + +A package is a set of files that you can add to Vim. There are two kinds of +packages: optional and automatically loaded on startup. + +The Vim distribution comes with a few packages that you can optionally use. +For example, the vimball plugin. This plugin supports creating and using +vimballs (self-installing Vim plugin archives). + +To start using the vimball plugin, add one line to your vimrc file: > + packadd vimball + +That's all! You can also type the command to try it out. Now you can find +help about this plugin: > + :help vimball + +This works, because when `:packadd` loaded the plugin it also added the +package directory in 'runtimepath', so that the help file can be found. The +tags for vimball's help are already created. If you need to generate the help +tags for a package, see the `:helptags` command. + +You can find packages on the Internet in various places. It usually comes as +an archive or as a repository. For an archive you can follow these steps: + 1. create the package directory: > + mkdir -p ~/.local/share/nvim/site/pack/fancy +< "fancy" can be any name of your liking. Use one that describes the + package. + 2. unpack the archive in that directory. This assumes the top + directory in the archive is "start": > + cd ~/.local/share/nvim/site/pack/fancy + unzip /tmp/fancy.zip +< If the archive layout is different make sure that you end up with a + path like this: + ~/.local/share/nvim/site/pack/fancy/start/fancytext/plugin/fancy.vim ~ + Here "fancytext" is the name of the package, it can be anything + else. + +More information about packages can be found here: |packages|. + +============================================================================== +*05.5* Adding a plugin *add-plugin* *plugin* Vim's functionality can be extended by adding plugins. A plugin is nothing more than a Vim script file that is loaded automatically when Vim starts. You @@ -299,10 +340,9 @@ Then copy the file to your plugin directory: Example for Unix (assuming you didn't have a plugin directory yet): > mkdir -p ~/.local/share/nvim/site/plugin - cp /usr/local/share/vim/vim60/macros/justify.vim ~/.local/share/nvim/site/plugin + cp /tmp/yourplugin.vim ~/.local/share/nvim/site/plugin -That's all! Now you can use the commands defined in this plugin to justify -text. +That's all! Now you can use the commands defined in this plugin. Instead of putting plugins directly into the plugin/ directory, you may better organize them by putting them into subdirectories under plugin/. @@ -384,7 +424,7 @@ Further reading: |new-filetype| How to detect a new file type. ============================================================================== -*05.5* Adding a help file *add-local-help* +*05.6* Adding a help file *add-local-help* If you are lucky, the plugin you installed also comes with a help file. We will explain how to install the help file, so that you can easily find help @@ -417,7 +457,7 @@ them through the tag. For writing a local help file, see |write-local-help|. ============================================================================== -*05.6* The option window +*05.7* The option window If you are looking for an option that does what you want, you can search in the help files here: |options|. Another way is by using this command: > @@ -456,7 +496,7 @@ border. This is what the 'scrolloff' option does, it specifies an offset from the window border where scrolling starts. ============================================================================== -*05.7* Often used options +*05.8* Often used options There are an awful lot of options. Most of them you will hardly ever use. Some of the more useful ones will be mentioned here. Don't forget you can diff --git a/runtime/doc/usr_25.txt b/runtime/doc/usr_25.txt index 23d76a8b0f..24420353dd 100644 --- a/runtime/doc/usr_25.txt +++ b/runtime/doc/usr_25.txt @@ -1,4 +1,4 @@ -*usr_25.txt* For Vim version 7.4. Last change: 2014 Oct 29 +*usr_25.txt* For Vim version 7.4. Last change: 2016 Mar 28 VIM USER MANUAL - by Bram Moolenaar @@ -196,12 +196,16 @@ Vim has no built-in way of justifying text. However, there is a neat macro package that does the job. To use this package, execute the following command: > - :runtime macros/justify.vim + :packadd justify + +Or put this line in your |vimrc|: > + + packadd! justify This Vim script file defines a new visual command "_j". To justify a block of text, highlight the text in Visual mode and then execute "_j". Look in the file for more explanations. To go there, do "gf" on this name: -$VIMRUNTIME/macros/justify.vim. +$VIMRUNTIME/pack/dist/opt/justify/plugin/justify.vim. An alternative is to filter the text through an external program. Example: > diff --git a/runtime/doc/usr_29.txt b/runtime/doc/usr_29.txt index e495aad06d..9eb66ce83c 100644 --- a/runtime/doc/usr_29.txt +++ b/runtime/doc/usr_29.txt @@ -1,4 +1,4 @@ -*usr_29.txt* For Vim version 7.4. Last change: 2008 Jun 28 +*usr_29.txt* For Vim version 7.4. Last change: 2016 Feb 27 VIM USER MANUAL - by Bram Moolenaar diff --git a/runtime/doc/usr_41.txt b/runtime/doc/usr_41.txt index a14e722328..4d3ad49f1f 100644 --- a/runtime/doc/usr_41.txt +++ b/runtime/doc/usr_41.txt @@ -1,4 +1,4 @@ -*usr_41.txt* For Vim version 7.4. Last change: 2016 Feb 14 +*usr_41.txt* For Vim version 7.4. Last change: 2016 Apr 12 VIM USER MANUAL - by Bram Moolenaar @@ -768,6 +768,7 @@ Date and Time: *date-functions* *time-functions* strftime() convert time to a string reltime() get the current or elapsed time accurately reltimestr() convert reltime() result to a string + reltimefloat() convert reltime() result to a Float *buffer-functions* *window-functions* *arg-functions* Buffers, windows and the argument list: @@ -889,9 +890,14 @@ Mappings: *mapping-functions* wildmenumode() check if the wildmode is active Testing: *test-functions* - assert_equal() assert that two expressions values are equal + assert_equal() assert that two expressions values are equal + assert_notequal() assert that two expressions values are not equal + assert_match() assert that a pattern matches the value + assert_notmatch() assert that a pattern does not match the value assert_false() assert that an expression is false assert_true() assert that an expression is true + assert_exception() assert that a command throws an exception + assert_fails() assert that a function call fails Various: *various-functions* mode() get current editing mode diff --git a/runtime/doc/usr_toc.txt b/runtime/doc/usr_toc.txt index 77ea462a23..e021b806e3 100644 --- a/runtime/doc/usr_toc.txt +++ b/runtime/doc/usr_toc.txt @@ -1,4 +1,4 @@ -*usr_toc.txt* For Vim version 7.4. Last change: 2010 Jul 20 +*usr_toc.txt* For Vim version 7.4. Last change: 2016 Mar 25 VIM USER MANUAL - by Bram Moolenaar @@ -101,10 +101,11 @@ Read this from start to end to learn the essential commands. |05.1| The vimrc file |05.2| The example vimrc file explained |05.3| Simple mappings - |05.4| Adding a plugin - |05.5| Adding a help file - |05.6| The option window - |05.7| Often used options + |05.4| Adding a package + |05.5| Adding a plugin + |05.6| Adding a help file + |05.7| The option window + |05.8| Often used options |usr_06.txt| Using syntax highlighting |06.1| Switching it on diff --git a/runtime/doc/various.txt b/runtime/doc/various.txt index e6b05e1ab1..eb813866da 100644 --- a/runtime/doc/various.txt +++ b/runtime/doc/various.txt @@ -1,4 +1,4 @@ -*various.txt* For Vim version 7.4. Last change: 2016 Feb 18 +*various.txt* For Vim version 7.4. Last change: 2016 Mar 20 VIM REFERENCE MANUAL by Bram Moolenaar @@ -375,6 +375,7 @@ B *+termguicolors* 24-bit color in xterm-compatible terminals support N *+termresponse* support for |t_RV| and |v:termresponse| N *+textobjects* |text-objects| selection *+tgetent* non-Unix only: able to use external termcap +N *+timers* the |timer_start()| function N *+title* Setting the window 'title' and 'icon' N *+toolbar* |gui-toolbar| N *+user_commands* User-defined commands. |user-commands| diff --git a/runtime/doc/vim_diff.txt b/runtime/doc/vim_diff.txt index d30b0833db..e536ea873a 100644 --- a/runtime/doc/vim_diff.txt +++ b/runtime/doc/vim_diff.txt @@ -70,6 +70,7 @@ Job control |job-control| Remote plugins |remote-plugin| Python plugins |provider-python| Clipboard integration |provider-clipboard| +XDG support OTHER FEATURES ~ @@ -96,6 +97,9 @@ Options: Commands: |:CheckHealth| +Functions: + |capture()| + Events: |TabNew| |TabNewEntered| @@ -121,6 +125,11 @@ are always available and may be used simultaneously in separate plugins. The `neovim` pip package must be installed to use Python plugins in Nvim (see |provider-python|). +|:!| and |system()| do not support "interactive" commands; use |:terminal| for +that instead. Terminal Vim supports interactive |:!| and |system()|, but gui +Vim does not. See ":help gui-pty" in Vim: + http://vimdoc.sourceforge.net/htmldoc/gui_x11.html#gui-pty + |mkdir()| behaviour changed: 1. Assuming /tmp/foo does not exist and /tmp can be written to mkdir('/tmp/foo/bar', 'p', 0700) will create both /tmp/foo and /tmp/foo/bar |