diff options
| author | ZyX <kp-pav@yandex.ru> | 2015-10-17 17:25:53 +0300 |
|---|---|---|
| committer | ZyX <kp-pav@yandex.ru> | 2015-10-23 14:54:10 +0300 |
| commit | 1cdc3298cfb8389b2bc3203da16abc74abb0a0c0 (patch) | |
| tree | c8a68fbcb3c79fe42eff2820f71e34c7dc2afd06 /runtime | |
| parent | a1b0f4073deb7f50e1b7137174bcb9914c97078f (diff) | |
| download | rneovim-1cdc3298cfb8389b2bc3203da16abc74abb0a0c0.tar.gz rneovim-1cdc3298cfb8389b2bc3203da16abc74abb0a0c0.tar.bz2 rneovim-1cdc3298cfb8389b2bc3203da16abc74abb0a0c0.zip | |
documentation: Update documentation
Note about ~/.local/share/nvim/site used in one usr_\* file: this one talks
about user-local installation of third-party plugins, and
~/.local/share/nvim/site is the proper place for them. Most other files talk
about user own configuration and this is ~/.config.
Diffstat (limited to 'runtime')
48 files changed, 372 insertions, 395 deletions
diff --git a/runtime/doc/arabic.txt b/runtime/doc/arabic.txt index 83ce80ec00..6f17b38a7a 100644 --- a/runtime/doc/arabic.txt +++ b/runtime/doc/arabic.txt @@ -104,9 +104,9 @@ o Setting the Arabic fonts font name akin to that used in Linux/Unix systems. (e.g. -misc-fixed-medium-r-normal--20-200-75-75-c-100-iso10646-1) - You can append the 'guifont' set command to your .vimrc file + You can append the 'guifont' set command to your vimrc file in order to get the same above noted results. In other words, - you can include ':set guifont=your_ARABIC_FONT' to your .vimrc + you can include ':set guifont=your_ARABIC_FONT' to your vimrc file. + Under the X Window environment, you can also start VIM with @@ -118,9 +118,9 @@ o Setting the appropriate character Encoding > :set encoding=utf-8 < - to your .vimrc file (entering the command manually into you VIM + to your vimrc file (entering the command manually into you VIM window is highly discouraged). In short, include ':set - encoding=utf-8' to your .vimrc file. + encoding=utf-8' to your vimrc file. Attempts to use Arabic without UTF-8 will result the following warning message, @@ -149,7 +149,7 @@ o Enable Arabic settings [short-cut] 4. enable rightleftcmd mode (affecting the command-line) 5. enable arabicshape mode (do visual character alterations) - You may also append the command to your .vimrc file and simply + You may also append the command to your vimrc file and simply include ':set arabic' to it. You are also capable of disabling Arabic support via @@ -184,8 +184,8 @@ o Enable Arabic settings [short-cut] :set keymap=arabic < in your VIM window. You can also append the 'keymap' set command to - your .vimrc file. In other words, you can include ':set keymap=arabic' - to your .vimrc file. + your vimrc file. In other words, you can include ':set keymap=arabic' + to your vimrc file. To turn toggle (or switch) your keymapping between Arabic and the default mapping (English), it is advised that users use the 'CTRL-^' @@ -206,8 +206,8 @@ o Enable Arabic settings [short-cut] :set delcombine < in our VIM window. You can also append the 'delcombine' set command - to your .vimrc file. In other words, you can include ':set delcombine' - to your .vimrc file. + to your vimrc file. In other words, you can include ':set delcombine' + to your vimrc file. + Arabic right-to-left Mode @@ -221,8 +221,8 @@ o Enable Arabic settings [short-cut] - While in Left-to-right mode, enter ':set rl' in the command line ('rl' is the abbreviation for rightleft). - - Put the ':set rl' line in your '.vimrc' file to start Vim in - right-to-left mode permanently. + - Put the ':set rl' line in your vimrc file to start Vim in + right-to-left mode permanently. + Arabic right-to-left command-line Mode @@ -248,8 +248,8 @@ o Enable Arabic settings [short-cut] :set arabicshape < in our VIM window. You can also append the 'arabicshape' set - command to your .vimrc file. In other words, you can include - ':set arabicshape' to your .vimrc file. + command to your vimrc file. In other words, you can include + ':set arabicshape' to your vimrc file. Keymap/Keyboard *arabickeymap* diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index e922d5b601..7b53bd64ca 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -28,7 +28,7 @@ a file, when entering or leaving a buffer or window, and when exiting Vim. For example, you can create an autocommand to set the 'cindent' option for files matching *.c. You can also use autocommands to implement advanced features, such as editing compressed files (see |gzip-example|). The usual -place to put autocommands is in your .vimrc or .exrc file. +place to put autocommands is in your vimrc file. *E203* *E204* *E143* *E855* WARNING: Using autocommands is very powerful, and may lead to unexpected side @@ -73,8 +73,8 @@ exception is that "<sfile>" is expanded when the autocmd is defined. Example: Here Vim expands <sfile> to the name of the file containing this line. -When your .vimrc file is sourced twice, the autocommands will appear twice. -To avoid this, put this command in your .vimrc file, before defining +When your vimrc file is sourced twice, the autocommands will appear twice. +To avoid this, put this command in your vimrc file, before defining autocommands: > :autocmd! " Remove ALL autocommands for the current group. @@ -695,7 +695,7 @@ FuncUndefined When a user function is used but it isn't GUIEnter After starting the GUI successfully, and after opening the window. It is triggered before VimEnter when using gvim. Can be used to - position the window from a .gvimrc file: > + position the window from a gvimrc file: > :autocmd GUIEnter * winpos 100 50 < *GUIFailed* GUIFailed After starting the GUI failed. Vim may @@ -907,7 +907,7 @@ UserGettingBored When the user presses the same key 42 times. Just kidding! :-) *VimEnter* VimEnter After doing all the startup stuff, including - loading .vimrc files, executing the "-c cmd" + loading vimrc files, executing the "-c cmd" arguments, creating all windows and loading the buffers in them. *VimLeave* @@ -994,7 +994,7 @@ expect. Environment variables can be used in a pattern: > :autocmd BufRead $VIMRUNTIME/doc/*.txt set expandtab And ~ can be used for the home directory (if $HOME is defined): > - :autocmd BufWritePost ~/.vimrc so ~/.vimrc + :autocmd BufWritePost ~/.config/nvim/init.vim so <afile> :autocmd BufRead ~archive/* set readonly The environment variable is expanded when the autocommand is defined, not when the autocommand is executed. This is different from the command! @@ -1135,7 +1135,7 @@ Example: > :augroup END This prevents having the autocommands defined twice (e.g., after sourcing the -.vimrc file again). +vimrc file again). ============================================================================== 9. Executing autocommands *autocmd-execute* @@ -1157,7 +1157,7 @@ option will not cause any commands to be executed. It's possible to use this inside an autocommand too, so you can base the autocommands for one extension on another extension. Example: > - :au BufEnter *.cpp so ~/.vimrc_cpp + :au BufEnter *.cpp so ~/.config/nvim/init_cpp.vim :au BufEnter *.cpp doau BufEnter x.c < Be careful to avoid endless loops. See |autocmd-nested|. diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index 627a7000ec..d85d41a295 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -109,7 +109,7 @@ CTRL-W Delete the |word| before the cursor. This depends on the CTRL-U Remove all characters between the cursor position and the beginning of the line. Previous versions of vim deleted all characters on the line. If that is the - preferred behavior, add the following to your .vimrc: > + preferred behavior, add the following to your vimrc: > :cnoremap <C-U> <C-E><C-U> < *c_<Insert>* *c_Insert* @@ -456,7 +456,7 @@ that take a file name. If you would like using <S-Tab> for CTRL-P in an xterm, put this command in your .cshrc: > xmodmap -e "keysym Tab = Tab Find" -And this in your .vimrc: > +And this in your vimrc: > :cmap <Esc>[1~ <C-P> ============================================================================== @@ -823,8 +823,8 @@ These modifiers can be given, in this order: precede any :r or :e. :r Root of the file name (the last extension removed). When there is only an extension (file name that starts with '.', - e.g., ".vimrc"), it is not removed. Can be repeated to remove - several extensions (last one first). + e.g., ".nvimrc"), it is not removed. Can be repeated to + remove several extensions (last one first). :e Extension of the file name. Only makes sense when used alone. When there is no extension the result is empty. When there is only an extension (file name that starts with diff --git a/runtime/doc/debug.txt b/runtime/doc/debug.txt index 3226fa4599..f03116ffed 100644 --- a/runtime/doc/debug.txt +++ b/runtime/doc/debug.txt @@ -52,7 +52,7 @@ Use this command to start Vim: > valgrind --log-file=valgrind.log --leak-check=full ./vim -Note: Vim will run much slower. If your .vimrc is big or you have several +Note: Vim will run much slower. If your vimrc is big or you have several plugins you need to be patient for startup, or run with the "-u NONE" argument. diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index 250275d80a..54d47eb28a 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -66,7 +66,7 @@ make changes after loading a file, these will be included in the displayed diffs. You might have to do ":diffupdate" now and then, not all changes are immediately taken into account. -In your .vimrc file you could do something special when Vim was started in +In your vimrc file you could do something special when Vim was started in diff mode. You could use a construct like this: > if &diff diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 0a17521c08..06082774cf 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -3441,7 +3441,7 @@ getfperm({fname}) *getfperm()* If a user does not have a given permission the flag for this is replaced with the string "-". Examples: > :echo getfperm("/etc/passwd") - :echo getfperm(expand("~/.vimrc")) + :echo getfperm(expand("~/.config/nvim/init.vim")) < This will hopefully (from a security point of view) display the string "rw-r--r--" or even "rw-------". @@ -4668,10 +4668,10 @@ msgpackdump({list}) {Nvim} *msgpackdump()* msgpackparse({list}) {Nvim} *msgpackparse()* Convert a |readfile()|-style list to a list of VimL objects. Example: > - let fname = expand('~/.nvim/shada/main.shada') + let fname = expand('~/.config/nvim/shada/main.shada') let mpack = readfile(fname, 'b') let shada_objects = msgpackparse(mpack) -< This will read ~/.nvim/shada/main.shada file to +< This will read ~/.config/nvim/shada/main.shada file to `shada_objects` list. Limitations: @@ -4770,8 +4770,8 @@ pathshorten({expr}) *pathshorten()* result. The tail, the file name, is kept as-is. The other components in the path are reduced to single letters. Leading '~' and '.' characters are kept. Example: > - :echo pathshorten('~/.vim/autoload/myfile.vim') -< ~/.v/a/myfile.vim ~ + :echo pathshorten('~/.config/nvim/autoload/file1.vim') +< ~/.v/a/file1.vim ~ It doesn't matter if the path exists or not. pow({x}, {y}) *pow()* @@ -7274,8 +7274,8 @@ like this: > When such a function is called, and it is not defined yet, Vim will search the "autoload" directories in 'runtimepath' for a script file called -"filename.vim". For example "~/.vim/autoload/filename.vim". That file should -then define the function like this: > +"filename.vim". For example "~/.config/nvim/autoload/filename.vim". That +file should then define the function like this: > function filename#funcname() echo "Done!" @@ -9080,7 +9080,7 @@ A few options contain an expression. When this expression is evaluated it may have to be done in the sandbox to avoid a security risk. But the sandbox is restrictive, thus this only happens when the option was set from an insecure location. Insecure in this context are: -- sourcing a .vimrc or .exrc in the current directory +- sourcing a .nvimrc or .exrc in the current directory - while executing in the sandbox - value coming from a modeline diff --git a/runtime/doc/farsi.txt b/runtime/doc/farsi.txt index 49d9933f48..d5b371ab40 100644 --- a/runtime/doc/farsi.txt +++ b/runtime/doc/farsi.txt @@ -122,8 +122,7 @@ o Setting the Farsi fonts ':set guifont=far-a01' in the Vim window. You can have 'guifont' set to far-a01 by Vim during the Vim startup - by appending the ':set guifont=far-a01' into your .vimrc file - (in case of NT/95/98 platforms _vimrc). + by appending the ':set guifont=far-a01' into your vimrc file. Under the X Window environment, you can also start Vim with the '-fn far-a01' option. @@ -139,7 +138,7 @@ o Farsi Keymapping Activation To activate the Farsi keymapping, set either 'altkeymap' or 'fkmap'. This is done by entering ':set akm' or ':set fk' in the Vim window. You can have 'altkeymap' or 'fkmap' set as default by appending ':set akm' - or ':set fk' in your .vimrc file or _vimrc in case of NT/95/98 platforms. + or ':set fk' in your vimrc file. To turn off the Farsi keymapping as a default second language keymapping, reset the 'altkeymap' by entering ':set noakm'. @@ -156,8 +155,8 @@ o right-to-left Farsi Mode + While in Left-to-right mode, enter 'set rl' in the command line ('rl' is the abbreviation for rightleft). - + Put the 'set rl' line in your '.vimrc' file to start Vim in - right-to-left mode permanently. + + Put the 'set rl' line in your vimrc file to start Vim in right-to-left + mode permanently. Encoding -------- diff --git a/runtime/doc/filetype.txt b/runtime/doc/filetype.txt index 33d551d507..d1f8b1de4c 100644 --- a/runtime/doc/filetype.txt +++ b/runtime/doc/filetype.txt @@ -162,8 +162,7 @@ A. If you want to overrule all default file type checks. 1. Create your user runtime directory. You would normally use the first item of the 'runtimepath' option. Then create the directory "ftdetect" inside it. Example for Unix: > - :!mkdir ~/.vim - :!mkdir ~/.vim/ftdetect + :!mkdir -p ~/.config/nvim/ftdetect < 2. Create a file that contains an autocommand to detect the file type. Example: > @@ -173,7 +172,7 @@ A. If you want to overrule all default file type checks. check the contents of the file to recognize it. Write this file as "mine.vim" in the "ftdetect" directory in your user runtime directory. For example, for Unix: > - :w ~/.vim/ftdetect/mine.vim + :w ~/.config/nvim/ftdetect/mine.vim < 3. To use the new filetype detection you must restart Vim. @@ -196,7 +195,7 @@ B. If you want to detect your file after the default file type checks. C. If your file type can be detected by the file name. 1. Create your user runtime directory. You would normally use the first item of the 'runtimepath' option. Example for Unix: > - :!mkdir ~/.vim + :!mkdir -p ~/.config/nvim < 2. Create a file that contains autocommands to detect the file type. Example: > @@ -210,7 +209,7 @@ C. If your file type can be detected by the file name. augroup END < Write this file as "filetype.vim" in your user runtime directory. For example, for Unix: > - :w ~/.vim/filetype.vim + :w ~/.config/nvim/filetype.vim < 3. To use the new filetype detection you must restart Vim. @@ -224,7 +223,7 @@ D. If your filetype can only be detected by inspecting the contents of the 1. Create your user runtime directory. You would normally use the first item of the 'runtimepath' option. Example for Unix: > - :!mkdir ~/.vim + :!mkdir -p ~/.config/nvim < 2. Create a vim script file for doing this. Example: > if did_filetype() " filetype already set.. @@ -238,7 +237,7 @@ D. If your filetype can only be detected by inspecting the contents of the < See $VIMRUNTIME/scripts.vim for more examples. Write this file as "scripts.vim" in your user runtime directory. For example, for Unix: > - :w ~/.vim/scripts.vim + :w ~/.config/nvim/scripts.vim < 3. The detection will work right away, no need to restart Vim. @@ -268,12 +267,12 @@ all loaded. For example, if this command: > produces this output: - runtimepath=/etc/vim,~/.vim,/usr/local/share/vim/vim60 ~ + runtimepath=/etc/vim,~/.config/nvim,/usr/local/share/vim/vim60 ~ then Vim will load all plugins in these directories and below: /etc/vim/plugin/ ~ - ~/.vim/plugin/ ~ + ~/.config/nvim/plugin/ ~ /usr/local/share/vim/vim60/plugin/ ~ Note that the last one is the value of $VIMRUNTIME which has been expanded. @@ -329,7 +328,7 @@ ways to change this: 1. Add a few settings. You must create a new filetype plugin in a directory early in 'runtimepath'. For Unix, for example you could use this file: > - vim ~/.vim/ftplugin/fortran.vim + vim ~/.config/nvim/ftplugin/fortran.vim < You can set those settings and mappings that you would like to add. Note that the global plugin will be loaded after this, it may overrule the settings that you do here. If this is the case, you need to use one of the @@ -338,7 +337,7 @@ ways to change this: 2. Make a copy of the plugin and change it. You must put the copy in a directory early in 'runtimepath'. For Unix, for example, you could do this: > - cp $VIMRUNTIME/ftplugin/fortran.vim ~/.vim/ftplugin/fortran.vim + cp $VIMRUNTIME/ftplugin/fortran.vim ~/.config/nvim/ftplugin/fortran.vim < Then you can edit the copied file to your liking. Since the b:did_ftplugin variable will be set, the global plugin will not be loaded. A disadvantage of this method is that when the distributed plugin gets @@ -347,7 +346,7 @@ ways to change this: 3. Overrule the settings after loading the global plugin. You must create a new filetype plugin in a directory from the end of 'runtimepath'. For Unix, for example, you could use this file: > - vim ~/.vim/after/ftplugin/fortran.vim + vim ~/.config/nvim/after/ftplugin/fortran.vim < In this file you can change just those settings that you want to change. ============================================================================== @@ -376,7 +375,7 @@ Global mappings: NOTE: The global mappings are accessed by sourcing the ftplugin/changelog.vim file first, e.g. with > runtime ftplugin/changelog.vim -< in your |.vimrc|. +< in your |init.vim|. <Leader>o Switches to the ChangeLog buffer opened for the current directory, or opens it in a new buffer if it exists in the current directory. Then it does the @@ -478,7 +477,7 @@ FORTRAN *ft-fortran-plugin* Options: 'expandtab' is switched on to avoid tabs as required by the Fortran - standards unless the user has set fortran_have_tabs in .vimrc. + standards unless the user has set fortran_have_tabs in vimrc. 'textwidth' is set to 72 for fixed source format as required by the Fortran standards and to 80 for free source format. 'formatoptions' is set to break code and comment lines and to preserve long diff --git a/runtime/doc/ft_ada.txt b/runtime/doc/ft_ada.txt index dcab23ccb2..1e81acff67 100644 --- a/runtime/doc/ft_ada.txt +++ b/runtime/doc/ft_ada.txt @@ -58,7 +58,7 @@ To disable them use ":unlet". Example: You can just use ":" and type these into the command line to set these temporarily before loading an Ada file. You can make these option settings -permanent by adding the "let" command(s), without a colon, to your "~/.vimrc" +permanent by adding the "let" command(s), without a colon, to your |init.vim| file. Even on a slow (90Mhz) PC this mode works quickly, but if you find the diff --git a/runtime/doc/ft_sql.txt b/runtime/doc/ft_sql.txt index 2c9c1571d3..75c55269ef 100644 --- a/runtime/doc/ft_sql.txt +++ b/runtime/doc/ft_sql.txt @@ -149,7 +149,7 @@ The above will also handle these cases: > ); By default, the ftplugin only searches for CREATE statements. You can also -override this via your |vimrc| with the following: > +override this via your |init.vim| with the following: > let g:ftplugin_sql_statements = 'create,alter' The filetype plugin defines three types of comments: > @@ -227,7 +227,7 @@ you must either create: 3. Manual steps / commands The majority of people work with only one vendor's database product, it would -be nice to specify a default in your |vimrc|. +be nice to specify a default in your |init.vim|. 2.1 SQLSetType *sqlsettype* *SQLSetType* @@ -273,12 +273,12 @@ This will echo: > ----------------------- As mentioned earlier, the default syntax rules for Vim is based on Oracle (PL/SQL). You can override this default by placing one of the following in -your |vimrc|: > +your |init.vim|: > let g:sql_type_default = 'sqlanywhere' let g:sql_type_default = 'sqlinformix' let g:sql_type_default = 'mysql' -If you added the following to your |vimrc|: > +If you added the following to your |init.vim|: > let g:sql_type_default = 'sqlinformix' The next time edit a SQL file the following scripts will be automatically @@ -304,11 +304,8 @@ To help identify these scripts, try to create the files with a "sql" prefix. If you decide you wish to create customizations for the SQLite database, you can create any of the following: > Unix - ~/.vim/syntax/sqlite.vim - ~/.vim/indent/sqlite.vim - Windows - $VIM/vimfiles/syntax/sqlite.vim - $VIM/vimfiles/indent/sqlite.vim + ~/.config/nvim/syntax/sqlite.vim + ~/.config/nvim/indent/sqlite.vim No changes are necessary to the SQLSetType function. It will automatically pickup the new SQL files and load them when you issue the SQLSetType command. @@ -341,8 +338,8 @@ The defaults static maps are: > imap <buffer> <C-C>T <C-\><C-O>:call sqlcomplete#Map('sqlType')<CR><C-X><C-O> imap <buffer> <C-C>s <C-\><C-O>:call sqlcomplete#Map('sqlStatement')<CR><C-X><C-O> -The use of "<C-C>" can be user chosen by using the following in your |.vimrc| as it -may not work properly on all platforms: > +The use of "<C-C>" can be user chosen by using the following in your +|init.vim| as it may not work properly on all platforms: > let g:ftplugin_sql_omni_key = '<C-C>' > The static maps (which are based on the syntax highlight groups) follow this @@ -440,7 +437,7 @@ the space bar): - This allows you to quickly drill down into a table to view its columns and back again. - <Right> and <Left> can be also be chosen via - your |.vimrc| > + your |init.vim| > let g:ftplugin_sql_omni_key_right = '<Right>' let g:ftplugin_sql_omni_key_left = '<Left>' @@ -604,7 +601,7 @@ database. ---------------------------- The SQL completion plugin can be customized through various options set in -your |vimrc|: > +your |init.vim|: > omni_sql_no_default_maps < - Default: This variable is not defined - If this variable is defined, no maps are created for OMNI @@ -723,7 +720,7 @@ will be specifying different syntax highlight groups. If you do not wish the default maps created or the key choices do not work on your platform (often a case on *nix) you define the following variable in -your |vimrc|: > +your |init.vim|: > let g:omni_sql_no_default_maps = 1 Do no edit ftplugin/sql.vim directly! If you change this file your changes diff --git a/runtime/doc/gui.txt b/runtime/doc/gui.txt index 12fca33d64..90f772c46f 100644 --- a/runtime/doc/gui.txt +++ b/runtime/doc/gui.txt @@ -26,10 +26,10 @@ How to start the GUI depends on the system used. Mostly you can run the GUI version of Vim with: gvim [options] [files...] - *gui-init* *gvimrc* *.gvimrc* *_gvimrc* *$MYGVIMRC* + *ginit.vim* *gui-init* *gvimrc* *$MYGVIMRC* The gvimrc file is where GUI-specific startup commands should be placed. It -is always sourced after the |vimrc| file. If you have one then the $MYGVIMRC -environment variable has its name. +is always sourced after the |init.vim| file. If you have one then the +$MYGVIMRC environment variable has its name. When the GUI starts up initializations are carried out, in this order: - The 'term' option is set to "builtin_gui" and terminal options are reset to @@ -39,7 +39,7 @@ When the GUI starts up initializations are carried out, in this order: see |$VIMRUNTIME|. To skip loading the system menu include 'M' in 'guioptions'. *buffers-menu* *no_buffers_menu* The system menu file includes a "Buffers" menu. If you don't want this, set - the "no_buffers_menu" variable in your .vimrc (not .gvimrc!): > + the "no_buffers_menu" variable in your init.vim (not ginit.vim!): > < |