diff options
Diffstat (limited to 'runtime/doc')
-rw-r--r-- | runtime/doc/eval.txt | 2 | ||||
-rw-r--r-- | runtime/doc/os_win32.txt | 27 | ||||
-rw-r--r-- | runtime/doc/repeat.txt | 83 | ||||
-rw-r--r-- | runtime/doc/starting.txt | 3 |
4 files changed, 82 insertions, 33 deletions
diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 146f62c770..4122b27fd8 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 Mar 03 +*eval.txt* For Vim version 7.4. Last change: 2016 Mar 07 VIM REFERENCE MANUAL by Bram Moolenaar 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/repeat.txt b/runtime/doc/repeat.txt index 122e995f0a..ea86be5bf7 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 Mar 04 +*repeat.txt* For Vim version 7.4. Last change: 2016 Mar 07 VIM REFERENCE MANUAL by Bram Moolenaar @@ -405,57 +405,80 @@ Rationale: 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. - That makes it easy to updated and/or remove. + 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 `:loadplugin`. + 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/mypack.zip": - % mkdir -p ~/.local/share/nvim/site/pack/my - % cd ~/.local/share/nvim/site/pack/my - % unzip /tmp/mypack.zip +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 "my" is arbitrary, you can pick anything you like. +The directory name "foo" is arbitrary, you can pick anything you like. You would now have these files under ~/.local/share/nvim/site: - pack/my/README.txt - pack/my/ever/always/plugin/always.vim - pack/my/ever/always/syntax/always.vim - pack/my/opt/mydebug/plugin/debugger.vim + pack/foo/README.txt + pack/foo/ever/foobar/plugin/foo.vim + pack/foo/ever/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/*/ever" directory and loads them. The +directory is added to 'runtimepath'. + +In the example Vim will find "pack/foo/ever/foobar/plugin/foo.vim" and adds +"~/.local/share/nvim/site/pack/foo/ever/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" or not loaded automatically, only the +ones under "pack/foo/ever". See |pack-add| below for how the "opt" directory +is used. + +Loading packages will not happen if loading plugins is disabled, see +|load-plugins|. + + +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/my/ever/always - % cd ~/.local/share/nvim/site/pack/my/ever/always - % unzip /tmp/myplugin.zip - -When Vim starts up it scans all directories in 'packpath' for plugins under the -"ever" directory and loads them. When found that directory is added to -'runtimepath'. + % mkdir -p ~/.local/share/nvim/site/pack/foo/ever/foobar + % cd ~/.local/share/nvim/site/pack/foo/ever/foobar + % unzip /tmp/someplugin.zip -In the example Vim will find "my/ever/always/plugin/always.vim" and adds -"~/.local/share/nvim/site/pack/my/ever/always" to 'runtimepath'. +You would now have these files: + pack/foo/ever/foobar/plugin/foo.vim + pack/foo/ever/foobar/syntax/some.vim -If the "always" plugin kicks in and sets the 'filetype' to "always", Vim will -find the syntax/always.vim file, because its directory is in 'runtimepath'. +From here it works like above. -Vim will also load ftdetect files, like with |:packadd|. +Optional plugins ~ *pack-add* To load an optional plugin from a pack use the `:packadd` command: > - :packadd mydebug -This could be done inside always.vim, if some conditions are met. -Or you could add this command to your |.vimrc|. + :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 inside always.vim, if some conditions are met. Or you +could add this command to your |.vimrc|. 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. -Loading packages will not happen if loading plugins is disabled, see -|load-plugins|. - ============================================================================== 6. Debugging scripts *debug-scripts* diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index bd02e21752..bda5254663 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 Mar 03 +*starting.txt* For Vim version 7.4. Last change: 2016 Mar 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 |