mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-04 01:34:25 +00:00 
			
		
		
		
	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.
This commit is contained in:
		@@ -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,7 +221,7 @@ 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
 | 
			
		||||
      - 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*
 | 
			
		||||
 
 | 
			
		||||
@@ -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|.
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
--------
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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!): >
 | 
			
		||||
	:let no_buffers_menu = 1
 | 
			
		||||
< NOTE: Switching on syntax highlighting also loads the menu file, thus
 | 
			
		||||
  disabling the Buffers menu must be done before ":syntax on".
 | 
			
		||||
@@ -51,29 +51,26 @@ When the GUI starts up initializations are carried out, in this order:
 | 
			
		||||
  initializations are skipped.  When {gvimrc} is "NONE" no file will be read
 | 
			
		||||
  for initializations.
 | 
			
		||||
- For Unix and MS-Windows, if the system gvimrc exists, it is sourced.  The
 | 
			
		||||
  name of this file is normally "$VIM/gvimrc".  You can check this with
 | 
			
		||||
  name of this file is normally "$VIM/ginit.vim".  You can check this with
 | 
			
		||||
  ":version".  Also see |$VIM|.
 | 
			
		||||
- The following are tried, and only the first one that exists is used:
 | 
			
		||||
  - If the GVIMINIT environment variable exists and is not empty, it is
 | 
			
		||||
    executed as an Ex command.
 | 
			
		||||
  - If the user gvimrc file exists, it is sourced.  The name of this file is
 | 
			
		||||
    normally "$HOME/.gvimrc".  You can check this with ":version".
 | 
			
		||||
  - For Win32, when $HOME is not set, "$VIM\_gvimrc" is used.
 | 
			
		||||
  - When a "_gvimrc" file is not found, ".gvimrc" is tried too.  And vice
 | 
			
		||||
    versa.
 | 
			
		||||
    normally "$XDG_CONFIG_HOME/nvim/ginit.vim" ($XDG_CONFIG_HOME defaults to 
 | 
			
		||||
    ~/.config).
 | 
			
		||||
  The name of the first file found is stored in $MYGVIMRC, unless it was
 | 
			
		||||
  already set.
 | 
			
		||||
- If the 'exrc' option is set (which is NOT the default) the file ./.gvimrc
 | 
			
		||||
- If the 'exrc' option is set (which is NOT the default) the file ./.ngvimrc
 | 
			
		||||
  is sourced, if it exists and isn't the same file as the system or user
 | 
			
		||||
  gvimrc file.  If this file is not owned by you, some security restrictions
 | 
			
		||||
  apply.  When ".gvimrc" is not found, "_gvimrc" is tried too.  For Macintosh
 | 
			
		||||
  and DOS/Win32 "_gvimrc" is tried first.
 | 
			
		||||
  apply.  When ".ngvimrc" is not found, "_ngvimrc" is tried too.
 | 
			
		||||
 | 
			
		||||
NOTE: All but the first one are not carried out if Vim was started with
 | 
			
		||||
"-u NONE" and no "-U" argument was given, or when started with "-U NONE".
 | 
			
		||||
 | 
			
		||||
All this happens AFTER the normal Vim initializations, like reading your
 | 
			
		||||
.vimrc file.  See |initialization|.
 | 
			
		||||
vimrc file.  See |initialization|.
 | 
			
		||||
But the GUI window is only opened after all the initializations have been
 | 
			
		||||
carried out.  If you want some commands to be executed just after opening the
 | 
			
		||||
GUI window, use the |GUIEnter| autocommand event.  Example: >
 | 
			
		||||
@@ -84,9 +81,8 @@ and initialize other things that you may want to set up differently from the
 | 
			
		||||
terminal version.
 | 
			
		||||
 | 
			
		||||
Recommended place for your personal GUI initializations:
 | 
			
		||||
	Unix		    $HOME/.gvimrc or $HOME/.vim/gvimrc
 | 
			
		||||
	MS-DOS and Win32    $HOME/_gvimrc, $HOME/vimfiles/gvimrc
 | 
			
		||||
			    or $VIM/_gvimrc
 | 
			
		||||
	Unix		$XDG_CONFIG_HOME/.config/nvim/ginit.vim
 | 
			
		||||
			(default for $XDG_CONFIG_HOME is ~/.config)
 | 
			
		||||
 | 
			
		||||
The personal initialization files are searched in the order specified above
 | 
			
		||||
and only the first one that is found is read.
 | 
			
		||||
@@ -464,7 +460,7 @@ The default menus are read from the file "$VIMRUNTIME/menu.vim".  See
 | 
			
		||||
Starting off with the default set is a good idea.  You can add more items, or,
 | 
			
		||||
if you don't like the defaults at all, start with removing all menus
 | 
			
		||||
|:unmenu-all|.  You can also avoid the default menus being loaded by adding
 | 
			
		||||
this line to your .vimrc file (NOT your .gvimrc file!): >
 | 
			
		||||
this line to your vimrc file (NOT your gvimrc file!): >
 | 
			
		||||
	:let did_install_default_menus = 1
 | 
			
		||||
If you also want to avoid the Syntax menu: >
 | 
			
		||||
	:let did_install_syntax_menu = 1
 | 
			
		||||
@@ -479,7 +475,7 @@ Although this documentation is in the GUI section, you can actually use menus
 | 
			
		||||
in console mode too.  You will have to load |menu.vim| explicitly then, it is
 | 
			
		||||
not done by default.  You can use the |:emenu| command and command-line
 | 
			
		||||
completion with 'wildmenu' to access the menu entries almost like a real menu
 | 
			
		||||
system.  To do this, put these commands in your .vimrc file: >
 | 
			
		||||
system.  To do this, put these commands in your vimrc file: >
 | 
			
		||||
	:source $VIMRUNTIME/menu.vim
 | 
			
		||||
	:set wildmenu
 | 
			
		||||
	:set cpo-=<
 | 
			
		||||
 
 | 
			
		||||
@@ -316,7 +316,7 @@ When referring to a Vim option in the help file, place the option name between
 | 
			
		||||
two single quotes, eg. 'statusline'
 | 
			
		||||
 | 
			
		||||
When referring to any other technical term, such as a filename or function
 | 
			
		||||
parameter, surround it in backticks (`), eg. `~/.path/to/nvimrc`.
 | 
			
		||||
parameter, surround it in backticks (`), eg. `~/.path/to/init.vim`.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
HIGHLIGHTING
 | 
			
		||||
 
 | 
			
		||||
@@ -241,8 +241,8 @@ through your tags file(s).
 | 
			
		||||
3. Cscope options					*cscope-options*
 | 
			
		||||
 | 
			
		||||
Use the |:set| command to set all cscope options.  Ideally, you would do
 | 
			
		||||
this in one of your startup files (e.g., .vimrc).  Some cscope related
 | 
			
		||||
variables are only valid within |.vimrc|.  Setting them after vim has
 | 
			
		||||
this in one of your startup files (e.g., vimrc).  Some cscope related
 | 
			
		||||
variables are only valid within |init.vim|.  Setting them after vim has
 | 
			
		||||
started will have no effect!
 | 
			
		||||
 | 
			
		||||
							*cscopeprg* *csprg*
 | 
			
		||||
@@ -292,10 +292,10 @@ Examples: >
 | 
			
		||||
						*cscopeverbose* *csverb*
 | 
			
		||||
If 'cscopeverbose' is not set (the default), messages will not be printed
 | 
			
		||||
indicating success or failure when adding a cscope database.  Ideally, you
 | 
			
		||||
should reset this option in your |.vimrc| before adding any cscope databases,
 | 
			
		||||
and after adding them, set it.  From then on, when you add more databases
 | 
			
		||||
within Vim, you will get a (hopefully) useful message should the database fail
 | 
			
		||||
to be added.  Examples: >
 | 
			
		||||
should reset this option in your |init.vim| before adding any cscope 
 | 
			
		||||
databases, and after adding them, set it.  From then on, when you add more 
 | 
			
		||||
databases within Vim, you will get a (hopefully) useful message should the 
 | 
			
		||||
database fail to be added.  Examples: >
 | 
			
		||||
	:set csverb
 | 
			
		||||
	:set nocsverb
 | 
			
		||||
<
 | 
			
		||||
@@ -317,7 +317,7 @@ refer to the cscope man page for more details.
 | 
			
		||||
 | 
			
		||||
Assuming you have a cscope database, you need to "add" the database to Vim.
 | 
			
		||||
This establishes a cscope "connection" and makes it available for Vim to use.
 | 
			
		||||
You can do this in your .vimrc file, or you can do it manually after starting
 | 
			
		||||
You can do this in your vimrc file, or you can do it manually after starting
 | 
			
		||||
vim.  For example, to add the cscope database "cscope.out", you would do:
 | 
			
		||||
 | 
			
		||||
	:cs add cscope.out
 | 
			
		||||
@@ -366,7 +366,7 @@ is not configurable (e.g., you can't do a tselect instead).
 | 
			
		||||
==============================================================================
 | 
			
		||||
6. Suggested usage					*cscope-suggestions*
 | 
			
		||||
 | 
			
		||||
Put these entries in your .vimrc (adjust the pathname accordingly to your
 | 
			
		||||
Put these entries in your vimrc (adjust the pathname accordingly to your
 | 
			
		||||
setup): >
 | 
			
		||||
 | 
			
		||||
	if has("cscope")
 | 
			
		||||
 
 | 
			
		||||
@@ -718,7 +718,7 @@ also left unindented because continue statements are also used for purposes
 | 
			
		||||
other than ending a do loop.  Programs such as Tidy can convert structured
 | 
			
		||||
do/continue loops to the do/enddo form.  Do loops of the do/enddo variety can
 | 
			
		||||
be indented.  If you use only structured loops of the do/enddo form, you should
 | 
			
		||||
declare this by setting the fortran_do_enddo variable in your .vimrc as
 | 
			
		||||
declare this by setting the fortran_do_enddo variable in your vimrc as
 | 
			
		||||
follows >
 | 
			
		||||
 | 
			
		||||
   let fortran_do_enddo=1
 | 
			
		||||
@@ -737,7 +737,7 @@ The indenting of program units (subroutines, functions, modules, and program
 | 
			
		||||
blocks) is enabled by default but can be suppressed if a lighter, screen-width
 | 
			
		||||
preserving indent style is desired.  To suppress the indenting of program
 | 
			
		||||
units for all fortran files set the global fortran_indent_less variable in
 | 
			
		||||
your .vimrc as follows >
 | 
			
		||||
your vimrc as follows >
 | 
			
		||||
 | 
			
		||||
  let fortran_indent_less=1
 | 
			
		||||
 | 
			
		||||
@@ -969,7 +969,7 @@ VERILOG							*ft-verilog-indent*
 | 
			
		||||
General block statements such as if, for, case, always, initial, function,
 | 
			
		||||
specify and begin, etc., are indented.  The module block statements (first
 | 
			
		||||
level blocks) are not indented by default.  you can turn on the indent with
 | 
			
		||||
setting a variable in the .vimrc as follows: >
 | 
			
		||||
setting a variable in the vimrc as follows: >
 | 
			
		||||
 | 
			
		||||
  let b:verilog_indent_modules = 1
 | 
			
		||||
 | 
			
		||||
@@ -1017,7 +1017,7 @@ To turn this off, add >
 | 
			
		||||
 | 
			
		||||
  let g:vhdl_indent_genportmap = 0
 | 
			
		||||
 | 
			
		||||
to the .vimrc file, which causes the previous alignment example to change: >
 | 
			
		||||
to the vimrc file, which causes the previous alignment example to change: >
 | 
			
		||||
 | 
			
		||||
  ENTITY sync IS
 | 
			
		||||
  PORT (
 | 
			
		||||
@@ -1041,7 +1041,7 @@ To turn this off, add >
 | 
			
		||||
 | 
			
		||||
  let g:vhdl_indent_rhsassign = 0
 | 
			
		||||
 | 
			
		||||
to the .vimrc file, which causes the previous alignment example to change: >
 | 
			
		||||
to the vimrc file, which causes the previous alignment example to change: >
 | 
			
		||||
 | 
			
		||||
  sig_out <= (bus_a(1) AND
 | 
			
		||||
    (sig_b OR sig_c)) OR
 | 
			
		||||
 
 | 
			
		||||
@@ -1257,9 +1257,9 @@ A compiled .exe for MS-Windows can be found at:
 | 
			
		||||
 | 
			
		||||
If you want to complete system functions you can do something like this.  Use
 | 
			
		||||
ctags to generate a tags file for all the system header files: >
 | 
			
		||||
	% ctags -R -f ~/.vim/systags /usr/include /usr/local/include
 | 
			
		||||
	% ctags -R -f ~/.config/nvim/systags /usr/include /usr/local/include
 | 
			
		||||
In your vimrc file add this tags file to the 'tags' option: >
 | 
			
		||||
	set tags+=~/.vim/systags
 | 
			
		||||
	set tags+=~/.config/nvim/systags
 | 
			
		||||
 | 
			
		||||
When using CTRL-X CTRL-O after a name without any "." or "->" it is completed
 | 
			
		||||
from the tags file directly.  This works for any identifier, also function
 | 
			
		||||
@@ -1459,7 +1459,7 @@ minimal language-sensitive completion.
 | 
			
		||||
To enable syntax code completion you can run: >
 | 
			
		||||
    setlocal omnifunc=syntaxcomplete#Complete
 | 
			
		||||
 | 
			
		||||
You can automate this by placing the following in your |.vimrc| (after any
 | 
			
		||||
You can automate this by placing the following in your |init.vim| (after any
 | 
			
		||||
":filetype" command): >
 | 
			
		||||
    if has("autocmd") && exists("+omnifunc")
 | 
			
		||||
	autocmd Filetype *
 | 
			
		||||
 
 | 
			
		||||
@@ -435,7 +435,7 @@ last defined.  Example: >
 | 
			
		||||
 | 
			
		||||
	:verbose map <C-W>*
 | 
			
		||||
	n  <C-W>*      * <C-W><C-S>*
 | 
			
		||||
		Last set from /home/abcd/.vimrc
 | 
			
		||||
		Last set from ~/.config/nvim/init.vim
 | 
			
		||||
 | 
			
		||||
See |:verbose-cmd| for more information.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -222,7 +222,7 @@ To use a locale in Vim only, use the |:language| command: >
 | 
			
		||||
 | 
			
		||||
	:language ko
 | 
			
		||||
 | 
			
		||||
Put this in your ~/.vimrc file to use it always.
 | 
			
		||||
Put this in your |init.vim| file to use it always.
 | 
			
		||||
 | 
			
		||||
Or specify $LANG when starting Vim:
 | 
			
		||||
 | 
			
		||||
@@ -684,7 +684,7 @@ that works well you can use this command to see its name: >
 | 
			
		||||
 | 
			
		||||
	:set guifont
 | 
			
		||||
 | 
			
		||||
Then add a command to your |gvimrc| file to set 'guifont': >
 | 
			
		||||
Then add a command to your |ginit.vim| file to set 'guifont': >
 | 
			
		||||
 | 
			
		||||
	:set guifont=courier_new:h12
 | 
			
		||||
 | 
			
		||||
@@ -928,7 +928,7 @@ Cursor color when IME or XIM is on				*CursorIM*
 | 
			
		||||
    This works in the same way when using XIM.
 | 
			
		||||
 | 
			
		||||
    You can select cursor color when status is on by using highlight group
 | 
			
		||||
    CursorIM.  For example, add these lines to your |gvimrc|: >
 | 
			
		||||
    CursorIM.  For example, add these lines to your |ginit.vim|: >
 | 
			
		||||
 | 
			
		||||
	if has('multi_byte_ime')
 | 
			
		||||
	    highlight Cursor guifg=NONE guibg=Green
 | 
			
		||||
 
 | 
			
		||||
@@ -216,7 +216,7 @@ there is no different error message for that.
 | 
			
		||||
  Command not allowed from exrc/vimrc in current dir or tag search
 | 
			
		||||
 | 
			
		||||
Some commands are not allowed for security reasons.  These commands mostly
 | 
			
		||||
come from a .exrc or .vimrc file in the current directory, or from a tags
 | 
			
		||||
come from a .exrc or .nvimrc file in the current directory, or from a tags
 | 
			
		||||
file.  Also see 'secure'.
 | 
			
		||||
 | 
			
		||||
							*E74*  >
 | 
			
		||||
 
 | 
			
		||||
@@ -149,7 +149,7 @@ If you find a menu translation file for your language with a different name,
 | 
			
		||||
create a file in your own runtime directory to load that one.  The name of
 | 
			
		||||
that file could be: >
 | 
			
		||||
 | 
			
		||||
	~/.vim/lang/menu_<v:lang>.vim
 | 
			
		||||
	~/.config/nvim/lang/menu_<v:lang>.vim
 | 
			
		||||
 | 
			
		||||
Check the 'runtimepath' option for directories which are searched.  In that
 | 
			
		||||
file put a command to load the menu file with the other name: >
 | 
			
		||||
 
 | 
			
		||||
@@ -12,8 +12,9 @@ good.
 | 
			
		||||
To start the transition, link your previous configuration so Nvim can use
 | 
			
		||||
it:
 | 
			
		||||
>
 | 
			
		||||
    ln -s ~/.vimrc ~/.nvimrc
 | 
			
		||||
    ln -s ~/.vim ~/.nvim
 | 
			
		||||
    mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
 | 
			
		||||
    ln -s ~/.vim $XDG_CONFIG_HOME/nvim
 | 
			
		||||
    ln -s ~/.vimrc $XDG_CONFIG_HOME/nvim/init.vim
 | 
			
		||||
<
 | 
			
		||||
See |nvim-intro|, especially |nvim-python| and |nvim-clipboard|, for
 | 
			
		||||
additional software you might need to install to use all of Nvim's features.
 | 
			
		||||
 
 | 
			
		||||
@@ -775,12 +775,12 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	in other cases Vim might not be able to guess the right value.
 | 
			
		||||
 | 
			
		||||
	When starting the GUI, the default value for 'background' will be
 | 
			
		||||
	"light".  When the value is not set in the .gvimrc, and Vim detects
 | 
			
		||||
	"light".  When the value is not set in the gvimrc, and Vim detects
 | 
			
		||||
	that the background is actually quite dark, 'background' is set to
 | 
			
		||||
	"dark".  But this happens only AFTER the .gvimrc file has been read
 | 
			
		||||
	"dark".  But this happens only AFTER the gvimrc file has been read
 | 
			
		||||
	(because the window needs to be opened to find the actual background
 | 
			
		||||
	color).  To get around this, force the GUI window to be opened by
 | 
			
		||||
	putting a ":gui" command in the .gvimrc file, before where the value
 | 
			
		||||
	putting a ":gui" command in the gvimrc file, before where the value
 | 
			
		||||
	of 'background' is used (e.g., before ":syntax on").
 | 
			
		||||
 | 
			
		||||
	For MS-DOS and Windows the default is "dark".
 | 
			
		||||
@@ -788,7 +788,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	"screen.linux", "cygwin" or "putty", or $COLORFGBG suggests a dark
 | 
			
		||||
	background.  Otherwise the default is "light".
 | 
			
		||||
 | 
			
		||||
	Normally this option would be set in the .vimrc file.  Possibly
 | 
			
		||||
	Normally this option would be set in the vimrc file.  Possibly
 | 
			
		||||
	depending on the terminal name.  Example: >
 | 
			
		||||
		:if &term == "pcterm"
 | 
			
		||||
		:  set background=dark
 | 
			
		||||
@@ -901,8 +901,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	again not rename the file.
 | 
			
		||||
 | 
			
		||||
						*'backupdir'* *'bdir'*
 | 
			
		||||
'backupdir' 'bdir'	string	(default for MS-DOS and Win32: ".,$TEMP,c:/tmp,c:/temp",
 | 
			
		||||
				 for Unix: ".,~/tmp,~/")
 | 
			
		||||
'backupdir' 'bdir'	string	(default "$XDG_DATA_HOME/nvim/backup")
 | 
			
		||||
			global
 | 
			
		||||
	List of directories for the backup file, separated with commas.
 | 
			
		||||
	- The backup file will be created in the first directory in the list
 | 
			
		||||
@@ -1479,7 +1478,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	initialization and does not have to be set by hand.
 | 
			
		||||
	When Vim is running in the GUI or in a resizable window, setting this
 | 
			
		||||
	option will cause the window size to be changed.  When you only want
 | 
			
		||||
	to use the size for the GUI, put the command in your |gvimrc| file.
 | 
			
		||||
	to use the size for the GUI, put the command in your |ginit.vim| file.
 | 
			
		||||
	When you set this option and Vim is unable to change the physical
 | 
			
		||||
	number of columns of the display, the display may be messed up.  For
 | 
			
		||||
	the GUI it is always possible and Vim limits the number of columns to
 | 
			
		||||
@@ -2130,8 +2129,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	{char2}.  See |digraphs|.
 | 
			
		||||
 | 
			
		||||
						*'directory'* *'dir'*
 | 
			
		||||
'directory' 'dir'	string	(default for MS-DOS and Win32: ".,$TEMP,c:\tmp,c:\temp",
 | 
			
		||||
				 for Unix: ".,~/tmp,/var/tmp,/tmp")
 | 
			
		||||
'directory' 'dir'	string	(default "$XDG_DATA_HOME/nvim/swap//")
 | 
			
		||||
			global
 | 
			
		||||
	List of directory names for the swap file, separated with commas.
 | 
			
		||||
	- The swap file will be created in the first directory where this is
 | 
			
		||||
@@ -2351,11 +2349,11 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
					*'exrc'* *'ex'* *'noexrc'* *'noex'*
 | 
			
		||||
'exrc' 'ex'		boolean (default off)
 | 
			
		||||
			global
 | 
			
		||||
	Enables the reading of .vimrc, .exrc and .gvimrc in the current
 | 
			
		||||
	Enables the reading of .nvimrc, .exrc and .ngvimrc in the current
 | 
			
		||||
	directory.  If you switch this option on you should also consider
 | 
			
		||||
	setting the 'secure' option (see |initialization|).  Using a local
 | 
			
		||||
	.exrc, .vimrc or .gvimrc is a potential security leak, use with care!
 | 
			
		||||
	also see |.vimrc| and |gui-init|.
 | 
			
		||||
	.exrc, .nvimrc or .ngvimrc is a potential security leak, use with care!
 | 
			
		||||
	also see |init.vim| and |gui-init|.
 | 
			
		||||
	This option cannot be set from a |modeline| or in the |sandbox|, for
 | 
			
		||||
	security reasons.
 | 
			
		||||
 | 
			
		||||
@@ -2531,7 +2529,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	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.
 | 
			
		||||
	used.  Set 'fileformat' in your vimrc instead.
 | 
			
		||||
 | 
			
		||||
	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
 | 
			
		||||
@@ -3211,7 +3209,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	  'm'	Menu bar is present.
 | 
			
		||||
								*'go-M'*
 | 
			
		||||
	  'M'	The system menu "$VIMRUNTIME/menu.vim" is not sourced.  Note
 | 
			
		||||
		that this flag must be added in the .vimrc file, before
 | 
			
		||||
		that this flag must be added in the vimrc file, before
 | 
			
		||||
		switching on syntax or filetype recognition (when the |gvimrc|
 | 
			
		||||
		file is sourced the system menu has already been loaded; the
 | 
			
		||||
		":syntax on" and ":filetype on" commands load the menu too).
 | 
			
		||||
@@ -3835,8 +3833,8 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	option.
 | 
			
		||||
	Careful: If you change this option, it might break expanding
 | 
			
		||||
	environment variables.  E.g., when '/' is included and Vim tries to
 | 
			
		||||
	expand "$HOME/.nvim/shada/main.shada".  Maybe you should change 
 | 
			
		||||
	'iskeyword' instead.
 | 
			
		||||
	expand "$HOME/.local/share/nvim/shada/main.shada".  Maybe you should 
 | 
			
		||||
	change 'iskeyword' instead.
 | 
			
		||||
 | 
			
		||||
						*'iskeyword'* *'isk'*
 | 
			
		||||
'iskeyword' 'isk'	string (Vim default for
 | 
			
		||||
@@ -4670,7 +4668,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	being set.  The same is true for a terminal where Vim handles the
 | 
			
		||||
	mouse clicks itself.
 | 
			
		||||
	This option is reset when starting the GUI.  Thus if you set it in
 | 
			
		||||
	your .vimrc it will work in a terminal, but not in the GUI.  Setting
 | 
			
		||||
	your vimrc it will work in a terminal, but not in the GUI.  Setting
 | 
			
		||||
	'paste' in the GUI has side effects: e.g., the Paste toolbar button
 | 
			
		||||
	will no longer work in Insert mode, because it uses a mapping.
 | 
			
		||||
	When the 'paste' option is switched on (also when it was already on):
 | 
			
		||||
@@ -5010,7 +5008,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	happens when executing external commands.
 | 
			
		||||
 | 
			
		||||
	For non-Windows Vim: You can set or reset the 't_ti' and 't_te'
 | 
			
		||||
	options in your .vimrc.  To disable restoring:
 | 
			
		||||
	options in your vimrc.  To disable restoring:
 | 
			
		||||
		set t_ti= t_te=
 | 
			
		||||
	To enable restoring (for an xterm):
 | 
			
		||||
		set t_ti=^[7^[[r^[[?47h t_te=^[[?47l^[8
 | 
			
		||||
@@ -5090,14 +5088,23 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
<
 | 
			
		||||
				*'runtimepath'* *'rtp'* *vimfiles*
 | 
			
		||||
'runtimepath' 'rtp'	string	(default:
 | 
			
		||||
					Unix: "$HOME/.vim,
 | 
			
		||||
						$VIM/vimfiles,
 | 
			
		||||
					Unix: "$XDG_CONFIG_HOME/nvim,
 | 
			
		||||
					       $XDG_CONFIG_DIRS[1]/nvim,
 | 
			
		||||
					       $XDG_CONFIG_DIRS[2]/nvim,
 | 
			
		||||
					       …
 | 
			
		||||
					       $XDG_DATA_HOME/nvim,
 | 
			
		||||
					       $XDG_DATA_DIRS[1]/nvim/site,
 | 
			
		||||
					       $XDG_DATA_DIRS[2]/nvim/site,
 | 
			
		||||
					       …
 | 
			
		||||
					       $VIMRUNTIME,
 | 
			
		||||
						$VIM/vimfiles/after,
 | 
			
		||||
						$HOME/.vim/after"
 | 
			
		||||
					Macintosh: "$VIM:vimfiles,
 | 
			
		||||
						$VIMRUNTIME,
 | 
			
		||||
						$VIM:vimfiles:after")
 | 
			
		||||
					       …
 | 
			
		||||
					       $XDG_DATA_DIRS[2]/nvim/site/after,
 | 
			
		||||
					       $XDG_DATA_DIRS[1]/nvim/site/after,
 | 
			
		||||
					       $XDG_DATA_HOME/nvim/after,
 | 
			
		||||
					       …
 | 
			
		||||
					       $XDG_CONFIG_DIRS[2]/nvim/after,
 | 
			
		||||
					       $XDG_CONFIG_DIRS[1]/nvim/after,
 | 
			
		||||
					       $XDG_CONFIG_HOME/nvim/after")
 | 
			
		||||
			global
 | 
			
		||||
	This is a list of directories which will be searched for runtime
 | 
			
		||||
	files:
 | 
			
		||||
@@ -5120,18 +5127,23 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
 | 
			
		||||
	And any other file searched for with the |:runtime| command.
 | 
			
		||||
 | 
			
		||||
	The defaults for most systems are setup to search five locations:
 | 
			
		||||
	1. In your home directory, for your personal preferences.
 | 
			
		||||
	2. In a system-wide Vim directory, for preferences from the system
 | 
			
		||||
	   administrator.
 | 
			
		||||
	3. In $VIMRUNTIME, for files distributed with Vim.
 | 
			
		||||
	The defaults for most systems are setup to search these locations:
 | 
			
		||||
	1. In your home directory (XDG_CONFIG_HOME defaults to $HOME/.config), 
 | 
			
		||||
	   for your personal preferences.
 | 
			
		||||
	2. In directories which must contain configuration files according to 
 | 
			
		||||
	   XDG ($XDG_CONFIG_DIRS).  This also contains preferences from system 
 | 
			
		||||
	   administrator (XDG_CONFIG_DIRS defaults to /etc/xdg).
 | 
			
		||||
	3. In data home directory, for plugins installed by user.
 | 
			
		||||
	4. In nvim/site subdirectories for each directory in $XDG_DATA_DIRS.  
 | 
			
		||||
	   This is for plugins which were installed by system administrator, 
 | 
			
		||||
	   but are not part of the Neovim distribution. XDG_DATA_DIRS defaults 
 | 
			
		||||
	   to /usr/local/share/:/usr/share/, so system administrators are 
 | 
			
		||||
	   expected to install site plugins to /usr/share/nvim/site.
 | 
			
		||||
	5. In $VIMRUNTIME, for files distributed with Neovim.
 | 
			
		||||
							*after-directory*
 | 
			
		||||
	4. In the "after" directory in the system-wide Vim directory.  This is
 | 
			
		||||
	   for the system administrator to overrule or add to the distributed
 | 
			
		||||
	   defaults (rarely needed)
 | 
			
		||||
	5. In the "after" directory in your home directory.  This is for
 | 
			
		||||
	   personal preferences to overrule or add to the distributed defaults
 | 
			
		||||
	   or system-wide settings (rarely needed).
 | 
			
		||||
	6, 7, 8, 9. In after/ subdirectories of 1, 2, 3 and 4, with reverse 
 | 
			
		||||
	   ordering.  This is for preferences to overrule or add to the 
 | 
			
		||||
	   distributed defaults or system-wide settings (rarely needed).
 | 
			
		||||
 | 
			
		||||
	Note that, unlike 'path', no wildcards like "**" are allowed.  Normal
 | 
			
		||||
	wildcards are allowed, but can significantly slow down searching for
 | 
			
		||||
@@ -5240,12 +5252,12 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
'secure'		boolean	(default off)
 | 
			
		||||
			global
 | 
			
		||||
	When on, ":autocmd", shell and write commands are not allowed in
 | 
			
		||||
	".vimrc" and ".exrc" in the current directory and map commands are
 | 
			
		||||
	".nvimrc" and ".exrc" in the current directory and map commands are
 | 
			
		||||
	displayed.  Switch it off only if you know that you will not run into
 | 
			
		||||
	problems, or when the 'exrc' option is off.  On Unix this option is
 | 
			
		||||
	only used if the ".vimrc" or ".exrc" is not owned by you.  This can be
 | 
			
		||||
	only used if the ".nvimrc" or ".exrc" is not owned by you.  This can be
 | 
			
		||||
	dangerous if the systems allows users to do a "chown".  You better set
 | 
			
		||||
	'secure' at the end of your ~/.vimrc then.
 | 
			
		||||
	'secure' at the end of your |init.vim| then.
 | 
			
		||||
	This option cannot be set from a |modeline| or in the |sandbox|, for
 | 
			
		||||
	security reasons.
 | 
			
		||||
 | 
			
		||||
@@ -5502,7 +5514,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	default becomes "2>&1| tee".  This means that stderr is also included.
 | 
			
		||||
	Before using the 'shell' option a path is removed, thus "/bin/sh" uses
 | 
			
		||||
	"sh".
 | 
			
		||||
	The initialization of this option is done after reading the ".vimrc"
 | 
			
		||||
	The initialization of this option is done after reading the vimrc
 | 
			
		||||
	and the other initializations, so that when the 'shell' option is set
 | 
			
		||||
	there, the 'shellpipe' option changes automatically, unless it was
 | 
			
		||||
	explicitly set before.
 | 
			
		||||
@@ -5548,7 +5560,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	For Win32, the Unix checks are done and additionally "cmd" is checked
 | 
			
		||||
	for, which makes the default ">%s 2>&1".  Also, the same names with
 | 
			
		||||
	".exe" appended are checked for.
 | 
			
		||||
	The initialization of this option is done after reading the ".vimrc"
 | 
			
		||||
	The initialization of this option is done after reading the vimrc
 | 
			
		||||
	and the other initializations, so that when the 'shell' option is set
 | 
			
		||||
	there, the 'shellredir' option changes automatically unless it was
 | 
			
		||||
	explicitly set before.
 | 
			
		||||
@@ -6023,7 +6035,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
 | 
			
		||||
	Only one of "best", "double" or "fast" may be used.  The others may
 | 
			
		||||
	appear several times in any order.  Example: >
 | 
			
		||||
		:set sps=file:~/.vim/sugg,best,expr:MySuggest()
 | 
			
		||||
		:set sps=file:~/.config/nvim/sugg,best,expr:MySuggest()
 | 
			
		||||
<
 | 
			
		||||
	This option cannot be set from a |modeline| or in the |sandbox|, for
 | 
			
		||||
	security reasons.
 | 
			
		||||
@@ -6198,7 +6210,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
 | 
			
		||||
	Watch out for errors in expressions.  They may render Vim unusable!
 | 
			
		||||
	If you are stuck, hold down ':' or 'Q' to get a prompt, then quit and
 | 
			
		||||
	edit your .vimrc or whatever with "vim -u NONE" to get it right.
 | 
			
		||||
	edit your vimrc or whatever with "vim -u NONE" to get it right.
 | 
			
		||||
 | 
			
		||||
	Examples:
 | 
			
		||||
	Emulate standard status line with 'ruler' set >
 | 
			
		||||
@@ -6804,8 +6816,7 @@ A jump table for the options with a short description can be found at |Q_op|.
 | 
			
		||||
	displayed when 'verbosefile' is set.
 | 
			
		||||
 | 
			
		||||
						*'viewdir'* *'vdir'*
 | 
			
		||||
'viewdir' 'vdir'	string	(default for MS-DOS and Win32: "$VIM/vimfiles/view",
 | 
			
		||||
				 for Unix: "~/.vim/view")
 | 
			
		||||
'viewdir' 'vdir'	string	(default: "$XDG_DATA_HOME/nvim/view")
 | 
			
		||||
			global
 | 
			
		||||
			{not available when compiled without the |+mksession|
 | 
			
		||||
			feature}
 | 
			
		||||
 
 | 
			
		||||
@@ -40,7 +40,7 @@ Setting a map					*spec-setting-a-map*
 | 
			
		||||
As you should know, you can easily set a map to access any Vim command (or
 | 
			
		||||
anything, for that matter).  If you don't like the default map of
 | 
			
		||||
<LocalLeader>c, you may just set up your own key.  The following line
 | 
			
		||||
shows you how you could do this in your .vimrc file, mapping the plugin to
 | 
			
		||||
shows you how you could do this in your vimrc file, mapping the plugin to
 | 
			
		||||
the <F5> key:
 | 
			
		||||
 | 
			
		||||
	au FileType spec map <buffer> <F5> <Plug>SpecChangelog
 | 
			
		||||
@@ -58,7 +58,7 @@ The format string				*spec_chglog_format*
 | 
			
		||||
-----------------
 | 
			
		||||
 | 
			
		||||
You can easily customize how your spec file entry will look like.  To do
 | 
			
		||||
this just set the variable "spec_chglog_format" in your .vimrc file like
 | 
			
		||||
this just set the variable "spec_chglog_format" in your vimrc file like
 | 
			
		||||
this: >
 | 
			
		||||
 | 
			
		||||
	let spec_chglog_format = "%a %b %d %Y My Name <my@email.com>"
 | 
			
		||||
@@ -92,7 +92,7 @@ that it may control if the release has been updated after the last
 | 
			
		||||
change in the package or not.  If you have not updated the package
 | 
			
		||||
version or release, it will ask you if it should update the package
 | 
			
		||||
release for you.  To turn this feature on, just insert the following
 | 
			
		||||
code in your .vimrc: >
 | 
			
		||||
code in your vimrc: >
 | 
			
		||||
 | 
			
		||||
	let spec_chglog_release_info = 1
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1277,7 +1277,7 @@ Jikes(TM), a source-to-bytecode Java compiler published by IBM Research,
 | 
			
		||||
produces simple multi-line error messages.
 | 
			
		||||
 | 
			
		||||
An 'errorformat' string matching the produced messages is shown below.
 | 
			
		||||
The following lines can be placed in the user's |vimrc| to overwrite Vim's
 | 
			
		||||
The following lines can be placed in the user's |init.vim| to overwrite Vim's
 | 
			
		||||
recognized default formats, or see |:set+=| how to install this format
 | 
			
		||||
additionally to the default. >
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -548,7 +548,7 @@ In Insert or Command-line mode:
 | 
			
		||||
				     settings to [file] (default: ".exrc";
 | 
			
		||||
				     use ! to overwrite)
 | 
			
		||||
|:mkvimrc|   :mkv[imrc][!] [file]
 | 
			
		||||
				  same as ":mkexrc", but with default ".vimrc"
 | 
			
		||||
				  same as :mkexrc, but with default ".nvimrc"
 | 
			
		||||
|:mksession| :mks[ession][!] [file]
 | 
			
		||||
				  like ":mkvimrc", but store current files,
 | 
			
		||||
				     windows, etc. too, to be able to continue
 | 
			
		||||
@@ -681,7 +681,7 @@ Short explanation of each option:		*option-list*
 | 
			
		||||
'esckeys'	  'ek'	    recognize function keys in Insert mode
 | 
			
		||||
'eventignore'	  'ei'	    autocommand events that are ignored
 | 
			
		||||
'expandtab'	  'et'	    use spaces when <Tab> is inserted
 | 
			
		||||
'exrc'		  'ex'	    read .vimrc and .exrc in the current directory
 | 
			
		||||
'exrc'		  'ex'	    read .nvimrc and .exrc in the current directory
 | 
			
		||||
'fileencoding'	  'fenc'    file encoding for multi-byte text
 | 
			
		||||
'fileencodings'   'fencs'   automatically detected character encodings
 | 
			
		||||
'fileformat'	  'ff'	    file format used for file I/O
 | 
			
		||||
 
 | 
			
		||||
@@ -204,7 +204,7 @@ Colon, USA)
 | 
			
		||||
VIM is a joy to use, it is so well thought and practical that I wonder why
 | 
			
		||||
anybody would use visual development tools.  VIM is powerful and elegant, it
 | 
			
		||||
looks deceptively simple but is almost as complex as a 747 (especially when I
 | 
			
		||||
look at my growing .vimrc), keep up that wonderful job, VIM is a centerpiece
 | 
			
		||||
look at my growing vimrc), keep up that wonderful job, VIM is a centerpiece
 | 
			
		||||
of the free software world.  (Louis-David Mitterand, USA)
 | 
			
		||||
 | 
			
		||||
I cannot believe how great it is to use VIM.  I think the guys at work are
 | 
			
		||||
 
 | 
			
		||||
@@ -58,7 +58,7 @@ Disadvantages:
 | 
			
		||||
  message.
 | 
			
		||||
 | 
			
		||||
If you want to put swap files in a fixed place, put a command resembling the
 | 
			
		||||
following ones in your .vimrc:
 | 
			
		||||
following ones in your vimrc:
 | 
			
		||||
	:set dir=~/tmp		(for Unix)
 | 
			
		||||
	:set dir=c:\\tmp	(for MS-DOS and Win32)
 | 
			
		||||
This is also very handy when editing files on floppy.  Of course you will have
 | 
			
		||||
 
 | 
			
		||||
@@ -93,8 +93,9 @@ approach with |rpcnotify()|, meaning return values or exceptions raised in the
 | 
			
		||||
handler function are ignored.
 | 
			
		||||
 | 
			
		||||
To test the above plugin, it must be saved in "rplugin/python" in a
 | 
			
		||||
'runtimepath' directory (~/.nvim/rplugin/python/limit.py for example). Then,
 | 
			
		||||
the remote plugin manifest must be generated with `:UpdateRemotePlugins`.
 | 
			
		||||
'runtimepath' directory (~/.config/nvim/rplugin/python/limit.py for example). 
 | 
			
		||||
Then, the remote plugin manifest must be generated with 
 | 
			
		||||
`:UpdateRemotePlugins`.
 | 
			
		||||
 | 
			
		||||
==============================================================================
 | 
			
		||||
4. Remote plugin manifest			    *remote-plugin-manifest*
 | 
			
		||||
 
 | 
			
		||||
@@ -274,8 +274,8 @@ nested as deep as the number of files that can be opened at one time (about
 | 
			
		||||
You can use the "<sfile>" string (literally, this is not a special key) inside
 | 
			
		||||
of the sourced file, in places where a file name is expected.  It will be
 | 
			
		||||
replaced by the file name of the sourced file.  For example, if you have a
 | 
			
		||||
"other.vimrc" file in the same directory as your ".vimrc" file, you can source
 | 
			
		||||
it from your ".vimrc" file with this command: >
 | 
			
		||||
"other.vimrc" file in the same directory as your |init.vim| file, you can 
 | 
			
		||||
source it from your |init.vim| file with this command: >
 | 
			
		||||
	:source <sfile>:h/other.vimrc
 | 
			
		||||
 | 
			
		||||
In script files terminal-dependent key codes are represented by
 | 
			
		||||
@@ -482,7 +482,7 @@ DEFINING BREAKPOINTS
 | 
			
		||||
 | 
			
		||||
:breaka[dd] file [lnum] {name}
 | 
			
		||||
		Set a breakpoint in a sourced file.  Example: >
 | 
			
		||||
			:breakadd file 43 .vimrc
 | 
			
		||||
			:breakadd file 43 init.vim
 | 
			
		||||
 | 
			
		||||
:breaka[dd] here
 | 
			
		||||
		Set a breakpoint in the current line of the current file.
 | 
			
		||||
 
 | 
			
		||||
@@ -307,26 +307,26 @@ Exceptions:
 | 
			
		||||
  spell file is used.
 | 
			
		||||
 | 
			
		||||
For example, with these values:
 | 
			
		||||
	'runtimepath' is "~/.vim,/usr/share/vim70,~/.vim/after"
 | 
			
		||||
	'runtimepath' is "~/.config/nvim,/usr/share/vim70,~/.config/nvim/after"
 | 
			
		||||
	'encoding'    is "iso-8859-2"
 | 
			
		||||
	'spelllang'   is "pl"
 | 
			
		||||
 | 
			
		||||
Vim will look for:
 | 
			
		||||
1. ~/.vim/spell/pl.iso-8859-2.spl
 | 
			
		||||
1. ~/.config/nvim/spell/pl.iso-8859-2.spl
 | 
			
		||||
2. /usr/share/vim70/spell/pl.iso-8859-2.spl
 | 
			
		||||
3. ~/.vim/spell/pl.iso-8859-2.add.spl
 | 
			
		||||
3. ~/.config/nvim/spell/pl.iso-8859-2.add.spl
 | 
			
		||||
4. /usr/share/vim70/spell/pl.iso-8859-2.add.spl
 | 
			
		||||
5. ~/.vim/after/spell/pl.iso-8859-2.add.spl
 | 
			
		||||
5. ~/.config/nvim/after/spell/pl.iso-8859-2.add.spl
 | 
			
		||||
 | 
			
		||||
This assumes 1. is not found and 2. is found.
 | 
			
		||||
 | 
			
		||||
If 'encoding' is "latin1" Vim will look for:
 | 
			
		||||
1. ~/.vim/spell/pl.latin1.spl
 | 
			
		||||
1. ~/.config/nvim/spell/pl.latin1.spl
 | 
			
		||||
2. /usr/share/vim70/spell/pl.latin1.spl
 | 
			
		||||
3. ~/.vim/after/spell/pl.latin1.spl
 | 
			
		||||
4. ~/.vim/spell/pl.ascii.spl
 | 
			
		||||
3. ~/.config/nvim/after/spell/pl.latin1.spl
 | 
			
		||||
4. ~/.config/nvim/spell/pl.ascii.spl
 | 
			
		||||
5. /usr/share/vim70/spell/pl.ascii.spl
 | 
			
		||||
6. ~/.vim/after/spell/pl.ascii.spl
 | 
			
		||||
6. ~/.config/nvim/after/spell/pl.ascii.spl
 | 
			
		||||
 | 
			
		||||
This assumes none of them are found (Polish doesn't make sense when leaving
 | 
			
		||||
out the non-ASCII characters).
 | 
			
		||||
 
 | 
			
		||||
@@ -106,7 +106,7 @@ argument.
 | 
			
		||||
--startuptime {fname}					*--startuptime*
 | 
			
		||||
		During startup write timing messages to the file {fname}.
 | 
			
		||||
		This can be used to find out where time is spent while loading
 | 
			
		||||
		your .vimrc, plugins and opening the first file.
 | 
			
		||||
		your |init.vim|, plugins and opening the first file.
 | 
			
		||||
		When {fname} already exists new messages are appended.
 | 
			
		||||
		(Only available when compiled with the |+startuptime|
 | 
			
		||||
		feature).
 | 
			
		||||
@@ -232,8 +232,8 @@ argument.
 | 
			
		||||
-b		Binary mode.  File I/O will only recognize <NL> to separate
 | 
			
		||||
		lines.  The 'expandtab' option will be reset.  The 'textwidth'
 | 
			
		||||
		option is set to 0.  'modeline' is reset.  The 'binary' option
 | 
			
		||||
		is set.  This is done after reading the vimrc/exrc files but
 | 
			
		||||
		before reading any file in the arglist.  See also
 | 
			
		||||
		is set.  This is done after reading the init.vim/exrc files 
 | 
			
		||||
		but before reading any file in the arglist.  See also
 | 
			
		||||
		|edit-binary|.
 | 
			
		||||
 | 
			
		||||
							*-l*
 | 
			
		||||
@@ -312,11 +312,11 @@ argument.
 | 
			
		||||
		be used to start Vim in a special mode, with special
 | 
			
		||||
		mappings and settings.  A shell alias can be used to make
 | 
			
		||||
		this easy to use.  For example: >
 | 
			
		||||
			alias vimc vim -u ~/.c_vimrc !*
 | 
			
		||||
			alias vimc vim -u ~/.config/nvim/c_init.vim !*
 | 
			
		||||
<		Also consider using autocommands; see |autocommand|.
 | 
			
		||||
		When {vimrc} is equal to "NONE" (all uppercase), all
 | 
			
		||||
		initializations from files and environment variables are
 | 
			
		||||
		skipped, including reading the |gvimrc| file when the GUI
 | 
			
		||||
		skipped, including reading the |ginit.vim| file when the GUI
 | 
			
		||||
		starts.  Loading plugins is also skipped.
 | 
			
		||||
		When {vimrc} is equal to "NORC" (all uppercase), this has the
 | 
			
		||||
		same effect as "NONE", but loading plugins is not skipped.
 | 
			
		||||
@@ -373,24 +373,24 @@ accordingly.  Vim proceeds in this order:
 | 
			
		||||
3. Execute Ex commands, from environment variables and/or files
 | 
			
		||||
	An environment variable is read as one Ex command line, where multiple
 | 
			
		||||
	commands must be separated with '|' or "<NL>".
 | 
			
		||||
								*vimrc* *exrc*
 | 
			
		||||
						    *init.vim* *vimrc* *exrc*
 | 
			
		||||
	A file that contains initialization commands is called a "vimrc" file.
 | 
			
		||||
	Each line in a vimrc file is executed as an Ex command line.  It is
 | 
			
		||||
	sometimes also referred to as "exrc" file.  They are the same type of
 | 
			
		||||
	file, but "exrc" is what Vi always used, "vimrc" is a Vim specific
 | 
			
		||||
	name.  Also see |vimrc-intro|.
 | 
			
		||||
	name, "init.vim" is Neovim specific location for vimrc file.  Also see 
 | 
			
		||||
	|vimrc-intro|.
 | 
			
		||||
 | 
			
		||||
	Places for your personal initializations:
 | 
			
		||||
		Unix		$HOME/.vimrc or $HOME/.vim/vimrc
 | 
			
		||||
		MS-Windows	$HOME/_vimrc, $HOME/vimfiles/vimrc
 | 
			
		||||
				or $VIM/_vimrc
 | 
			
		||||
		Unix		$XDG_CONFIG_HOME/nvim/init.vim
 | 
			
		||||
				(default for $XDG_CONFIG_HOME is ~/.config)
 | 
			
		||||
 | 
			
		||||
	The files are searched in the order specified above and only the first
 | 
			
		||||
	one that is found is read.
 | 
			
		||||
 | 
			
		||||
	RECOMMENDATION: Put all your Vim configuration stuff in the 
 | 
			
		||||
	$HOME/.vim/ directory ($HOME/vimfiles/ for MS-Windows). That makes it
 | 
			
		||||
	easy to copy it to another system.
 | 
			
		||||
	$HOME/.config/nvim/ directory. That makes it easy to copy it to 
 | 
			
		||||
	another system.
 | 
			
		||||
 | 
			
		||||
	If Vim was started with "-u filename", the file "filename" is used.
 | 
			
		||||
	All following initializations until 4. are skipped. $MYVIMRC is not
 | 
			
		||||
@@ -407,26 +407,14 @@ accordingly.  Vim proceeds in this order:
 | 
			
		||||
	":version" command.  Mostly it's "$VIM/vimrc".
 | 
			
		||||
	For the Macintosh the $VIMRUNTIME/macmap.vim is read.
 | 
			
		||||
 | 
			
		||||
	  *VIMINIT* *.vimrc* *_vimrc* *EXINIT* *.exrc* *_exrc* *$MYVIMRC*
 | 
			
		||||
				*VIMINIT* *EXINIT* *.exrc* *_exrc* *$MYVIMRC*
 | 
			
		||||
     b. Four places are searched for initializations.  The first that exists
 | 
			
		||||
	is used, the others are ignored.  The $MYVIMRC environment variable is
 | 
			
		||||
	set to the file that was first found, unless $MYVIMRC was already set
 | 
			
		||||
	and when using VIMINIT.
 | 
			
		||||
	-  The environment variable VIMINIT
 | 
			
		||||
	   The value of $VIMINIT is used as an Ex command line.
 | 
			
		||||
	-  The user vimrc file(s):
 | 
			
		||||
		    "$HOME/.vimrc"	   (for Unix)
 | 
			
		||||
		    "$HOME/.vim/vimrc"	   (for Unix)
 | 
			
		||||
		    "$HOME/_vimrc"	   (for Win32)
 | 
			
		||||
		    "$HOME/vimfiles/vimrc" (for Win32)
 | 
			
		||||
		    "$VIM/_vimrc"	   (for Win32)
 | 
			
		||||
		Note: For Unix, when ".vimrc" does not exist,
 | 
			
		||||
		"_vimrc" is also tried, in case an MS-DOS compatible file
 | 
			
		||||
		system is used.  For MS-DOS and Win32 ".vimrc" is checked
 | 
			
		||||
		after "_vimrc", in case long file names are used.
 | 
			
		||||
		Note: For MS-DOS and Win32, "$HOME" is checked first.  If no
 | 
			
		||||
		"_vimrc" or ".vimrc" is found there, "$VIM" is tried.
 | 
			
		||||
		See |$VIM| for when $VIM is not set.
 | 
			
		||||
	-  The user vimrc file: $XDG_CONFIG_HOME/nvim/init.vim.
 | 
			
		||||
	-  The environment variable EXINIT.
 | 
			
		||||
	   The value of $EXINIT is used as an Ex command line.
 | 
			
		||||
	-  The user exrc file(s).  Same as for the user vimrc file, but with
 | 
			
		||||
@@ -436,10 +424,10 @@ accordingly.  Vim proceeds in this order:
 | 
			
		||||
     c. If the 'exrc' option is on (which is not the default), the current
 | 
			
		||||
	directory is searched for three files.  The first that exists is used,
 | 
			
		||||
	the others are ignored.
 | 
			
		||||
	-  The file ".vimrc" (for Unix)
 | 
			
		||||
		    "_vimrc" (for Win32)
 | 
			
		||||
	-  The file "_vimrc" (for Unix)
 | 
			
		||||
		    ".vimrc" (for Win32)
 | 
			
		||||
	-  The file ".nvimrc" (for Unix)
 | 
			
		||||
		    "_nvimrc" (for Win32)
 | 
			
		||||
	-  The file "_nvimrc" (for Unix)
 | 
			
		||||
		    ".nvimrc" (for Win32)
 | 
			
		||||
	-  The file ".exrc"  (for Unix)
 | 
			
		||||
		    "_exrc"  (for Win32)
 | 
			
		||||
 | 
			
		||||
@@ -504,12 +492,12 @@ Some hints on using initializations:
 | 
			
		||||
Standard setup:
 | 
			
		||||
Create a vimrc file to set the default settings and mappings for all your edit
 | 
			
		||||
sessions.  Put it in a place so that it will be found by 3b:
 | 
			
		||||
	~/.vimrc	(Unix)
 | 
			
		||||
	$VIM\_vimrc	(MS-DOS and Win32)
 | 
			
		||||
	~/.config/nvim/init.vim		(Unix)
 | 
			
		||||
	~/AppData/Local/nvim/init.vim	(Win32)
 | 
			
		||||
 | 
			
		||||
Local setup:
 | 
			
		||||
Put all commands that you need for editing a specific directory only into a
 | 
			
		||||
vimrc file and place it in that directory under the name ".vimrc" ("_vimrc"
 | 
			
		||||
vimrc file and place it in that directory under the name ".nvimrc" ("_nvimrc"
 | 
			
		||||
for MS-DOS and Win32).  NOTE: To make Vim look for these special files you
 | 
			
		||||
have to turn on the option 'exrc'.  See |trojan-horse| too.
 | 
			
		||||
 | 
			
		||||
@@ -517,7 +505,9 @@ System setup:
 | 
			
		||||
This only applies if you are managing a Unix system with several users and
 | 
			
		||||
want to set the defaults for all users.  Create a vimrc file with commands
 | 
			
		||||
for default settings and mappings and put it in the place that is given with
 | 
			
		||||
the ":version" command.
 | 
			
		||||
the ":version" command.  NOTE: System vimrc file needs specific compilation 
 | 
			
		||||
options (one needs to define SYS_VIMRC_FILE macros). If :version command does 
 | 
			
		||||
not show anything like this, consider contacting the nvim package maintainer.
 | 
			
		||||
 | 
			
		||||
Saving the current state of Vim to a file:
 | 
			
		||||
Whenever you have changed values of options or when you have created a
 | 
			
		||||
@@ -526,7 +516,8 @@ mapping, then you may want to save them in a vimrc file for later use.  See
 | 
			
		||||
 | 
			
		||||
Avoiding setup problems for Vi users:
 | 
			
		||||
Vi uses the variable EXINIT and the file "~/.exrc".  So if you do not want to
 | 
			
		||||
interfere with Vi, then use the variable VIMINIT and the file "vimrc" instead.
 | 
			
		||||
interfere with Vi, then use the variable VIMINIT and the file init.vim 
 | 
			
		||||
instead.
 | 
			
		||||
 | 
			
		||||
MS-DOS line separators:
 | 
			
		||||
On MS-DOS-like systems (MS-DOS itself and Win32), Vim assumes that all
 | 
			
		||||
@@ -538,7 +529,7 @@ The $MYVIMRC or $MYGVIMRC file will be set to the first found vimrc and/or
 | 
			
		||||
gvimrc file.
 | 
			
		||||
 | 
			
		||||
Avoiding trojan horses:					*trojan-horse*
 | 
			
		||||
While reading the "vimrc" or the "exrc" file in the current directory, some
 | 
			
		||||
While reading the vimrc or the exrc file in the current directory, some
 | 
			
		||||
commands can be disabled for security reasons by setting the 'secure' option.
 | 
			
		||||
This is always done when executing the command from a tags file.  Otherwise it
 | 
			
		||||
would be possible that you accidentally use a vimrc or tags file that somebody
 | 
			
		||||
@@ -547,8 +538,8 @@ that start a shell, the ones that write to a file, and ":autocmd".  The ":map"
 | 
			
		||||
commands are echoed, so you can see which keys are being mapped.
 | 
			
		||||
	If you want Vim to execute all commands in a local vimrc file, you
 | 
			
		||||
can reset the 'secure' option in the EXINIT or VIMINIT environment variable or
 | 
			
		||||
in the global "exrc" or "vimrc" file.  This is not possible in "vimrc" or
 | 
			
		||||
"exrc" in the current directory, for obvious reasons.
 | 
			
		||||
in the global exrc or vimrc file.  This is not possible in vimrc or
 | 
			
		||||
exrc in the current directory, for obvious reasons.
 | 
			
		||||
	On Unix systems, this only happens if you are not the owner of the
 | 
			
		||||
vimrc file.  Warning: If you unpack an archive that contains a vimrc or exrc
 | 
			
		||||
file, it will be owned by you.  You won't have the security protection.  Check
 | 
			
		||||
@@ -603,7 +594,7 @@ though.
 | 
			
		||||
4. $VIM and $VIMRUNTIME
 | 
			
		||||
								*$VIM*
 | 
			
		||||
The environment variable "$VIM" is used to locate various user files for Vim,
 | 
			
		||||
such as the user startup script ".vimrc".  This depends on the system, see
 | 
			
		||||
such as the user startup script |init.vim|.  This depends on the system, see
 | 
			
		||||
|startup|.
 | 
			
		||||
 | 
			
		||||
To avoid the need for every user to set the $VIM environment variable, Vim
 | 
			
		||||
@@ -712,7 +703,7 @@ vimrc file.
 | 
			
		||||
			directory).
 | 
			
		||||
 | 
			
		||||
							*:mkv* *:mkvimrc*
 | 
			
		||||
:mkv[imrc][!] [file]	Like ":mkexrc", but the default is ".vimrc" in the
 | 
			
		||||
:mkv[imrc][!] [file]	Like ":mkexrc", but the default is ".nvimrc" in the
 | 
			
		||||
			current directory.  The ":version" command is also
 | 
			
		||||
			written to the file.
 | 
			
		||||
 | 
			
		||||
@@ -731,13 +722,13 @@ can be used with different terminals.
 | 
			
		||||
 | 
			
		||||
Only global mappings are stored, not mappings local to a buffer.
 | 
			
		||||
 | 
			
		||||
A common method is to use a default ".vimrc" file, make some modifications
 | 
			
		||||
A common method is to use a default |init.vim| file, make some modifications
 | 
			
		||||
with ":map" and ":set" commands and write the modified file.  First read the
 | 
			
		||||
default ".vimrc" in with a command like ":source ~piet/.vimrc.Cprogs", change
 | 
			
		||||
default vimrc in with a command like ":source ~piet/.vimrc.Cprogs", change
 | 
			
		||||
the settings and then save them in the current directory with ":mkvimrc!".  If
 | 
			
		||||
you want to make this file your default .vimrc, move it to your home directory
 | 
			
		||||
(on Unix) or $VIM directory (MS-DOS).  You could also use
 | 
			
		||||
autocommands |autocommand| and/or modelines |modeline|.
 | 
			
		||||
you want to make this file your default |init.vim|, move it to 
 | 
			
		||||
$XDG_CONFIG_HOME/nvim.  You could also use autocommands |autocommand| and/or 
 | 
			
		||||
modelines |modeline|.
 | 
			
		||||
 | 
			
		||||
						*vimrc-option-example*
 | 
			
		||||
If you only want to add a single option setting to your vimrc, you can use
 | 
			
		||||
@@ -1057,10 +1048,8 @@ even if other entries (with known name/type/etc) are merged. |shada-merging|
 | 
			
		||||
 | 
			
		||||
SHADA FILE NAME						*shada-file-name*
 | 
			
		||||
 | 
			
		||||
- The default name of the ShaDa file is "$HOME/.nvim/shada/main.shada" for 
 | 
			
		||||
  Unix, "$HOME\_nvim\shada\main.shada" for MS-DOS and Win32.  For the last 
 | 
			
		||||
  two, when $HOME is not set, "$VIM\_nvim\shada\main.shada" is used.  When 
 | 
			
		||||
  $VIM is also not set, "c:\_nvim\shada\main.shada" is used.
 | 
			
		||||
- The default name of the ShaDa file is "$XDG_DATA_HOME/nvim/shada/main.shada" 
 | 
			
		||||
  for Unix. Default for $XDG_DATA_HOME is ~/.local/share.
 | 
			
		||||
- The 'n' flag in the 'shada' option can be used to specify another ShaDa
 | 
			
		||||
  file name |'shada'|.
 | 
			
		||||
- The "-i" Vim argument can be used to set another file name, |-i|.  When the
 | 
			
		||||
@@ -1103,7 +1092,7 @@ do this.  This can be useful in order to create a second file, say
 | 
			
		||||
"~/.my.shada" which could contain certain settings that you always want when 
 | 
			
		||||
you first start Neovim.  For example, you can preload registers with 
 | 
			
		||||
particular data, or put certain commands in the command line history.  A line 
 | 
			
		||||
in your .nvimrc file like >
 | 
			
		||||
in your |init.vim| file like >
 | 
			
		||||
	:rshada! ~/.my.shada
 | 
			
		||||
can be used to load this information.  You could even have different ShaDa 
 | 
			
		||||
files for different types of files (e.g., C code) and load them based on the 
 | 
			
		||||
@@ -1167,7 +1156,8 @@ running) you have additional options:
 | 
			
		||||
			empty, marks for up to 100 files will be written.
 | 
			
		||||
			When you get error "E138: All .tmp.X files exist, 
 | 
			
		||||
			cannot write ShaDa file!" check that no old temp files 
 | 
			
		||||
			were left behind (e.g. ~/.nvim/shada/main.shada.tmp*).
 | 
			
		||||
			were left behind (e.g. 
 | 
			
		||||
			~/.local/share/nvim/shada/main.shada.tmp*).
 | 
			
		||||
 | 
			
		||||
						   *:wv* *:wviminfo*
 | 
			
		||||
:wv[iminfo][!] [file]	Deprecated alias to |:wshada| command.
 | 
			
		||||
 
 | 
			
		||||
@@ -143,14 +143,14 @@ automatically with ":syntax enable", do this:
 | 
			
		||||
 | 
			
		||||
1. Create your user runtime directory.	You would normally use the first item
 | 
			
		||||
   of the 'runtimepath' option.  Example for Unix: >
 | 
			
		||||
	mkdir ~/.vim
 | 
			
		||||
	mkdir ~/.config/nvim
 | 
			
		||||
 | 
			
		||||
2. Create a directory in there called "syntax".  For Unix: >
 | 
			
		||||
	mkdir ~/.vim/syntax
 | 
			
		||||
	mkdir ~/.config/nvim/syntax
 | 
			
		||||
 | 
			
		||||
3. Write the Vim syntax file.  Or download one from the internet.  Then write
 | 
			
		||||
   it in your syntax directory.  For example, for the "mine" syntax: >
 | 
			
		||||
	:w ~/.vim/syntax/mine.vim
 | 
			
		||||
	:w ~/.config/nvim/syntax/mine.vim
 | 
			
		||||
 | 
			
		||||
Now you can start using your syntax file manually: >
 | 
			
		||||
	:set syntax=mine
 | 
			
		||||
@@ -170,8 +170,8 @@ add a few items or change the highlighting, follow these steps:
 | 
			
		||||
1. Create your user directory from 'runtimepath', see above.
 | 
			
		||||
 | 
			
		||||
2. Create a directory in there called "after/syntax".  For Unix: >
 | 
			
		||||
	mkdir ~/.vim/after
 | 
			
		||||
	mkdir ~/.vim/after/syntax
 | 
			
		||||
	mkdir ~/.config/nvim/after
 | 
			
		||||
	mkdir ~/.config/nvim/after/syntax
 | 
			
		||||
 | 
			
		||||
3. Write a Vim script that contains the commands you want to use.  For
 | 
			
		||||
   example, to change the colors for the C syntax: >
 | 
			
		||||
@@ -179,15 +179,15 @@ add a few items or change the highlighting, follow these steps:
 | 
			
		||||
 | 
			
		||||
4. Write that file in the "after/syntax" directory.  Use the name of the
 | 
			
		||||
   syntax, with ".vim" added.  For our C syntax: >
 | 
			
		||||
	:w ~/.vim/after/syntax/c.vim
 | 
			
		||||
	:w ~/.config/nvim/after/syntax/c.vim
 | 
			
		||||
 | 
			
		||||
That's it.  The next time you edit a C file the Comment color will be
 | 
			
		||||
different.  You don't even have to restart Vim.
 | 
			
		||||
 | 
			
		||||
If you have multiple files, you can use the filetype as the directory name.
 | 
			
		||||
All the "*.vim" files in this directory will be used, for example:
 | 
			
		||||
	~/.vim/after/syntax/c/one.vim
 | 
			
		||||
	~/.vim/after/syntax/c/two.vim
 | 
			
		||||
	~/.config/nvim/after/syntax/c/one.vim
 | 
			
		||||
	~/.config/nvim/after/syntax/c/two.vim
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
REPLACING AN EXISTING SYNTAX FILE			*mysyntaxfile-replace*
 | 
			
		||||
@@ -471,7 +471,7 @@ moves through the buffer, switches windows, and the like: >
 | 
			
		||||
 | 
			
		||||
  vim -E -s -c "let g:html_no_progress=1" -c "syntax on" -c "set ft=c" -c "runtime syntax/2html.vim" -cwqa myfile.c
 | 
			
		||||
<
 | 
			
		||||
Note that the -s flag prevents loading your .vimrc and any plugins, so you
 | 
			
		||||
Note that the -s flag prevents loading your vimrc and any plugins, so you
 | 
			
		||||
need to explicitly source/enable anything that will affect the HTML
 | 
			
		||||
conversion. See |-E| and |-s-ex| for details. It is probably best to create a
 | 
			
		||||
script to replace all the -c commands and use it with the -u flag instead of
 | 
			
		||||
@@ -874,13 +874,13 @@ for both 3 GL and 4 GL programming. Large number of standard defines/constants
 | 
			
		||||
are supported.
 | 
			
		||||
 | 
			
		||||
Some special violation of coding standards will be signalled when one specify
 | 
			
		||||
in ones |.vimrc|: >
 | 
			
		||||
in ones |init.vim|: >
 | 
			
		||||
	let baan_code_stds=1
 | 
			
		||||
 | 
			
		||||
*baan-folding*
 | 
			
		||||
 | 
			
		||||
Syntax folding can be enabled at various levels through the variables
 | 
			
		||||
mentioned below (Set those in your |.vimrc|). The more complex folding on
 | 
			
		||||
mentioned below (Set those in your |init.vim|). The more complex folding on
 | 
			
		||||
source blocks and SQL can be CPU intensive.
 | 
			
		||||
 | 
			
		||||
To allow any folding and enable folding at function level use: >
 | 
			
		||||
@@ -894,8 +894,8 @@ SELECTEMPTY, ... The indentation preceding the begin/end keywords has to
 | 
			
		||||
match (spaces are not considered equal to a tab). >
 | 
			
		||||
	let baan_fold_sql=1
 | 
			
		||||
Note: Block folding can result in many small folds. It is suggested to |:set|
 | 
			
		||||
the options 'foldminlines' and 'foldnestmax' in |.vimrc| or use |:setlocal| in
 | 
			
		||||
.../after/syntax/baan.vim (see |after-directory|). Eg: >
 | 
			
		||||
the options 'foldminlines' and 'foldnestmax' in |init.vim| or use |:setlocal| 
 | 
			
		||||
in .../after/syntax/baan.vim (see |after-directory|). Eg: >
 | 
			
		||||
	set foldminlines=5
 | 
			
		||||
	set foldnestmax=6
 | 
			
		||||
 | 
			
		||||
@@ -977,7 +977,7 @@ highlighting for cErrInParen and cErrInBracket.
 | 
			
		||||
 | 
			
		||||
If you want to use folding in your C files, you can add these lines in a file
 | 
			
		||||
in the "after" directory in 'runtimepath'.  For Unix this would be
 | 
			
		||||
~/.vim/after/syntax/c.vim. >
 | 
			
		||||
~/.config/nvim/after/syntax/c.vim. >
 | 
			
		||||
    syn sync fromstart
 | 
			
		||||
    set foldmethod=syntax
 | 
			
		||||
 | 
			
		||||
@@ -1004,7 +1004,7 @@ chill_minlines		like c_minlines
 | 
			
		||||
CHANGELOG				*changelog.vim* *ft-changelog-syntax*
 | 
			
		||||
 | 
			
		||||
ChangeLog supports highlighting spaces at the start of a line.
 | 
			
		||||
If you do not like this, add following line to your .vimrc: >
 | 
			
		||||
If you do not like this, add following line to your vimrc: >
 | 
			
		||||
	let g:changelog_spacing_errors = 0
 | 
			
		||||
This works the next time you edit a changelog file.  You can also use
 | 
			
		||||
"b:changelog_spacing_errors" to set this per buffer (before loading the syntax
 | 
			
		||||
@@ -1037,7 +1037,7 @@ COBOL						*cobol.vim* *ft-cobol-syntax*
 | 
			
		||||
COBOL highlighting has different needs for legacy code than it does for fresh
 | 
			
		||||
development.  This is due to differences in what is being done (maintenance
 | 
			
		||||
versus development) and other factors.	To enable legacy code highlighting,
 | 
			
		||||
add this line to your .vimrc: >
 | 
			
		||||
add this line to your vimrc: >
 | 
			
		||||
	:let cobol_legacy_code = 1
 | 
			
		||||
To disable it again, use this: >
 | 
			
		||||
	:unlet cobol_legacy_code
 | 
			
		||||
@@ -1090,7 +1090,7 @@ Cynlib files are C++ files that use the Cynlib class library to enable
 | 
			
		||||
hardware modelling and simulation using C++.  Typically Cynlib files have a .cc
 | 
			
		||||
or a .cpp extension, which makes it very difficult to distinguish them from a
 | 
			
		||||
normal C++ file.  Thus, to enable Cynlib highlighting for .cc files, add this
 | 
			
		||||
line to your .vimrc file: >
 | 
			
		||||
line to your vimrc file: >
 | 
			
		||||
 | 
			
		||||
	:let cynlib_cyntax_for_cc=1
 | 
			
		||||
 | 
			
		||||
@@ -1202,7 +1202,7 @@ or >
 | 
			
		||||
 | 
			
		||||
It can also be done automatically for C, C++, C#, IDL and PHP files by setting
 | 
			
		||||
the global or buffer-local variable load_doxygen_syntax.  This is done by
 | 
			
		||||
adding the following to your .vimrc. >
 | 
			
		||||
adding the following to your vimrc. >
 | 
			
		||||
	:let g:load_doxygen_syntax=1
 | 
			
		||||
 | 
			
		||||
There are a couple of variables that have an effect on syntax highlighting, and
 | 
			
		||||
@@ -1355,7 +1355,7 @@ start of a new paragraph, so the ftplugin sets 'tw'=0 (unlimited line length),
 | 
			
		||||
and so on. It also includes some keymaps that are disabled by default.
 | 
			
		||||
 | 
			
		||||
If you want to enable the keymaps that make "j" and "k" and the cursor keys
 | 
			
		||||
move up and down by display lines, add this to your .vimrc: >
 | 
			
		||||
move up and down by display lines, add this to your vimrc: >
 | 
			
		||||
	:let flexwiki_maps = 1
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -1407,10 +1407,10 @@ syntax highlighting will not be correct if the form is incorrectly set.
 | 
			
		||||
When you create a new fortran file, the syntax script assumes fixed source
 | 
			
		||||
form.  If you always use free source form, then >
 | 
			
		||||
    :let fortran_free_source=1
 | 
			
		||||
in your .vimrc prior to the :syntax on command.  If you always use fixed source
 | 
			
		||||
in your vimrc prior to the :syntax on command.  If you always use fixed source
 | 
			
		||||
form, then >
 | 
			
		||||
    :let fortran_fixed_source=1
 | 
			
		||||
in your .vimrc prior to the :syntax on command.
 | 
			
		||||
in your vimrc prior to the :syntax on command.
 | 
			
		||||
 | 
			
		||||
If the form of the source code depends upon the file extension, then it is
 | 
			
		||||
most convenient to set fortran_free_source in a ftplugin file.  For more
 | 
			
		||||
@@ -1426,7 +1426,7 @@ rest in fixed source form, add the following code to your ftplugin file >
 | 
			
		||||
	unlet! fortran_free_source
 | 
			
		||||
    endif
 | 
			
		||||
Note that this will work only if the "filetype plugin indent on" command
 | 
			
		||||
precedes the "syntax on" command in your .vimrc file.
 | 
			
		||||
precedes the "syntax on" command in your vimrc file.
 | 
			
		||||
 | 
			
		||||
When you edit an existing fortran file, the syntax script will assume free
 | 
			
		||||
source form if the fortran_free_source variable has been set, and assumes
 | 
			
		||||
@@ -1446,7 +1446,7 @@ Tabs are not recognized by the Fortran standards.  Tabs are not a good idea in
 | 
			
		||||
fixed format fortran source code which requires fixed column boundaries.
 | 
			
		||||
Therefore, tabs are marked as errors.  Nevertheless, some programmers like
 | 
			
		||||
using tabs.  If your fortran files contain tabs, then you should set the
 | 
			
		||||
variable fortran_have_tabs in your .vimrc with a command such as >
 | 
			
		||||
variable fortran_have_tabs in your vimrc with a command such as >
 | 
			
		||||
    :let fortran_have_tabs=1
 | 
			
		||||
placed prior to the :syntax on command.  Unfortunately, the use of tabs will
 | 
			
		||||
mean that the syntax file will not be able to detect incorrect margins.
 | 
			
		||||
@@ -1492,7 +1492,7 @@ other legacy features excluded from F will be highlighted as todo items and
 | 
			
		||||
that free source form will be assumed.
 | 
			
		||||
 | 
			
		||||
The dialect can be selected in various ways.  If all your fortran files use
 | 
			
		||||
the same dialect, set the global variable fortran_dialect in your .vimrc prior
 | 
			
		||||
the same dialect, set the global variable fortran_dialect in your vimrc prior
 | 
			
		||||
to your syntax on statement.  The case-sensitive, permissible values of
 | 
			
		||||
fortran_dialect are "f08" or "F".  Invalid values of fortran_dialect are
 | 
			
		||||
ignored.
 | 
			
		||||
@@ -1509,7 +1509,7 @@ contain the code >
 | 
			
		||||
	unlet! b:fortran_dialect
 | 
			
		||||
    endif
 | 
			
		||||
Note that this will work only if the "filetype plugin indent on" command
 | 
			
		||||
precedes the "syntax on" command in your .vimrc file.
 | 
			
		||||
precedes the "syntax on" command in your vimrc file.
 | 
			
		||||
 | 
			
		||||
Finer control is necessary if the file extension does not uniquely identify
 | 
			
		||||
the dialect.  You can override the default dialect, on a file-by-file basis,
 | 
			
		||||
@@ -1561,7 +1561,7 @@ in /usr/X11/lib/X11/, you should add the line >
 | 
			
		||||
 | 
			
		||||
	:let rgb_file = "/usr/X11/lib/X11/rgb.txt"
 | 
			
		||||
 | 
			
		||||
to your .vimrc file.
 | 
			
		||||
to your vimrc file.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
GSP						*gsp.vim* *ft-gsp-syntax*
 | 
			
		||||
@@ -1603,7 +1603,7 @@ Haskell code, the latter in both Bird style and TeX style.  The Haskell
 | 
			
		||||
syntax highlighting will also highlight C preprocessor directives.
 | 
			
		||||
 | 
			
		||||
If you want to highlight delimiter characters (useful if you have a
 | 
			
		||||
light-coloured background), add to your .vimrc: >
 | 
			
		||||
light-coloured background), add to your vimrc: >
 | 
			
		||||
	:let hs_highlight_delimiters = 1
 | 
			
		||||
To treat True and False as keywords as opposed to ordinary identifiers,
 | 
			
		||||
add: >
 | 
			
		||||
@@ -1613,21 +1613,21 @@ To also treat the names of primitive types as keywords: >
 | 
			
		||||
And to treat the names of even more relatively common types as keywords: >
 | 
			
		||||
	:let hs_highlight_more_types = 1
 | 
			
		||||
If you want to highlight the names of debugging functions, put in
 | 
			
		||||
your .vimrc: >
 | 
			
		||||
your vimrc: >
 | 
			
		||||
	:let hs_highlight_debug = 1
 | 
			
		||||
 | 
			
		||||
The Haskell syntax highlighting also highlights C preprocessor
 | 
			
		||||
directives, and flags lines that start with # but are not valid
 | 
			
		||||
directives as erroneous.  This interferes with Haskell's syntax for
 | 
			
		||||
operators, as they may start with #.  If you want to highlight those
 | 
			
		||||
as operators as opposed to errors, put in your .vimrc: >
 | 
			
		||||
as operators as opposed to errors, put in your vimrc: >
 | 
			
		||||
	:let hs_allow_hash_operator = 1
 | 
			
		||||
 | 
			
		||||
The syntax highlighting for literate Haskell code will try to
 | 
			
		||||
automatically guess whether your literate Haskell code contains
 | 
			
		||||
TeX markup or not, and correspondingly highlight TeX constructs
 | 
			
		||||
or nothing at all.  You can override this globally by putting
 | 
			
		||||
in your .vimrc >
 | 
			
		||||
in your vimrc >
 | 
			
		||||
	:let lhs_markup = none
 | 
			
		||||
for no highlighting at all, or >
 | 
			
		||||
	:let lhs_markup = tex
 | 
			
		||||
@@ -1720,7 +1720,7 @@ The coloring scheme for HTML/OS works as follows:
 | 
			
		||||
Functions and variable names are the same color by default, because VIM
 | 
			
		||||
doesn't specify different colors for Functions and Identifiers.  To change
 | 
			
		||||
this (which is recommended if you want function names to be recognizable in a
 | 
			
		||||
different color) you need to add the following line to either your ~/.vimrc: >
 | 
			
		||||
different color) you need to add the following line to your vimrc: >
 | 
			
		||||
  :hi Function term=underline cterm=bold ctermfg=LightGray
 | 
			
		||||
 | 
			
		||||
Of course, the ctermfg can be a different color if you choose.
 | 
			
		||||
@@ -1739,7 +1739,7 @@ IA64				*ia64.vim* *intel-itanium* *ft-ia64-syntax*
 | 
			
		||||
Highlighting for the Intel Itanium 64 assembly language.  See |asm.vim| for
 | 
			
		||||
how to recognize this filetype.
 | 
			
		||||
 | 
			
		||||
To have *.inc files be recognized as IA64, add this to your .vimrc file: >
 | 
			
		||||
To have *.inc files be recognized as IA64, add this to your vimrc file: >
 | 
			
		||||
	:let g:filetype_inc = "ia64"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -1901,7 +1901,7 @@ difficulties (such as may happen with large lex files).
 | 
			
		||||
 | 
			
		||||
LIFELINES				*lifelines.vim* *ft-lifelines-syntax*
 | 
			
		||||
 | 
			
		||||
To highlight deprecated functions as errors, add in your .vimrc: >
 | 
			
		||||
To highlight deprecated functions as errors, add in your vimrc: >
 | 
			
		||||
 | 
			
		||||
	:let g:lifelines_deprecated = 1
 | 
			
		||||
<
 | 
			
		||||
@@ -1944,7 +1944,7 @@ LPC						*lpc.vim* *ft-lpc-syntax*
 | 
			
		||||
LPC stands for a simple, memory-efficient language: Lars Pensj| C.  The
 | 
			
		||||
file name of LPC is usually *.c.  Recognizing these files as LPC would bother
 | 
			
		||||
users writing only C programs.	If you want to use LPC syntax in Vim, you
 | 
			
		||||
should set a variable in your .vimrc file: >
 | 
			
		||||
should set a variable in your vimrc file: >
 | 
			
		||||
 | 
			
		||||
	:let lpc_syntax_for_c = 1
 | 
			
		||||
 | 
			
		||||
@@ -2023,13 +2023,13 @@ MAPLE						*maple.vim* *ft-maple-syntax*
 | 
			
		||||
Maple V, by Waterloo Maple Inc, supports symbolic algebra.  The language
 | 
			
		||||
supports many packages of functions which are selectively loaded by the user.
 | 
			
		||||
The standard set of packages' functions as supplied in Maple V release 4 may be
 | 
			
		||||
highlighted at the user's discretion.  Users may place in their .vimrc file: >
 | 
			
		||||
highlighted at the user's discretion.  Users may place in their vimrc file: >
 | 
			
		||||
 | 
			
		||||
	:let mvpkg_all= 1
 | 
			
		||||
 | 
			
		||||
to get all package functions highlighted, or users may select any subset by
 | 
			
		||||
choosing a variable/package from the table below and setting that variable to
 | 
			
		||||
1, also in their .vimrc file (prior to sourcing
 | 
			
		||||
1, also in their vimrc file (prior to sourcing
 | 
			
		||||
$VIMRUNTIME/syntax/syntax.vim).
 | 
			
		||||
 | 
			
		||||
	Table of Maple V Package Function Selectors >
 | 
			
		||||
@@ -2046,7 +2046,7 @@ $VIMRUNTIME/syntax/syntax.vim).
 | 
			
		||||
MATHEMATICA		*mma.vim* *ft-mma-syntax* *ft-mathematica-syntax*
 | 
			
		||||
 | 
			
		||||
Empty *.m files will automatically be presumed to be Matlab files unless you
 | 
			
		||||
have the following in your .vimrc: >
 | 
			
		||||
have the following in your vimrc: >
 | 
			
		||||
 | 
			
		||||
	let filetype_m = "mma"
 | 
			
		||||
 | 
			
		||||
@@ -2172,7 +2172,7 @@ highlighting definition for the syntax groups "nroffDefinition" and
 | 
			
		||||
			 \ gui=reverse,bold
 | 
			
		||||
 | 
			
		||||
If you want to navigate preprocessor entries in your source file as easily as
 | 
			
		||||
with section markers, you can activate the following option in your .vimrc
 | 
			
		||||
with section markers, you can activate the following option in your vimrc
 | 
			
		||||
file: >
 | 
			
		||||
 | 
			
		||||
	let b:preprocs_as_sections = 1
 | 
			
		||||
@@ -2625,7 +2625,7 @@ number is that redrawing can become slow.
 | 
			
		||||
 | 
			
		||||
Vim tries to guess what type a ".r" file is.  If it can't be detected (from
 | 
			
		||||
comment lines), the default is "r".  To make the default rexx add this line to
 | 
			
		||||
your .vimrc:  *g:filetype_r*
 | 
			
		||||
your vimrc:							*g:filetype_r*
 | 
			
		||||
>
 | 
			
		||||
	:let g:filetype_r = "r"
 | 
			
		||||
 | 
			
		||||
@@ -2808,7 +2808,7 @@ be shell files but the type is not apparent.  Furthermore, on many systems
 | 
			
		||||
sh is symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" (Posix).
 | 
			
		||||
 | 
			
		||||
One may specify a global default by instantiating one of the following three
 | 
			
		||||
variables in your <.vimrc>:
 | 
			
		||||
variables in your vimrc:
 | 
			
		||||
 | 
			
		||||
    ksh: >
 | 
			
		||||
	let g:is_kornshell = 1
 | 
			
		||||
@@ -2823,7 +2823,7 @@ If there's no "#! ..." line, and the user hasn't availed himself/herself of a
 | 
			
		||||
default sh.vim syntax setting as just shown, then syntax/sh.vim will assume
 | 
			
		||||
the Bourne shell syntax.  No need to quote RFCs or market penetration
 | 
			
		||||
statistics in error reports, please -- just select the default version of the
 | 
			
		||||
sh your system uses in your <.vimrc>.
 | 
			
		||||
sh your system uses in your vimrc.
 | 
			
		||||
 | 
			
		||||
The syntax/sh.vim file provides several levels of syntax-based folding: >
 | 
			
		||||
 | 
			
		||||
@@ -2869,7 +2869,7 @@ this behavior with: >
 | 
			
		||||
 | 
			
		||||
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/.vim/after/syntax/sh/awkembed.vim: >
 | 
			
		||||
file into $HOME/.config/nvim/after/syntax/sh/awkembed.vim: >
 | 
			
		||||
 | 
			
		||||
    " AWK Embedding: {{{1
 | 
			
		||||
    " ==============
 | 
			
		||||
@@ -2945,7 +2945,7 @@ for how the filetype is detected.
 | 
			
		||||
 | 
			
		||||
Tcsh does not allow \" in strings unless the "backslash_quote" shell variable
 | 
			
		||||
is set.  If you want VIM to assume that no backslash quote constructs exist add
 | 
			
		||||
this line to your .vimrc: >
 | 
			
		||||
this line to your vimrc: >
 | 
			
		||||
 | 
			
		||||
	:let tcsh_backslash_quote = 0
 | 
			
		||||
 | 
			
		||||
@@ -2986,7 +2986,7 @@ TEX				*tex.vim* *ft-tex-syntax* *latex-syntax*
 | 
			
		||||
As of version 28 of <syntax/tex.vim>, syntax-based folding of parts, chapters,
 | 
			
		||||
sections, subsections, etc are supported.  Put >
 | 
			
		||||
	let g:tex_fold_enabled=1
 | 
			
		||||
in your <.vimrc>, and :set fdm=syntax.  I suggest doing the latter via a
 | 
			
		||||
in your vimrc, and :set fdm=syntax.  I suggest doing the latter via a
 | 
			
		||||
modeline at the end of your LaTeX file: >
 | 
			
		||||
	% vim: fdm=syntax
 | 
			
		||||
If your system becomes too slow, then you might wish to look into >
 | 
			
		||||
@@ -2997,7 +2997,7 @@ If your system becomes too slow, then you might wish to look into >
 | 
			
		||||
 | 
			
		||||
If you don't want spell checking anywhere in your LaTeX document, put >
 | 
			
		||||
	let g:tex_nospell=1
 | 
			
		||||
into your .vimrc.  If you merely wish to suppress spell checking inside
 | 
			
		||||
into your vimrc.  If you merely wish to suppress spell checking inside
 | 
			
		||||
comments only, see |g:tex_comment_nospell|.
 | 
			
		||||
 | 
			
		||||
				*tex-nospell* *g:tex_comment_nospell*
 | 
			
		||||
@@ -3005,7 +3005,7 @@ comments only, see |g:tex_comment_nospell|.
 | 
			
		||||
 | 
			
		||||
Some folks like to include things like source code in comments and so would
 | 
			
		||||
prefer that spell checking be disabled in comments in LaTeX files.  To do
 | 
			
		||||
this, put the following in your <.vimrc>: >
 | 
			
		||||
this, put the following in your vimrc: >
 | 
			
		||||
      let g:tex_comment_nospell= 1
 | 
			
		||||
If you want to suppress spell checking everywhere inside your LaTeX document,
 | 
			
		||||
see |g:tex_nospell|.
 | 
			
		||||
@@ -3015,7 +3015,7 @@ see |g:tex_nospell|.
 | 
			
		||||
 | 
			
		||||
Often verbatim regions are used for things like source code; seldom does
 | 
			
		||||
one want source code spell-checked.  However, for those of you who do
 | 
			
		||||
want your verbatim zones spell-checked, put the following in your <.vimrc>: >
 | 
			
		||||
want your verbatim zones spell-checked, put the following in your vimrc: >
 | 
			
		||||
	let g:tex_verbspell= 1
 | 
			
		||||
<
 | 
			
		||||
					*tex-runon* *tex-stopzone*
 | 
			
		||||
@@ -3050,7 +3050,7 @@ Finally, if syntax highlighting is still too slow, you may set >
 | 
			
		||||
 | 
			
		||||
	:let g:tex_fast= ""
 | 
			
		||||
 | 
			
		||||
in your .vimrc.  Used this way, the g:tex_fast variable causes the syntax
 | 
			
		||||
in your vimrc.  Used this way, the g:tex_fast variable causes the syntax
 | 
			
		||||
highlighting script to avoid defining any regions and associated
 | 
			
		||||
synchronization.  The result will be much faster syntax highlighting; the
 | 
			
		||||
price: you will no longer have as much highlighting or any syntax-based
 | 
			
		||||
@@ -3092,7 +3092,7 @@ http://vim.sf.net/.
 | 
			
		||||
The <tex.vim> supports lexical error checking of various sorts.  Thus,
 | 
			
		||||
although the error checking is ofttimes very useful, it can indicate
 | 
			
		||||
errors where none actually are.  If this proves to be a problem for you,
 | 
			
		||||
you may put in your <.vimrc> the following statement: >
 | 
			
		||||
you may put in your vimrc the following statement: >
 | 
			
		||||
	let g:tex_no_error=1
 | 
			
		||||
and all error checking by <syntax/tex.vim> will be suppressed.
 | 
			
		||||
 | 
			
		||||
@@ -3122,7 +3122,7 @@ such use of @ as an error.  To solve this: >
 | 
			
		||||
	:let b:tex_stylish = 1
 | 
			
		||||
	:set ft=tex
 | 
			
		||||
 | 
			
		||||
Putting "let g:tex_stylish=1" into your <.vimrc> will make <syntax/tex.vim>
 | 
			
		||||
Putting "let g:tex_stylish=1" into your vimrc will make <syntax/tex.vim>
 | 
			
		||||
always accept such use of @.
 | 
			
		||||
 | 
			
		||||
					*tex-cchar* *tex-cole* *tex-conceal*
 | 
			
		||||
@@ -3142,7 +3142,7 @@ with |'conceallevel'| at 0 and the other at 2; and both using |'scrollbind'|.
 | 
			
		||||
 Tex: Selective Conceal Mode~
 | 
			
		||||
 | 
			
		||||
You may selectively use conceal mode by setting g:tex_conceal in your
 | 
			
		||||
<.vimrc>.  By default, g:tex_conceal is set to "admgs" to enable concealment
 | 
			
		||||
vimrc.  By default, g:tex_conceal is set to "admgs" to enable concealment
 | 
			
		||||
for the following sets of characters: >
 | 
			
		||||
 | 
			
		||||
	a = accents/ligatures
 | 
			
		||||
@@ -3193,8 +3193,8 @@ syntax highlighting script handles this with the following logic:
 | 
			
		||||
	For example, I use Luxi Mono Bold; it doesn't support subscript
 | 
			
		||||
	characters for "hklmnpst", so I put >
 | 
			
		||||
		let g:tex_subscripts= "[0-9aeijoruvx,+-/().]"
 | 
			
		||||
<	in ~/.vim/ftplugin/tex/tex.vim in order to avoid having inscrutable
 | 
			
		||||
	utf-8 glyphs appear.
 | 
			
		||||
<	in ~/.config/nvim/ftplugin/tex/tex.vim in order to avoid having 
 | 
			
		||||
	inscrutable utf-8 glyphs appear.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
TF						*tf.vim* *ft-tf-syntax*
 | 
			
		||||
@@ -3252,7 +3252,7 @@ The syntax of XF86Config file differs in XFree86 v3.x and v4.x.  Both
 | 
			
		||||
variants are supported.  Automatic detection is used, but is far from perfect.
 | 
			
		||||
You may need to specify the version manually.  Set the variable
 | 
			
		||||
xf86conf_xfree86_version to 3 or 4 according to your XFree86 version in
 | 
			
		||||
your .vimrc.  Example: >
 | 
			
		||||
your vimrc.  Example: >
 | 
			
		||||
	:let xf86conf_xfree86_version=3
 | 
			
		||||
When using a mix of versions, set the b:xf86conf_xfree86_version variable.
 | 
			
		||||
 | 
			
		||||
@@ -4646,7 +4646,7 @@ ctermbg={color-nr}				*highlight-ctermbg*
 | 
			
		||||
	When you have set "ctermfg" or "ctermbg" for the Normal group, Vim
 | 
			
		||||
	needs to reset the color when exiting.	This is done with the "op"
 | 
			
		||||
	termcap entry |t_op|.  If this doesn't work correctly, try setting the
 | 
			
		||||
	't_op' option in your .vimrc.
 | 
			
		||||
	't_op' option in your vimrc.
 | 
			
		||||
							*E419* *E420*
 | 
			
		||||
	When Vim knows the normal foreground and background colors, "fg" and
 | 
			
		||||
	"bg" can be used as color names.  This only works after setting the
 | 
			
		||||
@@ -4979,7 +4979,8 @@ script file to set these colors.  Put this file in a directory in
 | 
			
		||||
the default colors.  This way these colors will be used after the ":syntax
 | 
			
		||||
reset" command.
 | 
			
		||||
 | 
			
		||||
For Unix you can use the file ~/.vim/after/syntax/syncolor.vim.  Example: >
 | 
			
		||||
For Unix you can use the file ~/.config/nvim/after/syntax/syncolor.vim.  
 | 
			
		||||
Example: >
 | 
			
		||||
 | 
			
		||||
	if &background == "light"
 | 
			
		||||
	  highlight comment ctermfg=darkgreen guifg=darkgreen
 | 
			
		||||
@@ -5036,7 +5037,7 @@ types.vim: *.[ch]
 | 
			
		||||
		awk 'BEGIN{printf("syntax keyword Type\t")}\
 | 
			
		||||
			{printf("%s ", $$1)}END{print ""}' > $@
 | 
			
		||||
 | 
			
		||||
And put these lines in your .vimrc: >
 | 
			
		||||
And put these lines in your vimrc: >
 | 
			
		||||
 | 
			
		||||
   " load the types.vim highlighting file, if it exists
 | 
			
		||||
   autocmd BufRead,BufNewFile *.[ch] let fname = expand('<afile>:p:h') . '/types.vim'
 | 
			
		||||
@@ -5078,7 +5079,7 @@ When splitting the window, the new window will use the original syntax.
 | 
			
		||||
17. Color xterms				*xterm-color* *color-xterm*
 | 
			
		||||
 | 
			
		||||
Most color xterms have only eight colors.  If you don't get colors with the
 | 
			
		||||
default setup, it should work with these lines in your .vimrc: >
 | 
			
		||||
default setup, it should work with these lines in your vimrc: >
 | 
			
		||||
   :if &term =~ "xterm"
 | 
			
		||||
   :  if has("terminfo")
 | 
			
		||||
   :	set t_Co=8
 | 
			
		||||
@@ -5125,7 +5126,7 @@ supports. >
 | 
			
		||||
If you only get 8 colors, check the xterm compilation settings.
 | 
			
		||||
(Also see |UTF8-xterm| for using this xterm with UTF-8 character encoding).
 | 
			
		||||
 | 
			
		||||
This xterm should work with these lines in your .vimrc (for 16 colors): >
 | 
			
		||||
This xterm should work with these lines in your vimrc (for 16 colors): >
 | 
			
		||||
   :if has("terminfo")
 | 
			
		||||
   :  set t_Co=16
 | 
			
		||||
   :  set t_AB=<Esc>[%?%p1%{8}%<%t%p1%{40}%+%e%p1%{92}%+%;%dm
 | 
			
		||||
 
 | 
			
		||||
@@ -37,7 +37,7 @@ used.  Also see |xterm-screens|.
 | 
			
		||||
Settings depending on terminal			*term-dependent-settings*
 | 
			
		||||
 | 
			
		||||
If you want to set options or mappings, depending on the terminal name, you
 | 
			
		||||
can do this best in your .vimrc.  Example: >
 | 
			
		||||
can do this best in your vimrc.  Example: >
 | 
			
		||||
 | 
			
		||||
   if &term == "xterm"
 | 
			
		||||
     ... xterm maps and settings ...
 | 
			
		||||
 
 | 
			
		||||
@@ -98,7 +98,7 @@ What you need:
 | 
			
		||||
- An identifier database file called "ID" in the current directory.  You can
 | 
			
		||||
  create it with the shell command "mkid file1 file2 ..".
 | 
			
		||||
 | 
			
		||||
Put this in your .vimrc: >
 | 
			
		||||
Put this in your |init.vim|: >
 | 
			
		||||
	map _u :call ID_search()<Bar>execute "/\\<" . g:word . "\\>"<CR>
 | 
			
		||||
	map _n :n<Bar>execute "/\\<" . g:word . "\\>"<CR>
 | 
			
		||||
 | 
			
		||||
@@ -404,7 +404,7 @@ See section |23.4| of the user manual.
 | 
			
		||||
 | 
			
		||||
If one has a particular extension that one uses for binary files (such as exe,
 | 
			
		||||
bin, etc), you may find it helpful to automate the process with the following
 | 
			
		||||
bit of autocmds for your <.vimrc>.  Change that "*.bin" to whatever
 | 
			
		||||
bit of autocmds for your |init.vim|.  Change that "*.bin" to whatever
 | 
			
		||||
comma-separated list of extension(s) you find yourself wanting to edit: >
 | 
			
		||||
 | 
			
		||||
	" vim -b : edit binary using xxd-format!
 | 
			
		||||
 
 | 
			
		||||
@@ -60,10 +60,7 @@ make them visible with: >
 | 
			
		||||
It's not required for this tutorial, but we provide an example vimrc you may
 | 
			
		||||
use:
 | 
			
		||||
 | 
			
		||||
Unix: >
 | 
			
		||||
	:!cp -i $VIMRUNTIME/vimrc_example.vim ~/.vimrc
 | 
			
		||||
MS-DOS, MS-Windows: >
 | 
			
		||||
	:!copy $VIMRUNTIME/vimrc_example.vim $VIM/_vimrc
 | 
			
		||||
	:!cp -i $VIMRUNTIME/vimrc_example.vim ~/.config/nvim/init.vim
 | 
			
		||||
 | 
			
		||||
If the file already exists you probably want to keep it.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -470,7 +470,7 @@ If you like one of the options mentioned before, and set it each time you use
 | 
			
		||||
Vim, you can put the command in your Vim startup file.  Edit the file, for
 | 
			
		||||
example with: >
 | 
			
		||||
 | 
			
		||||
	:edit ~/.vimrc
 | 
			
		||||
	:edit ~/.config/nvim/init.vim
 | 
			
		||||
 | 
			
		||||
Then add a line with the command to set the option, just like you typed it in
 | 
			
		||||
Vim.  Example: >
 | 
			
		||||
 
 | 
			
		||||
@@ -26,26 +26,20 @@ Table of contents: |usr_toc.txt|
 | 
			
		||||
 | 
			
		||||
You probably got tired of typing commands that you use very often.  To start
 | 
			
		||||
Vim with all your favorite option settings and mappings, you write them in
 | 
			
		||||
what is called the vimrc file.  Vim executes the commands in this file when it
 | 
			
		||||
starts up.
 | 
			
		||||
what is called the init.vim file.  Vim executes the commands in this file when 
 | 
			
		||||
it starts up.
 | 
			
		||||
 | 
			
		||||
If you already have a vimrc file (e.g., when your sysadmin has one setup for
 | 
			
		||||
you), you can edit it this way: >
 | 
			
		||||
If you already have a init.vim file (e.g., when your sysadmin has one setup 
 | 
			
		||||
for you), you can edit it this way: >
 | 
			
		||||
 | 
			
		||||
	:edit $MYVIMRC
 | 
			
		||||
 | 
			
		||||
If you don't have a vimrc file yet, see |vimrc| to find out where you can
 | 
			
		||||
create a vimrc file.  Also, the ":version" command mentions the name of the
 | 
			
		||||
"user vimrc file" Vim looks for.
 | 
			
		||||
If you don't have a vimrc file yet, see |init.vim| to find out where you can
 | 
			
		||||
create a vimrc file.
 | 
			
		||||
 | 
			
		||||
For Unix and Macintosh this file is always used and is recommended:
 | 
			
		||||
 | 
			
		||||
	~/.vimrc ~
 | 
			
		||||
 | 
			
		||||
For MS-DOS and MS-Windows you can use one of these:
 | 
			
		||||
 | 
			
		||||
	$HOME/_vimrc ~
 | 
			
		||||
	$VIM/_vimrc ~
 | 
			
		||||
	~/.config/nvim/init.vim ~
 | 
			
		||||
 | 
			
		||||
The vimrc file can contain all the commands that you type after a colon.  The
 | 
			
		||||
most simple ones are for setting options.  For example, if you want Vim to
 | 
			
		||||
@@ -300,23 +294,20 @@ First read the text in the plugin itself to check for any special conditions.
 | 
			
		||||
Then copy the file to your plugin directory:
 | 
			
		||||
 | 
			
		||||
	system		plugin directory ~
 | 
			
		||||
	Unix		~/.vim/plugin/
 | 
			
		||||
	Macintosh	$VIM:vimfiles:plugin
 | 
			
		||||
	Mac OS X	~/.vim/plugin/
 | 
			
		||||
	Unix		~/.local/share/nvim/site/plugin
 | 
			
		||||
 | 
			
		||||
Example for Unix (assuming you didn't have a plugin directory yet): >
 | 
			
		||||
 | 
			
		||||
	mkdir ~/.vim
 | 
			
		||||
	mkdir ~/.vim/plugin
 | 
			
		||||
	cp /usr/local/share/vim/vim60/macros/justify.vim ~/.vim/plugin
 | 
			
		||||
	mkdir -p ~/.local/share/nvim/site/plugin
 | 
			
		||||
	cp /usr/local/share/vim/vim60/macros/justify.vim ~/.local/share/nvim/site/plugin
 | 
			
		||||
 | 
			
		||||
That's all!  Now you can use the commands defined in this plugin to justify
 | 
			
		||||
text.
 | 
			
		||||
 | 
			
		||||
Instead of putting plugins directly into the plugin/ directory, you may
 | 
			
		||||
better organize them by putting them into subdirectories under plugin/.
 | 
			
		||||
As an example, consider using "~/.vim/plugin/perl/*.vim" for all your Perl
 | 
			
		||||
plugins.
 | 
			
		||||
As an example, consider using "~/.local/share/nvim/site/plugin/perl/*.vim" for 
 | 
			
		||||
all your Perl plugins.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
FILETYPE PLUGINS			*add-filetype-plugin* *ftplugins*
 | 
			
		||||
@@ -350,25 +341,19 @@ plugins, but the last part is "ftplugin".  Suppose you have found a plugin for
 | 
			
		||||
the "stuff" filetype, and you are on Unix.  Then you can move this file to the
 | 
			
		||||
ftplugin directory: >
 | 
			
		||||
 | 
			
		||||
	mv thefile ~/.vim/ftplugin/stuff.vim
 | 
			
		||||
	mkdir -p ~/.local/share/nvim/site/ftplugin
 | 
			
		||||
	mv thefile ~/.local/share/nvim/site/ftplugin/stuff.vim
 | 
			
		||||
 | 
			
		||||
If that file already exists you already have a plugin for "stuff".  You might
 | 
			
		||||
want to check if the existing plugin doesn't conflict with the one you are
 | 
			
		||||
adding.  If it's OK, you can give the new one another name: >
 | 
			
		||||
 | 
			
		||||
	mv thefile ~/.vim/ftplugin/stuff_too.vim
 | 
			
		||||
	mv thefile ~/.local/share/nvim/site/ftplugin/stuff_too.vim
 | 
			
		||||
 | 
			
		||||
The underscore is used to separate the name of the filetype from the rest,
 | 
			
		||||
which can be anything.  If you use "otherstuff.vim" it wouldn't work, it would
 | 
			
		||||
be loaded for the "otherstuff" filetype.
 | 
			
		||||
 | 
			
		||||
On MS-DOS you cannot use long filenames.  You would run into trouble if you
 | 
			
		||||
add a second plugin and the filetype has more than six characters.  You can
 | 
			
		||||
use an extra directory to get around this: >
 | 
			
		||||
 | 
			
		||||
	mkdir $VIM/vimfiles/ftplugin/fortran
 | 
			
		||||
	copy thefile $VIM/vimfiles/ftplugin/fortran/too.vim
 | 
			
		||||
 | 
			
		||||
The generic names for the filetype plugins are: >
 | 
			
		||||
 | 
			
		||||
	ftplugin/<filetype>.vim
 | 
			
		||||
@@ -378,9 +363,9 @@ The generic names for the filetype plugins are: >
 | 
			
		||||
Here "<name>" can be any name that you prefer.
 | 
			
		||||
Examples for the "stuff" filetype on Unix: >
 | 
			
		||||
 | 
			
		||||
	~/.vim/ftplugin/stuff.vim
 | 
			
		||||
	~/.vim/ftplugin/stuff_def.vim
 | 
			
		||||
	~/.vim/ftplugin/stuff/header.vim
 | 
			
		||||
	~/.local/share/nvim/site/ftplugin/stuff.vim
 | 
			
		||||
	~/.local/share/nvim/site/ftplugin/stuff_def.vim
 | 
			
		||||
	~/.local/share/nvim/site/ftplugin/stuff/header.vim
 | 
			
		||||
 | 
			
		||||
The <filetype> part is the name of the filetype the plugin is to be used for.
 | 
			
		||||
Only files of this filetype will use the settings from the plugin.  The <name>
 | 
			
		||||
@@ -410,16 +395,16 @@ non-standard place (it usually resides in a sub-folder called `doc/`).
 | 
			
		||||
 | 
			
		||||
First, create a "doc" directory in one of the directories in 'runtimepath': >
 | 
			
		||||
 | 
			
		||||
	:!mkdir ~/.vim/doc
 | 
			
		||||
	:!mkdir -p ~/.local/share/nvim/site/doc
 | 
			
		||||
 | 
			
		||||
Now, copy the help file to the "doc" directory: >
 | 
			
		||||
 | 
			
		||||
	:!cp my-plugin/my-plugin-doc.txt ~/.vim/doc
 | 
			
		||||
	:!cp my-plugin/my-plugin-doc.txt ~/.local/share/nvim/site/doc
 | 
			
		||||
 | 
			
		||||
Here comes the trick, which allows you to jump to the subjects in the new help
 | 
			
		||||
file. Generate the local tags file with the |:helptags| command: >
 | 
			
		||||
 | 
			
		||||
	:helptags ~/.vim/doc
 | 
			
		||||
	:helptags ~/.local/share/nvim/site/doc
 | 
			
		||||
 | 
			
		||||
You can see an entry for the local help file when you do: >
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -35,17 +35,17 @@ easy to overview the file.  After a while you will find that black&white text
 | 
			
		||||
slows you down!
 | 
			
		||||
 | 
			
		||||
If you always want to use syntax highlighting, put the ":syntax enable"
 | 
			
		||||
command in your |vimrc| file.
 | 
			
		||||
command in your |init.vim| file.
 | 
			
		||||
 | 
			
		||||
If you want syntax highlighting only when the terminal supports colors, you
 | 
			
		||||
can put this in your |vimrc| file: >
 | 
			
		||||
can put this in your |init.vim| file: >
 | 
			
		||||
 | 
			
		||||
	if &t_Co > 1
 | 
			
		||||
	   syntax enable
 | 
			
		||||
	endif
 | 
			
		||||
 | 
			
		||||
If you want syntax highlighting only in the GUI version, put the ":syntax
 | 
			
		||||
enable" command in your |gvimrc| file.
 | 
			
		||||
enable" command in your |ginit.vim| file.
 | 
			
		||||
 | 
			
		||||
==============================================================================
 | 
			
		||||
*06.2*	No or wrong colors?
 | 
			
		||||
@@ -144,14 +144,14 @@ the GUI use the Edit/Color Scheme menu.  You can also type the command: >
 | 
			
		||||
want to try out.  Look in the directory $VIMRUNTIME/colors.
 | 
			
		||||
 | 
			
		||||
When you found the color scheme that you like, add the ":colorscheme" command
 | 
			
		||||
to your |vimrc| file.
 | 
			
		||||
to your |init.vim| file.
 | 
			
		||||
 | 
			
		||||
You could also write your own color scheme.  This is how you do it:
 | 
			
		||||
 | 
			
		||||
1. Select a color scheme that comes close.  Copy this file to your own Vim
 | 
			
		||||
   directory.  For Unix, this should work: >
 | 
			
		||||
 | 
			
		||||
	!mkdir ~/.vim/colors
 | 
			
		||||
	!mkdir -p ~/.config/nvim/colors
 | 
			
		||||
	!cp $VIMRUNTIME/colors/morning.vim ~/.vim/colors/mine.vim
 | 
			
		||||
<
 | 
			
		||||
   This is done from Vim, because it knows the value of $VIMRUNTIME.
 | 
			
		||||
 
 | 
			
		||||
@@ -169,7 +169,7 @@ exiting Vim, there is a slightly more complicated way.  You can see a list of
 | 
			
		||||
files by typing the command: >
 | 
			
		||||
 | 
			
		||||
	:oldfiles
 | 
			
		||||
<	1: ~/.vimrc ~
 | 
			
		||||
<	1: ~/.config/nvim/init.vim ~
 | 
			
		||||
	2: ~/text/resume.txt ~
 | 
			
		||||
	3: /tmp/draft ~
 | 
			
		||||
 | 
			
		||||
@@ -189,7 +189,7 @@ That #<123 thing is a bit complicated when you just want to edit a file.
 | 
			
		||||
Fortunately there is a simpler way: >
 | 
			
		||||
 | 
			
		||||
	:browse oldfiles
 | 
			
		||||
<	1: ~/.vimrc ~
 | 
			
		||||
<	1: ~/.config/nvim/init.vim ~
 | 
			
		||||
	2: ~/text/resume.txt ~
 | 
			
		||||
	3: /tmp/draft ~
 | 
			
		||||
	-- More --
 | 
			
		||||
@@ -276,13 +276,13 @@ example, use: >
 | 
			
		||||
SESSION HERE, SESSION THERE
 | 
			
		||||
 | 
			
		||||
The obvious way to use sessions is when working on different projects.
 | 
			
		||||
Suppose you store your session files in the directory "~/.vim".  You are
 | 
			
		||||
currently working on the "secret" project and have to switch to the "boring"
 | 
			
		||||
project: >
 | 
			
		||||
Suppose you store your session files in the directory "~/.config/nvim".  You 
 | 
			
		||||
are currently working on the "secret" project and have to switch to the 
 | 
			
		||||
"boring" project: >
 | 
			
		||||
 | 
			
		||||
	:wall
 | 
			
		||||
	:mksession! ~/.vim/secret.vim
 | 
			
		||||
	:source ~/.vim/boring.vim
 | 
			
		||||
	:mksession! ~/.config/nvim/secret.vim
 | 
			
		||||
	:source ~/.config/nvim/boring.vim
 | 
			
		||||
 | 
			
		||||
This first uses ":wall" to write all modified files.  Then the current session
 | 
			
		||||
is saved, using ":mksession!".  This overwrites the previous session.  The
 | 
			
		||||
@@ -292,7 +292,7 @@ point.  And finally you load the new "boring" session.
 | 
			
		||||
If you open help windows, split and close various windows, and generally mess
 | 
			
		||||
up the window layout, you can go back to the last saved session: >
 | 
			
		||||
 | 
			
		||||
	:source ~/.vim/boring.vim
 | 
			
		||||
	:source ~/.config/nvim/boring.vim
 | 
			
		||||
 | 
			
		||||
Thus you have complete control over whether you want to continue next time
 | 
			
		||||
where you are now, by saving the current setup in a session, or keep the
 | 
			
		||||
@@ -330,11 +330,11 @@ More about this in the next chapter.
 | 
			
		||||
 | 
			
		||||
You can resize the windows a bit to your liking.  Then save the session with:
 | 
			
		||||
>
 | 
			
		||||
	:mksession ~/.vim/mine.vim
 | 
			
		||||
	:mksession ~/.config/nvim/mine.vim
 | 
			
		||||
 | 
			
		||||
Now you can start Vim with this layout: >
 | 
			
		||||
 | 
			
		||||
	vim -S ~/.vim/mine.vim
 | 
			
		||||
	vim -S ~/.config/nvim/mine.vim
 | 
			
		||||
 | 
			
		||||
Hint: To open a file you see listed in the explorer window in the empty
 | 
			
		||||
window, move the cursor to the filename and press "O".  Double clicking with
 | 
			
		||||
@@ -346,8 +346,8 @@ UNIX AND MS-WINDOWS
 | 
			
		||||
Some people have to do work on MS-Windows systems one day and on Unix another
 | 
			
		||||
day.  If you are one of them, consider adding "slash" and "unix" to
 | 
			
		||||
'sessionoptions'.  The session files will then be written in a format that can
 | 
			
		||||
be used on both systems.  This is the command to put in your vimrc file: >
 | 
			
		||||
 | 
			
		||||
be used on both systems.  This is the command to put in your |init.vim| file:
 | 
			
		||||
>
 | 
			
		||||
	:set sessionoptions+=unix,slash
 | 
			
		||||
 | 
			
		||||
Vim will use the Unix format then, because the MS-Windows Vim can read and
 | 
			
		||||
@@ -368,13 +368,13 @@ another session.
 | 
			
		||||
   You might prefer to keep the info with the session.  You will have to do
 | 
			
		||||
this yourself then.  Example: >
 | 
			
		||||
 | 
			
		||||
	:mksession! ~/.vim/secret.vim
 | 
			
		||||
	:wshada! ~/.vim/secret.shada
 | 
			
		||||
	:mksession! ~/.config/nvim/secret.vim
 | 
			
		||||
	:wshada! ~/.local/share/nvim/shada/secret.shada
 | 
			
		||||
 | 
			
		||||
And to restore this again: >
 | 
			
		||||
 | 
			
		||||
	:source ~/.vim/secret.vim
 | 
			
		||||
	:rshada! ~/.vim/secret.shada
 | 
			
		||||
	:source ~/.config/nvim/secret.vim
 | 
			
		||||
	:rshada! ~/.local/share/nvim/shada/secret.shada
 | 
			
		||||
 | 
			
		||||
==============================================================================
 | 
			
		||||
*21.5*	Views
 | 
			
		||||
@@ -423,11 +423,11 @@ to quickly switch to editing another file, with all its options set as you
 | 
			
		||||
saved them.
 | 
			
		||||
   For example, to save the view of the current file: >
 | 
			
		||||
 | 
			
		||||
	:mkview ~/.vim/main.vim
 | 
			
		||||
	:mkview ~/.config/nvim/main.vim
 | 
			
		||||
 | 
			
		||||
You can restore it with: >
 | 
			
		||||
 | 
			
		||||
	:source ~/.vim/main.vim
 | 
			
		||||
	:source ~/.config/nvim/main.vim
 | 
			
		||||
 | 
			
		||||
==============================================================================
 | 
			
		||||
*21.6*	Modelines
 | 
			
		||||
 
 | 
			
		||||
@@ -324,11 +324,11 @@ the output of this command: >
 | 
			
		||||
Now use the first item, the name before the first comma.  Thus if the output
 | 
			
		||||
looks like this:
 | 
			
		||||
 | 
			
		||||
	runtimepath=~/.vim,/usr/local/share/vim/vim60/runtime,~/.vim/after ~
 | 
			
		||||
	runtimepath=~/.config/nvim,/usr/local/share/vim/vim60/runtime,~/.config/nvim/after ~
 | 
			
		||||
 | 
			
		||||
You use "~/.vim" for {directory}.  Then the resulting file name is:
 | 
			
		||||
You use "~/.config/nvim" for {directory}.  Then the resulting file name is:
 | 
			
		||||
 | 
			
		||||
	~/.vim/indent/help.vim ~
 | 
			
		||||
	~/.config/nvim/indent/help.vim ~
 | 
			
		||||
 | 
			
		||||
Instead of switching the indenting off, you could write your own indent file.
 | 
			
		||||
How to do that is explained here: |indent-expression|.
 | 
			
		||||
 
 | 
			
		||||
@@ -248,7 +248,7 @@ you can set the 'lines' option to set a different window size: >
 | 
			
		||||
You don't want to do this in a terminal, since its size is fixed (except for
 | 
			
		||||
an xterm that supports resizing).
 | 
			
		||||
   The gvimrc file is searched for in the same locations as the vimrc file.
 | 
			
		||||
Normally its name is "~/.gvimrc" for Unix and "$VIM/_gvimrc" for MS-Windows.
 | 
			
		||||
Normally its name is "~/.config/nvim/ginit.vim".
 | 
			
		||||
The $MYGVIMRC environment variable is set to it, thus you can use this command
 | 
			
		||||
to edit the file, if you have one: >
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -478,7 +478,7 @@ for you.  This triggers the Filetype event.  Use this to do something when a
 | 
			
		||||
certain type of file is edited.  For example, to load a list of abbreviations
 | 
			
		||||
for text files: >
 | 
			
		||||
 | 
			
		||||
	:autocmd Filetype text  source ~/.vim/abbrevs.vim
 | 
			
		||||
	:autocmd Filetype text  source ~/.config/nvim/abbrevs.vim
 | 
			
		||||
 | 
			
		||||
When starting to edit a new file, you could make Vim insert a skeleton: >
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -2051,8 +2051,8 @@ Example: >
 | 
			
		||||
 | 
			
		||||
Write this single-line file as "ftdetect/foofoo.vim" in the first directory
 | 
			
		||||
that appears in 'runtimepath'.  For Unix that would be
 | 
			
		||||
"~/.vim/ftdetect/foofoo.vim".  The convention is to use the name of the
 | 
			
		||||
filetype for the script name.
 | 
			
		||||
"~/.config/nvim/ftdetect/foofoo.vim".  The convention is to use the name of 
 | 
			
		||||
the filetype for the script name.
 | 
			
		||||
 | 
			
		||||
You can make more complicated checks if you like, for example to inspect the
 | 
			
		||||
contents of the file to recognize the language.  Also see |new-filetype|.
 | 
			
		||||
@@ -2122,8 +2122,8 @@ you can write the different setting in a script: >
 | 
			
		||||
 | 
			
		||||
Now write this in the "after" directory, so that it gets sourced after the
 | 
			
		||||
distributed "vim.vim" ftplugin |after-directory|.  For Unix this would be
 | 
			
		||||
"~/.vim/after/ftplugin/vim.vim".  Note that the default plugin will have set
 | 
			
		||||
"b:did_ftplugin", but it is ignored here.
 | 
			
		||||
"~/.config/nvim/after/ftplugin/vim.vim".  Note that the default plugin will 
 | 
			
		||||
have set "b:did_ftplugin", but it is ignored here.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
OPTIONS
 | 
			
		||||
@@ -2289,8 +2289,8 @@ a user to overrule or add to the default file.  The default files start with: >
 | 
			
		||||
	:let current_compiler = "mine"
 | 
			
		||||
 | 
			
		||||
When you write a compiler file and put it in your personal runtime directory
 | 
			
		||||
(e.g., ~/.vim/compiler for Unix), you set the "current_compiler" variable to
 | 
			
		||||
make the default file skip the settings.
 | 
			
		||||
(e.g., ~/.config/nvim/compiler for Unix), you set the "current_compiler" 
 | 
			
		||||
variable to make the default file skip the settings.
 | 
			
		||||
							*:CompilerSet*
 | 
			
		||||
The second mechanism is to use ":set" for ":compiler!" and ":setlocal" for
 | 
			
		||||
":compiler".  Vim defines the ":CompilerSet" user command for this.  However,
 | 
			
		||||
@@ -2310,7 +2310,7 @@ runtime directory, use the mechanism mentioned above.  When
 | 
			
		||||
When you write a compiler plugin to overrule settings from a default plugin,
 | 
			
		||||
don't check "current_compiler".  This plugin is supposed to be loaded
 | 
			
		||||
last, thus it should be in a directory at the end of 'runtimepath'.  For Unix
 | 
			
		||||
that could be ~/.vim/after/compiler.
 | 
			
		||||
that could be ~/.config/nvim/after/compiler.
 | 
			
		||||
 | 
			
		||||
==============================================================================
 | 
			
		||||
*41.14*	Writing a plugin that loads quickly	*write-plugin-quickload*
 | 
			
		||||
@@ -2428,7 +2428,7 @@ want to use subdirectories.  Example: >
 | 
			
		||||
 | 
			
		||||
For Unix the library script used for this could be:
 | 
			
		||||
 | 
			
		||||
	~/.vim/autoload/netlib/ftp.vim
 | 
			
		||||
	~/.config/nvim/autoload/netlib/ftp.vim
 | 
			
		||||
 | 
			
		||||
Where the function is defined like this: >
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -311,7 +311,7 @@ with the name "Compile.bmp".  For Unix XPM format is used, the file name is
 | 
			
		||||
"Compile.xpm".  The size must be 18 by 18 pixels.  On MS-Windows other sizes
 | 
			
		||||
can be used as well, but it will look ugly.
 | 
			
		||||
   Put the bitmap in the directory "bitmaps" in one of the directories from
 | 
			
		||||
'runtimepath'.  E.g., for Unix "~/.vim/bitmaps/Compile.xpm".
 | 
			
		||||
'runtimepath'.  E.g., for Unix "~/.config/nvim/bitmaps/Compile.xpm".
 | 
			
		||||
 | 
			
		||||
You can define tooltips for the items in the toolbar.  A tooltip is a short
 | 
			
		||||
text that explains what a toolbar item will do.  For example "Open file".  It
 | 
			
		||||
 
 | 
			
		||||
@@ -27,22 +27,21 @@ want to set the 'softtabstop' option to 4 and define a mapping to insert a
 | 
			
		||||
three-line comment.  You do this with only two steps:
 | 
			
		||||
 | 
			
		||||
							*your-runtime-dir*
 | 
			
		||||
1. Create your own runtime directory.  On Unix this usually is "~/.vim".  In
 | 
			
		||||
   this directory create the "ftplugin" directory: >
 | 
			
		||||
1. Create your own runtime directory.  On Unix this usually is 
 | 
			
		||||
   "~/.config/nvim".  In this directory create the "ftplugin" directory: >
 | 
			
		||||
 | 
			
		||||
	mkdir ~/.vim
 | 
			
		||||
	mkdir ~/.vim/ftplugin
 | 
			
		||||
	mkdir -p ~/.config/nvim/ftplugin
 | 
			
		||||
<
 | 
			
		||||
   When you are not on Unix, check the value of the 'runtimepath' option to
 | 
			
		||||
   see where Vim will look for the "ftplugin" directory: >
 | 
			
		||||
 | 
			
		||||
	set runtimepath
 | 
			
		||||
	set runtimepath?
 | 
			
		||||
 | 
			
		||||
<  You would normally use the first directory name (before the first comma).
 | 
			
		||||
   You might want to prepend a directory name to the 'runtimepath' option in
 | 
			
		||||
   your |vimrc| file if you don't like the default value.
 | 
			
		||||
   your |init.vim| file if you don't like the default value.
 | 
			
		||||
 | 
			
		||||
2. Create the file "~/.vim/ftplugin/c.vim", with the contents: >
 | 
			
		||||
2. Create the file "~/.config/nvim/ftplugin/c.vim", with the contents: >
 | 
			
		||||
 | 
			
		||||
	setlocal softtabstop=4
 | 
			
		||||
	noremap <buffer> <LocalLeader>c o/**************<CR><CR>/<Esc>
 | 
			
		||||
@@ -102,26 +101,26 @@ However, if you now edit a file /usr/share/scripts/README.txt, this is not a
 | 
			
		||||
ruby file.  The danger of a pattern ending in "*" is that it quickly matches
 | 
			
		||||
too many files.  To avoid trouble with this, put the filetype.vim file in
 | 
			
		||||
another directory, one that is at the end of 'runtimepath'.  For Unix for
 | 
			
		||||
example, you could use "~/.vim/after/filetype.vim".
 | 
			
		||||
   You now put the detection of text files in ~/.vim/filetype.vim: >
 | 
			
		||||
example, you could use "~/.config/nvim/after/filetype.vim".
 | 
			
		||||
   You now put the detection of text files in ~/.config/nvim/filetype.vim: >
 | 
			
		||||
 | 
			
		||||
	augroup filetypedetect
 | 
			
		||||
	au BufNewFile,BufRead *.txt			setf text
 | 
			
		||||
	augroup END
 | 
			
		||||
 | 
			
		||||
That file is found in 'runtimepath' first.  Then use this in
 | 
			
		||||
~/.vim/after/filetype.vim, which is found last: >
 | 
			
		||||
~/.config/nvim/after/filetype.vim, which is found last: >
 | 
			
		||||
 | 
			
		||||
	augroup filetypedetect
 | 
			
		||||
	au BufNewFile,BufRead /usr/share/scripts/*	setf ruby
 | 
			
		||||
	augroup END
 | 
			
		||||
 | 
			
		||||
What will happen now is that Vim searches for "filetype.vim" files in each
 | 
			
		||||
directory in 'runtimepath'.  First ~/.vim/filetype.vim is found.  The
 | 
			
		||||
directory in 'runtimepath'.  First ~/.config/nvim/filetype.vim is found.  The
 | 
			
		||||
autocommand to catch *.txt files is defined there.  Then Vim finds the
 | 
			
		||||
filetype.vim file in $VIMRUNTIME, which is halfway 'runtimepath'.  Finally
 | 
			
		||||
~/.vim/after/filetype.vim is found and the autocommand for detecting ruby
 | 
			
		||||
files in /usr/share/scripts is added.
 | 
			
		||||
~/.config/nvim/after/filetype.vim is found and the autocommand for detecting 
 | 
			
		||||
ruby files in /usr/share/scripts is added.
 | 
			
		||||
   When you now edit /usr/share/scripts/README.txt, the autocommands are
 | 
			
		||||
checked in the order in which they were defined.  The *.txt pattern matches,
 | 
			
		||||
thus "setf text" is executed to set the filetype to "text".  The pattern for
 | 
			
		||||
 
 | 
			
		||||
@@ -610,11 +610,11 @@ More about synchronizing in the reference manual: |:syn-sync|.
 | 
			
		||||
*44.11*	Installing a syntax file
 | 
			
		||||
 | 
			
		||||
When your new syntax file is ready to be used, drop it in a "syntax" directory
 | 
			
		||||
in 'runtimepath'.  For Unix that would be "~/.vim/syntax".
 | 
			
		||||
in 'runtimepath'.  For Unix that would be "~/.config/nvim/syntax".
 | 
			
		||||
  The name of the syntax file must be equal to the file type, with ".vim"
 | 
			
		||||
added.  Thus for the x language, the full path of the file would be:
 | 
			
		||||
 | 
			
		||||
	~/.vim/syntax/x.vim ~
 | 
			
		||||
	~/.config/nvim/syntax/x.vim ~
 | 
			
		||||
 | 
			
		||||
You must also make the file type be recognized.  See |43.2|.
 | 
			
		||||
 | 
			
		||||
@@ -640,7 +640,7 @@ Write the file with the same name as the original syntax file.  In this case
 | 
			
		||||
"c.vim".  Place it in a directory near the end of 'runtimepath'.  This makes
 | 
			
		||||
it loaded after the original syntax file.  For Unix this would be:
 | 
			
		||||
 | 
			
		||||
	~/.vim/after/syntax/c.vim ~
 | 
			
		||||
	~/.config/nvim/after/syntax/c.vim ~
 | 
			
		||||
 | 
			
		||||
==============================================================================
 | 
			
		||||
*44.12*	Portable syntax file layout
 | 
			
		||||
 
 | 
			
		||||
@@ -129,7 +129,7 @@ this name, but with all letters made lowercase.  Then copy the file to your
 | 
			
		||||
own runtime directory, as found early in 'runtimepath'.  For example, for Unix
 | 
			
		||||
you would do: >
 | 
			
		||||
 | 
			
		||||
	:!cp $VIMRUNTIME/lang/menu_ko_kr.euckr.vim ~/.vim/lang/menu_nl_be.iso_8859-1.vim
 | 
			
		||||
	:!cp $VIMRUNTIME/lang/menu_ko_kr.euckr.vim ~/.config/nvim/lang/menu_nl_be.iso_8859-1.vim
 | 
			
		||||
 | 
			
		||||
You will find hints for the translation in "$VIMRUNTIME/lang/README.txt".
 | 
			
		||||
 | 
			
		||||
@@ -359,7 +359,7 @@ DO-IT-YOURSELF KEYMAPS
 | 
			
		||||
You can create your own keymap file.  It's not very difficult.  Start with
 | 
			
		||||
a keymap file that is similar to the language you want to use.  Copy it to the
 | 
			
		||||
"keymap" directory in your runtime directory.  For example, for Unix, you
 | 
			
		||||
would use the directory "~/.vim/keymap".
 | 
			
		||||
would use the directory "~/.config/nvim/keymap".
 | 
			
		||||
   The name of the keymap file must look like this:
 | 
			
		||||
 | 
			
		||||
	keymap/{name}.vim ~
 | 
			
		||||
 
 | 
			
		||||
@@ -33,7 +33,7 @@ CTRL-L			Clear and redraw the screen.  The redraw may happen
 | 
			
		||||
							*N<Del>*
 | 
			
		||||
<Del>			When entering a number: Remove the last digit.
 | 
			
		||||
			Note: if you like to use <BS> for this, add this
 | 
			
		||||
			mapping to your .vimrc: >
 | 
			
		||||
			mapping to your vimrc: >
 | 
			
		||||
				:map CTRL-V <BS>   CTRL-V <Del>
 | 
			
		||||
<
 | 
			
		||||
:as[cii]	or					*ga* *:as* *:ascii*
 | 
			
		||||
 
 | 
			
		||||
@@ -21,10 +21,11 @@ these differences.
 | 
			
		||||
==============================================================================
 | 
			
		||||
1. Configuration					    *nvim-configuration*
 | 
			
		||||
 | 
			
		||||
- Use `.nvimrc` instead of `.vimrc` for storing configuration.
 | 
			
		||||
- Use `.nvim` instead of `.vim` to store configuration files.
 | 
			
		||||
- Use `.nvim/shada/main.shada` instead of `.viminfo` for persistent session 
 | 
			
		||||
  information.
 | 
			
		||||
- Use `$XDG_CONFIG_HOME/nvim/init.vim` instead of `.vimrc` for storing 
 | 
			
		||||
  configuration.
 | 
			
		||||
- Use `$XDG_CONFIG_HOME/nvim` instead of `.vim` to store configuration files.
 | 
			
		||||
- Use `$XDG_DATA_HOME/shada/main.shada` instead of `.viminfo` for persistent 
 | 
			
		||||
  session information.
 | 
			
		||||
 | 
			
		||||
==============================================================================
 | 
			
		||||
2. Option defaults					  *nvim-option-defaults*
 | 
			
		||||
 
 | 
			
		||||
@@ -287,8 +287,8 @@ int main(int argc, char **argv)
 | 
			
		||||
   * Set the default values for the options that use Rows and Columns.
 | 
			
		||||
   */
 | 
			
		||||
  win_init_size();
 | 
			
		||||
  /* Set the 'diff' option now, so that it can be checked for in a .vimrc
 | 
			
		||||
   * file.  There is no buffer yet though. */
 | 
			
		||||
  // Set the 'diff' option now, so that it can be checked for in a vimrc
 | 
			
		||||
  // file.  There is no buffer yet though.
 | 
			
		||||
  if (params.diff_mode)
 | 
			
		||||
    diff_win_options(firstwin, FALSE);
 | 
			
		||||
 | 
			
		||||
@@ -345,7 +345,7 @@ int main(int argc, char **argv)
 | 
			
		||||
   */
 | 
			
		||||
  load_plugins();
 | 
			
		||||
 | 
			
		||||
  /* Decide about window layout for diff mode after reading vimrc. */
 | 
			
		||||
  // Decide about window layout for diff mode after reading vimrc.
 | 
			
		||||
  set_window_layout(¶ms);
 | 
			
		||||
 | 
			
		||||
  /*
 | 
			
		||||
@@ -358,10 +358,8 @@ int main(int argc, char **argv)
 | 
			
		||||
    mch_exit(0);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /*
 | 
			
		||||
   * Set a few option defaults after reading .vimrc files:
 | 
			
		||||
   * 'title' and 'icon', Unix: 'shellpipe' and 'shellredir'.
 | 
			
		||||
   */
 | 
			
		||||
  // Set a few option defaults after reading vimrc files:
 | 
			
		||||
  // 'title' and 'icon', Unix: 'shellpipe' and 'shellredir'.
 | 
			
		||||
  set_init_3();
 | 
			
		||||
  TIME_MSG("inits 3");
 | 
			
		||||
 | 
			
		||||
@@ -1551,8 +1549,8 @@ static void create_windows(mparm_T *parmp)
 | 
			
		||||
  if (parmp->window_count == 0)
 | 
			
		||||
    parmp->window_count = GARGCOUNT;
 | 
			
		||||
  if (parmp->window_count > 1) {
 | 
			
		||||
    /* Don't change the windows if there was a command in .vimrc that
 | 
			
		||||
     * already split some windows */
 | 
			
		||||
    // Don't change the windows if there was a command in vimrc that
 | 
			
		||||
    // already split some windows
 | 
			
		||||
    if (parmp->window_layout == 0)
 | 
			
		||||
      parmp->window_layout = WIN_HOR;
 | 
			
		||||
    if (parmp->window_layout == WIN_TABS) {
 | 
			
		||||
@@ -1574,14 +1572,11 @@ static void create_windows(mparm_T *parmp)
 | 
			
		||||
      getout(1);
 | 
			
		||||
    do_modelines(0);                    /* do modelines */
 | 
			
		||||
  } else {
 | 
			
		||||
    /*
 | 
			
		||||
     * Open a buffer for windows that don't have one yet.
 | 
			
		||||
     * Commands in the .vimrc might have loaded a file or split the window.
 | 
			
		||||
     * Watch out for autocommands that delete a window.
 | 
			
		||||
     */
 | 
			
		||||
    /*
 | 
			
		||||
     * Don't execute Win/Buf Enter/Leave autocommands here
 | 
			
		||||
     */
 | 
			
		||||
    // Open a buffer for windows that don't have one yet.
 | 
			
		||||
    // Commands in the vimrc might have loaded a file or split the window.
 | 
			
		||||
    // Watch out for autocommands that delete a window.
 | 
			
		||||
    //
 | 
			
		||||
    // Don't execute Win/Buf Enter/Leave autocommands here
 | 
			
		||||
    ++autocmd_no_enter;
 | 
			
		||||
    ++autocmd_no_leave;
 | 
			
		||||
    dorewind = TRUE;
 | 
			
		||||
@@ -1691,8 +1686,8 @@ static void edit_buffers(mparm_T *parmp)
 | 
			
		||||
    }
 | 
			
		||||
    advance = TRUE;
 | 
			
		||||
 | 
			
		||||
    /* Only open the file if there is no file in this window yet (that can
 | 
			
		||||
     * happen when .vimrc contains ":sall"). */
 | 
			
		||||
    // Only open the file if there is no file in this window yet (that can
 | 
			
		||||
    // happen when vimrc contains ":sall").
 | 
			
		||||
    if (curbuf == firstwin->w_buffer || curbuf->b_ffname == NULL) {
 | 
			
		||||
      curwin->w_arg_idx = arg_idx;
 | 
			
		||||
      /* Edit file from arg list, if there is one.  When "Quit" selected
 | 
			
		||||
@@ -1830,16 +1825,13 @@ static void source_startup_scripts(mparm_T *parmp)
 | 
			
		||||
    (void)do_source((char_u *)SYS_VIMRC_FILE, FALSE, DOSO_NONE);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
    /*
 | 
			
		||||
     * Try to read initialization commands from the following places:
 | 
			
		||||
     * - environment variable VIMINIT
 | 
			
		||||
     * - user vimrc file (~/.vimrc)
 | 
			
		||||
     * - second user vimrc file ($VIM/.vimrc for Dos)
 | 
			
		||||
     * - environment variable EXINIT
 | 
			
		||||
     * - user exrc file (~/.exrc)
 | 
			
		||||
     * - second user exrc file ($VIM/.exrc for Dos)
 | 
			
		||||
     * The first that exists is used, the rest is ignored.
 | 
			
		||||
     */
 | 
			
		||||
    // Try to read initialization commands from the following places:
 | 
			
		||||
    // - environment variable VIMINIT
 | 
			
		||||
    // - user vimrc file (~/.config/nvim/init.vim)
 | 
			
		||||
    // - environment variable EXINIT
 | 
			
		||||
    // - user exrc file (~/.exrc)
 | 
			
		||||
    // - second user exrc file ($VIM/.exrc for Dos)
 | 
			
		||||
    // The first that exists is used, the rest is ignored.
 | 
			
		||||
    char_u *user_vimrc = (char_u *)stdpaths_user_conf_subpath("init.vim");
 | 
			
		||||
    if (process_env("VIMINIT", true) != OK) {
 | 
			
		||||
      if (do_source(user_vimrc, true, DOSO_VIMRC) == FAIL
 | 
			
		||||
@@ -1856,13 +1848,13 @@ static void source_startup_scripts(mparm_T *parmp)
 | 
			
		||||
     * directory.  This is only done if the 'exrc' option is set.
 | 
			
		||||
     * Because of security reasons we disallow shell and write commands
 | 
			
		||||
     * now, except for unix if the file is owned by the user or 'secure'
 | 
			
		||||
     * option has been reset in environment of global ".exrc" or ".vimrc".
 | 
			
		||||
     * option has been reset in environment of global "exrc" or "vimrc".
 | 
			
		||||
     * Only do this if VIMRC_FILE is not the same as USR_VIMRC_FILE or
 | 
			
		||||
     * SYS_VIMRC_FILE.
 | 
			
		||||
     */
 | 
			
		||||
    if (p_exrc) {
 | 
			
		||||
#if defined(UNIX)
 | 
			
		||||
      /* If ".vimrc" file is not owned by user, set 'secure' mode. */
 | 
			
		||||
      // If vimrc file is not owned by user, set 'secure' mode.
 | 
			
		||||
      if (!file_owned(VIMRC_FILE))
 | 
			
		||||
#endif
 | 
			
		||||
        secure = p_secure;
 | 
			
		||||
 
 | 
			
		||||
@@ -6116,7 +6116,7 @@ static void paste_option_changed(void)
 | 
			
		||||
  old_p_paste = p_paste;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/// vimrc_found() - Called when a ".vimrc" or "VIMINIT" has been found.
 | 
			
		||||
/// vimrc_found() - Called when a vimrc or "VIMINIT" has been found.
 | 
			
		||||
///
 | 
			
		||||
/// Set the values for options that didn't get set yet to the Vim defaults.
 | 
			
		||||
/// When "fname" is not NULL, use it to set $"envname" when it wasn't set yet.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user