documentation: Update documentation

This commit is contained in:
ZyX
2015-07-05 14:08:50 +03:00
parent 98e8c1f37c
commit b7ebd16af0
15 changed files with 182 additions and 173 deletions

View File

@@ -265,8 +265,8 @@ Name triggered by ~
|TermResponse| after the terminal response to |t_RV| is received |TermResponse| after the terminal response to |t_RV| is received
|QuitPre| when using `:quit`, before deciding whether to quit |QuitPre| when using `:quit`, before deciding whether to quit
|VimLeavePre| before exiting Vim, before writing the viminfo file |VimLeavePre| before exiting Vim, before writing the shada file
|VimLeave| before exiting Vim, after writing the viminfo file |VimLeave| before exiting Vim, after writing the shada file
Various Various
|FileChangedShell| Vim notices that a file changed since editing started |FileChangedShell| Vim notices that a file changed since editing started
@@ -912,14 +912,14 @@ VimEnter After doing all the startup stuff, including
the buffers in them. the buffers in them.
*VimLeave* *VimLeave*
VimLeave Before exiting Vim, just after writing the VimLeave Before exiting Vim, just after writing the
.viminfo file. Executed only once, like .shada file. Executed only once, like
VimLeavePre. VimLeavePre.
To detect an abnormal exit use |v:dying|. To detect an abnormal exit use |v:dying|.
When v:dying is 2 or more this event is not When v:dying is 2 or more this event is not
triggered. triggered.
*VimLeavePre* *VimLeavePre*
VimLeavePre Before exiting Vim, just before writing the VimLeavePre Before exiting Vim, just before writing the
.viminfo file. This is executed only once, .shada file. This is executed only once,
if there is a match with the name of what if there is a match with the name of what
happens to be the current buffer when exiting. happens to be the current buffer when exiting.
Mostly useful with a "*" pattern. > Mostly useful with a "*" pattern. >

View File

@@ -729,7 +729,7 @@ function expand() |expand()|.
#<n (where n is a number > 0) is replaced with old *:_#<* *c_#<* #<n (where n is a number > 0) is replaced with old *:_#<* *c_#<*
file name n. See |:oldfiles| or |v:oldfiles| to get the file name n. See |:oldfiles| or |v:oldfiles| to get the
number. *E809* number. *E809*
{only when compiled with the |+eval| and |+viminfo| features} {only when compiled with the |+eval| and |+shada| features}
Note that these, except "#<n", give the file name as it was typed. If an Note that these, except "#<n", give the file name as it was typed. If an
absolute path is needed (when using the file name from a different directory), absolute path is needed (when using the file name from a different directory),

View File

@@ -559,7 +559,7 @@ function.
When the '!' flag is included in the 'viminfo' option, global variables that When the '!' flag is included in the 'viminfo' option, global variables that
start with an uppercase letter, and don't contain a lowercase letter, are start with an uppercase letter, and don't contain a lowercase letter, are
stored in the viminfo file |viminfo-file|. stored in the shada file |shada-file|.
When the 'sessionoptions' option contains "global", global variables that When the 'sessionoptions' option contains "global", global variables that
start with an uppercase letter and contain at least one lowercase letter are start with an uppercase letter and contain at least one lowercase letter are
@@ -568,7 +568,7 @@ stored in the session file |session-file|.
variable name can be stored where ~ variable name can be stored where ~
my_var_6 not my_var_6 not
My_Var_6 session file My_Var_6 session file
MY_VAR_6 viminfo file MY_VAR_6 shada file
It's possible to form a variable name with curly braces, see It's possible to form a variable name with curly braces, see
@@ -1524,16 +1524,16 @@ v:msgpack_types Dictionary containing msgpack types used by |msgpackparse()|
of msgpack types, use |is| operator. of msgpack types, use |is| operator.
*v:oldfiles* *oldfiles-variable* *v:oldfiles* *oldfiles-variable*
v:oldfiles List of file names that is loaded from the |viminfo| file on v:oldfiles List of file names that is loaded from the |shada| file on
startup. These are the files that Vim remembers marks for. startup. These are the files that Vim remembers marks for.
The length of the List is limited by the ' argument of the The length of the List is limited by the ' argument of the
'viminfo' option (default is 100). 'viminfo' option (default is 100).
When the |viminfo| file is not used the List is empty. When the |shada| file is not used the List is empty.
Also see |:oldfiles| and |c_#<|. Also see |:oldfiles| and |c_#<|.
The List can be modified, but this has no effect on what is The List can be modified, but this has no effect on what is
stored in the |viminfo| file later. If you use values other stored in the |shada| file later. If you use values other
than String this will cause trouble. than String this will cause trouble.
{only when compiled with the |+viminfo| feature} {only when compiled with the |+shada| feature}
*v:operator* *operator-variable* *v:operator* *operator-variable*
v:operator The last operator given in Normal mode. This is a single v:operator The last operator given in Normal mode. This is a single
@@ -6936,6 +6936,7 @@ quickfix Compiled with |quickfix| support.
reltime Compiled with |reltime()| support. reltime Compiled with |reltime()| support.
rightleft Compiled with 'rightleft' support. rightleft Compiled with 'rightleft' support.
scrollbind Compiled with 'scrollbind' support. scrollbind Compiled with 'scrollbind' support.
shada Compiled with shada support.
showcmd Compiled with 'showcmd' support. showcmd Compiled with 'showcmd' support.
signs Compiled with |:sign| support. signs Compiled with |:sign| support.
smartindent Compiled with 'smartindent' support. smartindent Compiled with 'smartindent' support.
@@ -6964,7 +6965,6 @@ unix Unix version of Vim.
user_commands User-defined commands. user_commands User-defined commands.
vertsplit Compiled with vertically split windows |:vsplit|. vertsplit Compiled with vertically split windows |:vsplit|.
vim_starting True while initial source'ing takes place. |startup| vim_starting True while initial source'ing takes place. |startup|
viminfo Compiled with viminfo support.
virtualedit Compiled with 'virtualedit' option. virtualedit Compiled with 'virtualedit' option.
visual Compiled with Visual mode. visual Compiled with Visual mode.
visualextra Compiled with extra Visual mode commands. visualextra Compiled with extra Visual mode commands.

View File

@@ -1359,7 +1359,7 @@ tag command action ~
|:number| :nu[mber] print lines with line number |:number| :nu[mber] print lines with line number
|:nunmap| :nun[map] like ":unmap" but for Normal mode |:nunmap| :nun[map] like ":unmap" but for Normal mode
|:nunmenu| :nunme[nu] remove menu for Normal mode |:nunmenu| :nunme[nu] remove menu for Normal mode
|:oldfiles| :ol[dfiles] list files that have marks in the viminfo file |:oldfiles| :ol[dfiles] list files that have marks in the ShaDa file
|:open| :o[pen] start open mode (not implemented) |:open| :o[pen] start open mode (not implemented)
|:omap| :om[ap] like ":map" but for Operator-pending mode |:omap| :om[ap] like ":map" but for Operator-pending mode
|:omapclear| :omapc[lear] remove all mappings for Operator-pending mode |:omapclear| :omapc[lear] remove all mappings for Operator-pending mode
@@ -1420,7 +1420,7 @@ tag command action ~
|:rightbelow| :rightb[elow] make split window appear right or below |:rightbelow| :rightb[elow] make split window appear right or below
|:rundo| :rund[o] read undo information from a file |:rundo| :rund[o] read undo information from a file
|:runtime| :ru[ntime] source vim scripts in 'runtimepath' |:runtime| :ru[ntime] source vim scripts in 'runtimepath'
|:rviminfo| :rv[iminfo] read from viminfo file |:rviminfo| :rv[iminfo] read from ShaDa file
|:substitute| :s[ubstitute] find and replace text |:substitute| :s[ubstitute] find and replace text
|:sNext| :sN[ext] split window and go to previous file in |:sNext| :sN[ext] split window and go to previous file in
argument list argument list
@@ -1580,7 +1580,7 @@ tag command action ~
|:wq| :wq write to a file and quit window or Vim |:wq| :wq write to a file and quit window or Vim
|:wqall| :wqa[ll] write all changed buffers and quit Vim |:wqall| :wqa[ll] write all changed buffers and quit Vim
|:wundo| :wu[ndo] write undo information to a file |:wundo| :wu[ndo] write undo information to a file
|:wviminfo| :wv[iminfo] write to viminfo file |:wviminfo| :wv[iminfo] write to ShaDa file
|:xit| :x[it] write if buffer changed and quit window or Vim |:xit| :x[it] write if buffer changed and quit window or Vim
|:xall| :xa[ll] same as ":wqall" |:xall| :xa[ll] same as ":wqall"
|:xmapclear| :xmapc[lear] remove all mappings for Visual mode |:xmapclear| :xmapc[lear] remove all mappings for Visual mode

View File

@@ -387,7 +387,7 @@ Vim will automatically convert from one to another encoding in several places:
'encoding' (requires a gettext version that supports this). 'encoding' (requires a gettext version that supports this).
- When reading a Vim script where |:scriptencoding| is different from - When reading a Vim script where |:scriptencoding| is different from
'encoding'. 'encoding'.
- When reading or writing a |viminfo| file. - When reading or writing a |shada| file.
Most of these require the |+iconv| feature. Conversion for reading and Most of these require the |+iconv| feature. Conversion for reading and
writing files may also be specified with the 'charconvert' option. writing files may also be specified with the 'charconvert' option.

View File

@@ -805,7 +805,7 @@ unrelated.
'a - 'z lowercase marks, valid within one file 'a - 'z lowercase marks, valid within one file
'A - 'Z uppercase marks, also called file marks, valid between files 'A - 'Z uppercase marks, also called file marks, valid between files
'0 - '9 numbered marks, set from .viminfo file '0 - '9 numbered marks, set from .shada file
Lowercase marks 'a to 'z are remembered as long as the file remains in the Lowercase marks 'a to 'z are remembered as long as the file remains in the
buffer list. If you remove the file from the buffer list, all its marks are buffer list. If you remove the file from the buffer list, all its marks are
@@ -821,13 +821,13 @@ You can use them to jump from file to file. You can only use an uppercase
mark with an operator if the mark is in the current file. The line number of mark with an operator if the mark is in the current file. The line number of
the mark remains correct, even if you insert/delete lines or edit another file the mark remains correct, even if you insert/delete lines or edit another file
for a moment. When the 'viminfo' option is not empty, uppercase marks are for a moment. When the 'viminfo' option is not empty, uppercase marks are
kept in the .viminfo file. See |viminfo-file-marks|. kept in the .shada file. See |shada-file-marks|.
Numbered marks '0 to '9 are quite different. They can not be set directly. Numbered marks '0 to '9 are quite different. They can not be set directly.
They are only present when using a viminfo file |viminfo-file|. Basically '0 They are only present when using a shada file |shada-file|. Basically '0
is the location of the cursor when you last exited Vim, '1 the last but one is the location of the cursor when you last exited Vim, '1 the last but one
time, etc. Use the "r" flag in 'viminfo' to specify files for which no time, etc. Use the "r" flag in 'viminfo' to specify files for which no
Numbered mark should be stored. See |viminfo-file-marks|. Numbered mark should be stored. See |shada-file-marks|.
*'[* *`[* *'[* *`[*
@@ -1075,7 +1075,7 @@ if you stop editing a file without writing, like with ":n!".
When you split a window, the jumplist will be copied to the new window. When you split a window, the jumplist will be copied to the new window.
If you have included the ' item in the 'viminfo' option the jumplist will be If you have included the ' item in the 'viminfo' option the jumplist will be
stored in the viminfo file and restored when starting Vim. stored in the shada file and restored when starting Vim.
CHANGE LIST JUMPS *changelist* *change-list-jumps* *E664* CHANGE LIST JUMPS *changelist* *change-list-jumps* *E664*

View File

@@ -1292,8 +1292,8 @@ A jump table for the options with a short description can be found at |Q_op|.
used. used.
Conversion between "latin1", "unicode", "ucs-2", "ucs-4" and "utf-8" Conversion between "latin1", "unicode", "ucs-2", "ucs-4" and "utf-8"
is done internally by Vim, 'charconvert' is not used for this. is done internally by Vim, 'charconvert' is not used for this.
'charconvert' is also used to convert the viminfo file, if the 'c' 'charconvert' is also used to convert the shada file, if 'encoding' is
flag is present in 'viminfo'. Also used for Unicode conversion. not "utf-8". Also used for Unicode conversion.
Example: > Example: >
set charconvert=CharConvert() set charconvert=CharConvert()
fun CharConvert() fun CharConvert()
@@ -2165,7 +2165,7 @@ A jump table for the options with a short description can be found at |Q_op|.
feature} feature}
Sets the character encoding used inside Vim. It applies to text in Sets the character encoding used inside Vim. It applies to text in
the buffers, registers, Strings in expressions, text stored in the the buffers, registers, Strings in expressions, text stored in the
viminfo file, etc. It sets the kind of characters which Vim can work shada file, etc. It sets the kind of characters which Vim can work
with. See |encoding-names| for the possible values. with. See |encoding-names| for the possible values.
'encoding' cannot be changed after startup, because (1) it causes 'encoding' cannot be changed after startup, because (1) it causes
@@ -2197,7 +2197,7 @@ A jump table for the options with a short description can be found at |Q_op|.
When "unicode", "ucs-2" or "ucs-4" is used, Vim internally uses utf-8. When "unicode", "ucs-2" or "ucs-4" is used, Vim internally uses utf-8.
You don't notice this while editing, but it does matter for the You don't notice this while editing, but it does matter for the
|viminfo-file|. And Vim expects the terminal to use utf-8 too. Thus |shada-file|. And Vim expects the terminal to use utf-8 too. Thus
setting 'encoding' to one of these values instead of utf-8 only has setting 'encoding' to one of these values instead of utf-8 only has
effect for encoding used for files when 'fileencoding' is empty. effect for encoding used for files when 'fileencoding' is empty.
@@ -3409,7 +3409,7 @@ A jump table for the options with a short description can be found at |Q_op|.
line below a closed fold. A match in a previous line which is not line below a closed fold. A match in a previous line which is not
drawn may not continue in a newly drawn line. drawn may not continue in a newly drawn line.
You can specify whether the highlight status is restored on startup You can specify whether the highlight status is restored on startup
with the 'h' flag in 'viminfo' |viminfo-h|. with the 'h' flag in 'viminfo' |shada-h|.
*'history'* *'hi'* *'history'* *'hi'*
'history' 'hi' number (Vim default: 10000, Vi default: 0) 'history' 'hi' number (Vim default: 10000, Vi default: 0)
@@ -3795,7 +3795,8 @@ A jump table for the options with a short description can be found at |Q_op|.
option. option.
Careful: If you change this option, it might break expanding Careful: If you change this option, it might break expanding
environment variables. E.g., when '/' is included and Vim tries to environment variables. E.g., when '/' is included and Vim tries to
expand "$HOME/.viminfo". Maybe you should change 'iskeyword' instead. expand "$HOME/.nvim/shada/main.shada". Maybe you should change
'iskeyword' instead.
*'iskeyword'* *'isk'* *'iskeyword'* *'isk'*
'iskeyword' 'isk' string (Vim default for 'iskeyword' 'isk' string (Vim default for
@@ -6622,7 +6623,7 @@ A jump table for the options with a short description can be found at |Q_op|.
global global
When bigger than zero, Vim will give messages about what it is doing. When bigger than zero, Vim will give messages about what it is doing.
Currently, these messages are given: Currently, these messages are given:
>= 1 When the viminfo file is read or written. >= 1 When the shada file is read or written.
>= 2 When a file is ":source"'ed. >= 2 When a file is ":source"'ed.
>= 5 Every searched tags file and include file. >= 5 Every searched tags file and include file.
>= 8 Files for which a group of autocommands is executed. >= 8 Files for which a group of autocommands is executed.
@@ -6688,10 +6689,10 @@ A jump table for the options with a short description can be found at |Q_op|.
others: '!,100,<50,s10,h others: '!,100,<50,s10,h
Vi default: "") Vi default: "")
global global
{not available when compiled without the |+viminfo| {not available when compiled without the |+shada|
feature} feature}
When non-empty, the viminfo file is read upon startup and written When non-empty, the shada file is read upon startup and written
when exiting Vim (see |viminfo-file|). The string should be a comma when exiting Vim (see |shada-file|). The string should be a comma
separated list of parameters, each consisting of a single character separated list of parameters, each consisting of a single character
identifying the particular parameter, followed by a number or string identifying the particular parameter, followed by a number or string
which specifies the value of that parameter. If a particular which specifies the value of that parameter. If a particular
@@ -6699,69 +6700,69 @@ A jump table for the options with a short description can be found at |Q_op|.
parameter. The following is a list of the identifying characters and parameter. The following is a list of the identifying characters and
the effect of their value. the effect of their value.
CHAR VALUE ~ CHAR VALUE ~
*viminfo-!* *shada-!*
! When included, save and restore global variables that start ! When included, save and restore global variables that start
with an uppercase letter, and don't contain a lowercase with an uppercase letter, and don't contain a lowercase
letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis" letter. Thus "KEEPTHIS and "K_L_M" are stored, but "KeepThis"
and "_K_L_M" are not. Nested List and Dict items may not be and "_K_L_M" are not. Nested List and Dict items may not be
read back correctly, you end up with an empty item. read back correctly, you end up with an empty item.
*viminfo-quote* *shada-quote*
" Maximum number of lines saved for each register. Old name of " Maximum number of lines saved for each register. Old name of
the '<' item, with the disadvantage that you need to put a the '<' item, with the disadvantage that you need to put a
backslash before the ", otherwise it will be recognized as the backslash before the ", otherwise it will be recognized as the
start of a comment! start of a comment!
*viminfo-%* *shada-%*
% When included, save and restore the buffer list. If Vim is % When included, save and restore the buffer list. If Vim is
started with a file name argument, the buffer list is not started with a file name argument, the buffer list is not
restored. If Vim is started without a file name argument, the restored. If Vim is started without a file name argument, the
buffer list is restored from the viminfo file. Buffers buffer list is restored from the shada file. Buffers
without a file name and buffers for help files are not written without a file name and buffers for help files are not written
to the viminfo file. to the shada file.
When followed by a number, the number specifies the maximum When followed by a number, the number specifies the maximum
number of buffers that are stored. Without a number all number of buffers that are stored. Without a number all
buffers are stored. buffers are stored.
*viminfo-'* *shada-'*
' Maximum number of previously edited files for which the marks ' Maximum number of previously edited files for which the marks
are remembered. This parameter must always be included when are remembered. This parameter must always be included when
'viminfo' is non-empty. 'viminfo' is non-empty.
Including this item also means that the |jumplist| and the Including this item also means that the |jumplist| and the
|changelist| are stored in the viminfo file. |changelist| are stored in the shada file.
*viminfo-/* *shada-/*
/ Maximum number of items in the search pattern history to be / Maximum number of items in the search pattern history to be
saved. If non-zero, then the previous search and substitute saved. If non-zero, then the previous search and substitute
patterns are also saved. When not included, the value of patterns are also saved. When not included, the value of
'history' is used. 'history' is used.
*viminfo-:* *shada-:*
: Maximum number of items in the command-line history to be : Maximum number of items in the command-line history to be
saved. When not included, the value of 'history' is used. saved. When not included, the value of 'history' is used.
*viminfo-<* *shada-<*
< Maximum number of lines saved for each register. If zero then < Maximum number of lines saved for each register. If zero then
registers are not saved. When not included, all lines are registers are not saved. When not included, all lines are
saved. '"' is the old name for this item. saved. '"' is the old name for this item.
Also see the 's' item below: limit specified in Kbyte. Also see the 's' item below: limit specified in Kbyte.
*viminfo-@* *shada-@*
@ Maximum number of items in the input-line history to be @ Maximum number of items in the input-line history to be
saved. When not included, the value of 'history' is used. saved. When not included, the value of 'history' is used.
*viminfo-c* *shada-c*
c When included, convert the text in the viminfo file from the c Dumb option, kept for compatibility reasons. Has no actual
'encoding' used when writing the file to the current effect. Current encoding state is described in
'encoding'. See |viminfo-encoding|. |shada-encoding|.
*viminfo-f* *shada-f*
f Whether file marks need to be stored. If zero, file marks ('0 f Whether file marks need to be stored. If zero, file marks ('0
to '9, 'A to 'Z) are not stored. When not present or when to '9, 'A to 'Z) are not stored. When not present or when
non-zero, they are all stored. '0 is used for the current non-zero, they are all stored. '0 is used for the current
cursor position (when exiting or when doing ":wviminfo"). cursor position (when exiting or when doing ":wviminfo").
*viminfo-h* *shada-h*
h Disable the effect of 'hlsearch' when loading the viminfo h Disable the effect of 'hlsearch' when loading the shada
file. When not included, it depends on whether ":nohlsearch" file. When not included, it depends on whether ":nohlsearch"
has been used since the last search command. has been used since the last search command.
*viminfo-n* *shada-n*
n Name of the viminfo file. The name must immediately follow n Name of the shada file. The name must immediately follow
the 'n'. Must be the last one! If the "-i" argument was the 'n'. Must be the last one! If the "-i" argument was
given when starting Vim, that file name overrides the one given when starting Vim, that file name overrides the one
given here with 'viminfo'. Environment variables are expanded given here with 'viminfo'. Environment variables are expanded
when opening the file, not when setting the option. when opening the file, not when setting the option.
*viminfo-r* *shada-r*
r Removable media. The argument is a string (up to the next r Removable media. The argument is a string (up to the next
','). This parameter can be given several times. Each ','). This parameter can be given several times. Each
specifies the start of a path for which no marks will be specifies the start of a path for which no marks will be
@@ -6769,7 +6770,7 @@ A jump table for the options with a short description can be found at |Q_op|.
could use "ra:,rb:". You can also use it for temp files, could use "ra:,rb:". You can also use it for temp files,
e.g., for Unix: "r/tmp". Case is ignored. Maximum length of e.g., for Unix: "r/tmp". Case is ignored. Maximum length of
each 'r' argument is 50 characters. each 'r' argument is 50 characters.
*viminfo-s* *shada-s*
s Maximum size of an item contents in KiB. If zero then nothing s Maximum size of an item contents in KiB. If zero then nothing
is saved. Unlike Vim this applies to all items, except for is saved. Unlike Vim this applies to all items, except for
the buffer list and header. Full item size is off by three the buffer list and header. Full item size is off by three
@@ -6780,7 +6781,7 @@ A jump table for the options with a short description can be found at |Q_op|.
contents size) = 10253 bytes. contents size) = 10253 bytes.
Example: > Example: >
:set viminfo='50,<1000,s100,:0,n~/vim/viminfo :set viminfo='50,<1000,s100,:0,n~/nvim/shada
< <
'50 Marks will be remembered for the last 50 files you '50 Marks will be remembered for the last 50 files you
edited. edited.
@@ -6789,7 +6790,7 @@ A jump table for the options with a short description can be found at |Q_op|.
s100 Items with contents occupying more then 100 KiB are s100 Items with contents occupying more then 100 KiB are
skipped. skipped.
:0 Command-line history will not be saved. :0 Command-line history will not be saved.
n~/vim/viminfo The name of the file to use is "~/vim/viminfo". n~/nvim/shada The name of the file to use is "~/nvim/shada".
no / Since '/' is not specified, the default will be used, no / Since '/' is not specified, the default will be used,
that is, save all of the search history, and also the that is, save all of the search history, and also the
previous search and substitute patterns. previous search and substitute patterns.

View File

@@ -911,7 +911,7 @@ Short explanation of each option: *option-list*
'verbosefile' 'vfile' file to write messages in 'verbosefile' 'vfile' file to write messages in
'viewdir' 'vdir' directory where to store files with :mkview 'viewdir' 'vdir' directory where to store files with :mkview
'viewoptions' 'vop' specifies what to save for :mkview 'viewoptions' 'vop' specifies what to save for :mkview
'viminfo' 'vi' use .viminfo file upon startup and exiting 'viminfo' 'vi' use .shada file upon startup and exiting
'virtualedit' 've' when to use virtual editing 'virtualedit' 've' when to use virtual editing
'visualbell' 'vb' use visual bell instead of beeping 'visualbell' 'vb' use visual bell instead of beeping
'warn' warn for shell command when buffer was changed 'warn' warn for shell command when buffer was changed
@@ -1131,7 +1131,7 @@ Context-sensitive completion on the command-line:
|-w| -w {scriptout} write typed chars to file {scriptout} (append) |-w| -w {scriptout} write typed chars to file {scriptout} (append)
|-W| -W {scriptout} write typed chars to file {scriptout} (overwrite) |-W| -W {scriptout} write typed chars to file {scriptout} (overwrite)
|-u| -u {vimrc} read inits from {vimrc} instead of other inits |-u| -u {vimrc} read inits from {vimrc} instead of other inits
|-i| -i {viminfo} read info from {viminfo} instead of other files |-i| -i {shada} read info from {shada} instead of other files
|---| -- end of options, other arguments are file names |---| -- end of options, other arguments are file names
|--help| --help show list of arguments and exit |--help| --help show list of arguments and exit
|--version| --version show version info and exit |--version| --version show version info and exit
@@ -1215,12 +1215,12 @@ Context-sensitive completion on the command-line:
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*Q_ac* Automatic Commands *Q_ac* Automatic Commands
|viminfo-file| read registers, marks, history at startup, save when exiting. |shada-file| read registers, marks, history at startup, save when exiting.
|:rviminfo| :rv[iminfo] [file] read info from viminfo file [file] |:rviminfo| :rv[iminfo] [file] read info from ShaDa file [file]
|:rviminfo| :rv[iminfo]! [file] idem, overwrite existing info |:rviminfo| :rv[iminfo]! [file] idem, overwrite existing info
|:wviminfo| :wv[iminfo] [file] add info to viminfo file [file] |:wviminfo| :wv[iminfo] [file] add info to ShaDa file [file]
|:wviminfo| :wv[iminfo]! [file] write info to viminfo file [file] |:wviminfo| :wv[iminfo]! [file] write info to ShaDa file [file]
|modeline| Automatic option setting when editing a file |modeline| Automatic option setting when editing a file

View File

@@ -12,7 +12,7 @@ Starting Vim *starting*
4. Suspending |suspend| 4. Suspending |suspend|
5. Saving settings |save-settings| 5. Saving settings |save-settings|
6. Views and Sessions |views-sessions| 6. Views and Sessions |views-sessions|
7. The viminfo file |viminfo-file| 7. The ShaDa file |shada-file|
============================================================================== ==============================================================================
1. Vim arguments *vim-arguments* 1. Vim arguments *vim-arguments*
@@ -128,7 +128,7 @@ argument.
"pat" in the first file being edited (see |pattern| for the "pat" in the first file being edited (see |pattern| for the
available search patterns). The search starts at the cursor available search patterns). The search starts at the cursor
position, which can be the first line or the cursor position position, which can be the first line or the cursor position
last used from |viminfo|. To force a search from the first last used from |shada|. To force a search from the first
line use "+1 +/pat". line use "+1 +/pat".
+{command} *-+c* *-c* +{command} *-+c* *-c*
@@ -251,7 +251,7 @@ argument.
*-V* *verbose* *-V* *verbose*
-V[N] Verbose. Sets the 'verbose' option to [N] (default: 10). -V[N] Verbose. Sets the 'verbose' option to [N] (default: 10).
Messages will be given for each file that is ":source"d and Messages will be given for each file that is ":source"d and
for reading or writing a viminfo file. Can be used to find for reading or writing a ShaDa file. Can be used to find
out what is happening upon startup and exit. out what is happening upon startup and exit.
Example: > Example: >
vim -V8 foobar vim -V8 foobar
@@ -322,10 +322,10 @@ argument.
same effect as "NONE", but loading plugins is not skipped. same effect as "NONE", but loading plugins is not skipped.
*-i* *-i*
-i {viminfo} The file "viminfo" is used instead of the default viminfo -i {shada} The file {shada} is used instead of the default ShaDa
file. If the name "NONE" is used (all uppercase), no viminfo file. If the name "NONE" is used (all uppercase), no ShaDa
file is read or written, even if 'viminfo' is set or when file is read or written, even if 'viminfo' is set or when
":rv" or ":wv" are used. See also |viminfo-file|. ":rv" or ":wv" are used. See also |shada-file|.
*-s* *-s*
-s {scriptin} The script file "scriptin" is read. The characters in the -s {scriptin} The script file "scriptin" is read. The characters in the
@@ -475,9 +475,9 @@ accordingly. Vim proceeds in this order:
Only when starting "gvim", the GUI initializations will be done. See Only when starting "gvim", the GUI initializations will be done. See
|gui-init|. |gui-init|.
9. Read the viminfo file 9. Read the ShaDa file
If the 'viminfo' option is not empty, the viminfo file is read. See If the 'viminfo' option is not empty, the viminfo file is read. See
|viminfo-file|. |shada-file|.
10. Read the quickfix file 10. Read the quickfix file
If the "-q" flag was given to Vim, the quickfix file is read. If this If the "-q" flag was given to Vim, the quickfix file is read. If this
@@ -564,10 +564,10 @@ just like executing a command from a vimrc/exrc in the current directory.
If Vim takes a long time to start up, use the |--startuptime| argument to find If Vim takes a long time to start up, use the |--startuptime| argument to find
out what happens. out what happens.
If you have "viminfo" enabled, the loading of the viminfo file may take a If you have "viminfo" enabled, the loading of the ShaDa file may take a
while. You can find out if this is the problem by disabling viminfo for a while. You can find out if this is the problem by disabling viminfo for a
moment (use the Vim argument "-i NONE", |-i|). Try reducing the number of moment (use the Vim argument "-i NONE", |-i|). Try reducing the number of
lines stored in a register with ":set viminfo='20,<50,s10". |viminfo-file|. lines stored in a register with ":set viminfo='20,<50,s10". |shada-file|.
*:intro* *:intro*
When Vim starts without a file name, an introductory message is displayed (for When Vim starts without a file name, an introductory message is displayed (for
@@ -768,8 +768,8 @@ save a Session and when you restore it later the window layout looks the same.
You can use a Session to quickly switch between different projects, You can use a Session to quickly switch between different projects,
automatically loading the files you were last working on in that project. automatically loading the files you were last working on in that project.
Views and Sessions are a nice addition to viminfo-files, which are used to Views and Sessions are a nice addition to ShaDa files, which are used to
remember information for all Views and Sessions together |viminfo-file|. remember information for all Views and Sessions together |shada-file|.
You can quickly start editing with a previously saved View or Session with the You can quickly start editing with a previously saved View or Session with the
|-S| argument: > |-S| argument: >
@@ -865,7 +865,7 @@ The output of ":mkview" contains these items:
Note that Views and Sessions are not perfect: Note that Views and Sessions are not perfect:
- They don't restore everything. For example, defined functions, autocommands - They don't restore everything. For example, defined functions, autocommands
and ":syntax on" are not included. Things like register contents and and ":syntax on" are not included. Things like register contents and
command line history are in viminfo, not in Sessions or Views. command line history are in ShaDa, not in Sessions or Views.
- Global option values are only set when they differ from the default value. - Global option values are only set when they differ from the default value.
When the current value is not the default value, loading a Session will not When the current value is not the default value, loading a Session will not
set it back to the default value. Local options will be set back to the set it back to the default value. Local options will be set back to the
@@ -896,15 +896,15 @@ To automatically save and restore views for *.c files: >
au BufWinEnter *.c silent loadview au BufWinEnter *.c silent loadview
============================================================================== ==============================================================================
8. The viminfo file *viminfo* *viminfo-file* *E136* 8. The ShaDa file *shada* *shada-file* *E136*
*E575* *E576* *E577* *E575* *E576* *E577*
If you exit Vim and later start it again, you would normally lose a lot of If you exit Vim and later start it again, you would normally lose a lot of
information. The viminfo file can be used to remember that information, which information. The ShaDa file can be used to remember that information, which
enables you to continue where you left off. enables you to continue where you left off.
This is introduced in section |21.3| of the user manual. This is introduced in section |21.3| of the user manual.
The viminfo file is used to store: The ShaDa file is used to store:
- The command line history. - The command line history.
- The search string history. - The search string history.
- The input-line history. - The input-line history.
@@ -915,46 +915,43 @@ The viminfo file is used to store:
- The buffer list. - The buffer list.
- Global variables. - Global variables.
The viminfo file is not supported when the |+viminfo| feature has been You could also use a Session file. The difference is that the ShaDa file
disabled at compile time.
You could also use a Session file. The difference is that the viminfo file
does not depend on what you are working on. There normally is only one does not depend on what you are working on. There normally is only one
viminfo file. Session files are used to save the state of a specific editing ShaDa file. Session files are used to save the state of a specific editing
Session. You could have several Session files, one for each project you are Session. You could have several Session files, one for each project you are
working on. Viminfo and Session files together can be used to effectively working on. ShaDa and Session files together can be used to effectively
enter Vim and directly start working in your desired setup. |session-file| enter Vim and directly start working in your desired setup. |session-file|
*viminfo-read* *shada-read*
When Vim is started and the 'viminfo' option is non-empty, the contents of When Vim is started and the 'viminfo' option is non-empty, the contents of
the viminfo file are read and the info can be used in the appropriate places. the ShaDa file are read and the info can be used in the appropriate places.
The |v:oldfiles| variable is filled. The marks are not read in at startup The |v:oldfiles| variable is filled. The marks are not read in at startup
(but file marks are). See |initialization| for how to set the 'viminfo' (but file marks are). See |initialization| for how to set the 'viminfo'
option upon startup. option upon startup.
*viminfo-write* *shada-write*
When Vim exits and 'viminfo' is non-empty, the info is stored in the viminfo When Vim exits and 'viminfo' is non-empty, the info is stored in the ShaDa
file (it's actually merged with the existing one, if one exists). The file (it's actually merged with the existing one, if one exists). The
'viminfo' option is a string containing information about what info should be 'viminfo' option is a string containing information about what info should be
stored, and contains limits on how much should be stored (see 'viminfo'). stored, and contains limits on how much should be stored (see 'viminfo').
Notes for Unix: Notes for Unix:
- The file protection for the viminfo file will be set to prevent other users - The file protection for the ShaDa file will be set to prevent other users
from being able to read it, because it may contain any text or commands that from being able to read it, because it may contain any text or commands that
you have worked with. you have worked with.
- If you want to share the viminfo file with other users (e.g. when you "su" - If you want to share the ShaDa file with other users (e.g. when you "su"
to another user), you can make the file writable for the group or everybody. to another user), you can make the file writable for the group or everybody.
Vim will preserve this when writing new viminfo files. Be careful, don't Vim will preserve this when writing new ShaDa files. Be careful, don't
allow just anybody to read and write your viminfo file! allow just anybody to read and write your ShaDa file!
- Vim will not overwrite a viminfo file that is not writable by the current - Vim will not overwrite a ShaDa file that is not writable by the current
"real" user. This helps for when you did "su" to become root, but your "real" user. This helps for when you did "su" to become root, but your
$HOME is still set to a normal user's home directory. Otherwise Vim would $HOME is still set to a normal user's home directory. Otherwise Vim would
create a viminfo file owned by root that nobody else can read. create a ShaDa file owned by root that nobody else can read.
- The viminfo file cannot be a symbolic link. This is to avoid security - The ShaDa file cannot be a symbolic link. This is to avoid security
issues. issues.
Marks are stored for each file separately. When a file is read and 'viminfo' Marks are stored for each file separately. When a file is read and 'viminfo'
is non-empty, the marks for that file are read from the viminfo file. NOTE: is non-empty, the marks for that file are read from the ShaDa file. NOTE:
The marks are only written when exiting Vim, which is fine because marks are The marks are only written when exiting Vim, which is fine because marks are
remembered for all the files you have opened in the current editing session, remembered for all the files you have opened in the current editing session,
unless ":bdel" is used. If you want to save the marks for a file that you are unless ":bdel" is used. If you want to save the marks for a file that you are
@@ -964,12 +961,12 @@ cursor position when the file was last exited. No marks are saved for files
that start with any string given with the "r" flag in 'viminfo'. This can be that start with any string given with the "r" flag in 'viminfo'. This can be
used to avoid saving marks for files on removable media (for MS-DOS you would used to avoid saving marks for files on removable media (for MS-DOS you would
use "ra:,rb:". use "ra:,rb:".
The |v:oldfiles| variable is filled with the file names that the viminfo file The |v:oldfiles| variable is filled with the file names that the ShaDa file
has marks for. has marks for.
*viminfo-file-marks* *shada-file-marks*
Uppercase marks ('A to 'Z) are stored when writing the viminfo file. The Uppercase marks ('A to 'Z) are stored when writing the ShaDa file. The
numbered marks ('0 to '9) are a bit special. When the viminfo file is written numbered marks ('0 to '9) are a bit special. When the ShaDa file is written
(when exiting or with the ":wviminfo" command), '0 is set to the current cursor (when exiting or with the ":wviminfo" command), '0 is set to the current cursor
position and file. The old '0 is moved to '1, '1 to '2, etc. This position and file. The old '0 is moved to '1, '1 to '2, etc. This
resembles what happens with the "1 to "9 delete registers. If the current resembles what happens with the "1 to "9 delete registers. If the current
@@ -992,87 +989,89 @@ Use the "r" flag in 'viminfo' to specify for which files no marks should be
remembered. remembered.
VIMINFO FILE NAME *viminfo-file-name* SHADA FILE NAME *shada-file-name*
- The default name of the viminfo file is "$HOME/.viminfo" for Unix, - The default name of the ShaDa file is "$HOME/.nvim/shada/main.shada" for
"$HOME\_viminfo" for MS-DOS and Win32. For the last two, when $HOME is not Unix, "$HOME\_nvim\shada\main.shada" for MS-DOS and Win32. For the last
set, "$VIM\_viminfo" is used. When $VIM is also not set, "c:\_viminfo" is two, when $HOME is not set, "$VIM\_nvim\shada\main.shada" is used. When
used. $VIM is also not set, "c:\_nvim\shada\main.shada" is used.
- The 'n' flag in the 'viminfo' option can be used to specify another viminfo - The 'n' flag in the 'viminfo' option can be used to specify another ShaDa
file name |'viminfo'|. file name |'viminfo'|.
- The "-i" Vim argument can be used to set another file name, |-i|. When the - The "-i" Vim argument can be used to set another file name, |-i|. When the
file name given is "NONE" (all uppercase), no viminfo file is ever read or file name given is "NONE" (all uppercase), no ShaDa file is ever read or
written. Also not for the commands below! written. Also not for the commands below!
- For the commands below, another file name can be given, overriding the - For the commands below, another file name can be given, overriding the
default and the name given with 'viminfo' or "-i" (unless it's NONE). default and the name given with 'viminfo' or "-i" (unless it's NONE).
CHARACTER ENCODING *viminfo-encoding* CHARACTER ENCODING *shada-encoding*
The text in the viminfo file is encoded as specified with the 'encoding' The text in the ShaDa file is UTF-8-encoded. Normally you will always work
option. Normally you will always work with the same 'encoding' value, and with the same 'encoding' value, and this works just fine. However, if you
this works just fine. However, if you read the viminfo file with another read the ShaDa file with value for 'encoding' different from utf-8 and
value for 'encoding' than what it was written with, some of the text 'encoding' used when writing ShaDa file, some of the text (non-ASCII
(non-ASCII characters) may be invalid. If this is unacceptable, add the 'c' characters) may be invalid as NeoVim always attempts to convert the text in
flag to the 'viminfo' option: > the ShaDa file from the UTF-8 to the current 'encoding' value. Filenames are
:set viminfo+=c never converted, affected elements are:
Vim will then attempt to convert the text in the viminfo file from the
'encoding' value it was written with to the current 'encoding' value. This - history strings;
requires Vim to be compiled with the |+iconv| feature. Filenames are not - variable values;
converted. - register values;
- last used search and substitute patterns;
- last used substitute replacement string.
MANUALLY READING AND WRITING *viminfo-read-write* MANUALLY READING AND WRITING *shada-read-write*
Two commands can be used to read and write the viminfo file manually. This Two commands can be used to read and write the ShaDa file manually. This
can be used to exchange registers between two running Vim programs: First can be used to exchange registers between two running Vim programs: First
type ":wv" in one and then ":rv" in the other. Note that if the register type ":wv" in one and then ":rv" in the other. Note that if the register
already contained something, then ":rv!" would be required. Also note already contained something, then ":rv!" would be required. Also note
however that this means everything will be overwritten with information from however that this means everything will be overwritten with information from
the first Vim, including the command line history, etc. the first Vim, including the command line history, etc.
The viminfo file itself can be edited by hand too, although we suggest you The ShaDa file itself can be edited by hand too, although we suggest you
start with an existing one to get the format right. It is reasonably start with an existing one to get the format right. You need to understand
self-explanatory once you're in there. This can be useful in order to MessagePack (or, more likely, find software that is able to use it) format to
create a second file, say "~/.my_viminfo" which could contain certain do this. This can be useful in order to create a second file, say
settings that you always want when you first start Vim. For example, you "~/.my.shada" which could contain certain settings that you always want when
can preload registers with particular data, or put certain commands in the you first start NeoVim. For example, you can preload registers with
command line history. A line in your .vimrc file like > particular data, or put certain commands in the command line history. A line
:rviminfo! ~/.my_viminfo in your .nvimrc file like >
can be used to load this information. You could even have different viminfos :rviminfo! ~/.my.shada
for different types of files (e.g., C code) and load them based on the file can be used to load this information. You could even have different ShaDa
name, using the ":autocmd" command (see |:autocmd|). files for different types of files (e.g., C code) and load them based on the
file name, using the ":autocmd" command (see |:autocmd|).
*viminfo-errors* *shada-errors*
When Vim detects an error while reading a viminfo file, it will not overwrite When Vim detects an error while reading a ShaDa file, it will not overwrite
that file. If there are more than 10 errors, Vim stops reading the viminfo that file. This was done to avoid accidentally destroying a file when the
file. This was done to avoid accidentally destroying a file when the file file name of the ShaDa file is wrong. This could happen when accidentally
name of the viminfo file is wrong. This could happen when accidentally typing typing "nvim -i file" when you wanted "nvim -R file" (yes, somebody
"vim -i file" when you wanted "vim -R file" (yes, somebody accidentally did accidentally did that!). If you want to overwrite a ShaDa file with an error
that!). If you want to overwrite a viminfo file with an error in it, you will in it, you will either have to fix the error, or delete the file (while NeoVim
either have to fix the error, or delete the file (while Vim is running, so is running, so most of the information will be restored).
most of the information will be restored).
*:rv* *:rviminfo* *E195* *:rv* *:rviminfo* *E195*
:rv[iminfo][!] [file] Read from viminfo file [file] (default: see above). :rv[iminfo][!] [file] Read from ShaDa file [file] (default: see above).
If [!] is given, then any information that is If [!] is given, then any information that is
already set (registers, marks, |v:oldfiles|, etc.) already set (registers, marks, |v:oldfiles|, etc.)
will be overwritten. will be overwritten.
*:wv* *:wviminfo* *E137* *E138* *E574* *E886* *:wv* *:wviminfo* *E137* *E138* *E574* *E886*
:wv[iminfo][!] [file] Write to viminfo file [file] (default: see above). :wv[iminfo][!] [file] Write to ShaDa file [file] (default: see above).
The information in the file is first read in to make The information in the file is first read in to make
a merge between old and new info. When [!] is used, a merge between old and new info. When [!] is used,
the old information is not read first, only the the old information is not read first, only the
internal info is written. If 'viminfo' is empty, marks internal info is written (also disables safety checks
for up to 100 files will be written. described in |shada-errors|). If 'viminfo' is empty,
When you get error "E138: Can't write viminfo file" marks for up to 100 files will be written.
check that no old temp files were left behind (e.g. When you get error "E138: All .tmp.X files exist,
~/.viminf*) and that you can write in the directory of cannot write ShaDa file!" check that no old temp files
the .viminfo file. were left behind (e.g. ~/.nvim/shada/main.shada.tmp*).
*:ol* *:oldfiles* *:ol* *:oldfiles*
:ol[dfiles] List the files that have marks stored in the viminfo :ol[dfiles] List the files that have marks stored in the ShaDa
file. This list is read on startup and only changes file. This list is read on startup and only changes
afterwards with ":rviminfo!". Also see |v:oldfiles|. afterwards with ":rviminfo!". Also see |v:oldfiles|.
The number can be used with |c_#<|. The number can be used with |c_#<|.

View File

@@ -12,7 +12,7 @@ it later.
|21.1| Suspend and resume |21.1| Suspend and resume
|21.2| Executing shell commands |21.2| Executing shell commands
|21.3| Remembering information; viminfo |21.3| Remembering information; ShaDa
|21.4| Sessions |21.4| Sessions
|21.5| Views |21.5| Views
|21.6| Modelines |21.6| Modelines
@@ -78,13 +78,13 @@ This is similar to using CTRL-Z to suspend Vim. The difference is that a new
shell is started. shell is started.
============================================================================== ==============================================================================
*21.3* Remembering information; viminfo *21.3* Remembering information; ShaDa
After editing for a while you will have text in registers, marks in various After editing for a while you will have text in registers, marks in various
files, a command line history filled with carefully crafted commands. When files, a command line history filled with carefully crafted commands. When
you exit Vim all of this is lost. But you can get it back! you exit Vim all of this is lost. But you can get it back!
The viminfo file is designed to store status information: The ShaDa file is designed to store status information:
Command-line and Search pattern history Command-line and Search pattern history
Text in registers Text in registers
@@ -92,8 +92,8 @@ The viminfo file is designed to store status information:
The buffer list The buffer list
Global variables Global variables
Each time you exit Vim it will store this information in a file, the viminfo Each time you exit Vim it will store this information in a file, the ShaDa
file. When Vim starts again, the viminfo file is read and the information file. When Vim starts again, the ShaDa file is read and the information
restored. restored.
The 'viminfo' option is set by default to restore a limited number of items. The 'viminfo' option is set by default to restore a limited number of items.
@@ -120,7 +120,7 @@ the marks are stored. You want this feature, so now you have this: >
The < option controls how many lines are saved for each of the registers. By The < option controls how many lines are saved for each of the registers. By
default, all the lines are saved. If 0, nothing is saved. To avoid adding default, all the lines are saved. If 0, nothing is saved. To avoid adding
thousands of lines to your viminfo file (which might never get used and makes thousands of lines to your ShaDa file (which might never get used and makes
starting Vim slower) you use a maximum of 500 lines: > starting Vim slower) you use a maximum of 500 lines: >
:set viminfo='1000,f1,<500 :set viminfo='1000,f1,<500
@@ -137,9 +137,9 @@ Other options you might want to use:
% the buffer list (only restored when starting Vim without file % the buffer list (only restored when starting Vim without file
arguments) arguments)
c convert the text using 'encoding' c convert the text using 'encoding'
n name used for the viminfo file (must be the last option) n name used for the ShaDa file (must be the last option)
See the 'viminfo' option and |viminfo-file| for more information. See the 'viminfo' option and |shada-file| for more information.
When you run Vim multiple times, the last one exiting will store its When you run Vim multiple times, the last one exiting will store its
information. This may cause information that previously exiting Vims stored information. This may cause information that previously exiting Vims stored
@@ -209,21 +209,21 @@ You can use the ":wviminfo" and ":rviminfo" commands to save and restore the
information while still running Vim. This is useful for exchanging register information while still running Vim. This is useful for exchanging register
contents between two instances of Vim, for example. In the first Vim do: > contents between two instances of Vim, for example. In the first Vim do: >
:wviminfo! ~/tmp/viminfo :wviminfo! ~/tmp/shada
And in the second Vim do: > And in the second Vim do: >
:rviminfo! ~/tmp/viminfo :rviminfo! ~/tmp/shada
Obviously, the "w" stands for "write" and the "r" for "read". Obviously, the "w" stands for "write" and the "r" for "read".
The ! character is used by ":wviminfo" to forcefully overwrite an existing The ! character is used by ":wviminfo" to forcefully overwrite an existing
file. When it is omitted, and the file exists, the information is merged into file. When it is omitted, and the file exists, the information is merged into
the file. the file.
The ! character used for ":rviminfo" means that all the information is The ! character used for ":rviminfo" means that all the information in
used, this may overwrite existing information. Without the ! only information ShaDa file has priority over existing information, this may overwrite it.
that wasn't set is used. Without the ! only information that wasn't set is used.
These commands can also be used to store info and use it again later. You These commands can also be used to store info and use it again later. You
could make a directory full of viminfo files, each containing info for a could make a directory full of ShaDa files, each containing info for a
different purpose. different purpose.
============================================================================== ==============================================================================
@@ -355,12 +355,12 @@ Similarly, MS-Windows Vim understands file names with / to separate names, but
Unix Vim doesn't understand \. Unix Vim doesn't understand \.
SESSIONS AND VIMINFO SESSIONS AND SHADA
Sessions store many things, but not the position of marks, contents of Sessions store many things, but not the position of marks, contents of
registers and the command line history. You need to use the viminfo feature registers and the command line history. You need to use the shada feature
for these things. for these things.
In most situations you will want to use sessions separately from viminfo. In most situations you will want to use sessions separately from shada.
This can be used to switch to another session, but keep the command line This can be used to switch to another session, but keep the command line
history. And yank text into registers in one session, and paste it back in history. And yank text into registers in one session, and paste it back in
another session. another session.
@@ -368,12 +368,12 @@ another session.
this yourself then. Example: > this yourself then. Example: >
:mksession! ~/.vim/secret.vim :mksession! ~/.vim/secret.vim
:wviminfo! ~/.vim/secret.viminfo :wviminfo! ~/.vim/secret.shada
And to restore this again: > And to restore this again: >
:source ~/.vim/secret.vim :source ~/.vim/secret.vim
:rviminfo! ~/.vim/secret.viminfo :rviminfo! ~/.vim/secret.shada
============================================================================== ==============================================================================
*21.5* Views *21.5* Views

View File

@@ -235,7 +235,7 @@ actually view a file that way, if you have lots of time at hand.
Note: Note:
Since 'encoding' is used for all text inside Vim, changing it makes Since 'encoding' is used for all text inside Vim, changing it makes
all non-ASCII text invalid. You will notice this when using registers all non-ASCII text invalid. You will notice this when using registers
and the 'viminfo' file (e.g., a remembered search pattern). It's and the |shada-file| (e.g., a remembered search pattern). It's
recommended to set 'encoding' in your vimrc file, and leave it alone. recommended to set 'encoding' in your vimrc file, and leave it alone.
============================================================================== ==============================================================================

View File

@@ -181,7 +181,7 @@ Subjects that can be read independently.
|usr_21.txt| Go away and come back |usr_21.txt| Go away and come back
|21.1| Suspend and resume |21.1| Suspend and resume
|21.2| Executing shell commands |21.2| Executing shell commands
|21.3| Remembering information; viminfo |21.3| Remembering information; ShaDa
|21.4| Sessions |21.4| Sessions
|21.5| Views |21.5| Views
|21.6| Modelines |21.6| Modelines

View File

@@ -370,6 +370,7 @@ N *+reltime* |reltime()| function, 'hlsearch'/'incsearch' timeout,
'redrawtime' option 'redrawtime' option
B *+rightleft* Right to left typing |'rightleft'| B *+rightleft* Right to left typing |'rightleft'|
N *+scrollbind* |'scrollbind'| N *+scrollbind* |'scrollbind'|
N *+shada* |'viminfo'|
B *+signs* |:sign| B *+signs* |:sign|
N *+smartindent* |'smartindent'| N *+smartindent* |'smartindent'|
N *+startuptime* |--startuptime| argument N *+startuptime* |--startuptime| argument
@@ -387,7 +388,6 @@ N *+textobjects* |text-objects| selection
N *+title* Setting the window 'title' and 'icon' N *+title* Setting the window 'title' and 'icon'
N *+toolbar* |gui-toolbar| N *+toolbar* |gui-toolbar|
N *+user_commands* User-defined commands. |user-commands| N *+user_commands* User-defined commands. |user-commands|
N *+viminfo* |'viminfo'|
N *+vertsplit* Vertically split windows |:vsplit| N *+vertsplit* Vertically split windows |:vsplit|
N *+virtualedit* |'virtualedit'| N *+virtualedit* |'virtualedit'|
S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200. S *+visual* Visual mode |Visual-mode| Always enabled since 7.4.200.

View File

@@ -23,7 +23,8 @@ these differences.
- Use `.nvimrc` instead of `.vimrc` for storing configuration. - Use `.nvimrc` instead of `.vimrc` for storing configuration.
- Use `.nvim` instead of `.vim` to store configuration files. - Use `.nvim` instead of `.vim` to store configuration files.
- Use `.nviminfo` instead of `.viminfo` for persistent session information. - Use `.nvim/shada/main.shada` instead of `.viminfo` for persistent session
information.
============================================================================== ==============================================================================
2. Option defaults *nvim-option-defaults* 2. Option defaults *nvim-option-defaults*
@@ -93,6 +94,14 @@ are always available and may be used simultaneously in separate plugins. The
"{E724@level}"), but this is not reliable because |string()| continues to "{E724@level}"), but this is not reliable because |string()| continues to
error out. error out.
Viminfo text files were replaced with binary (messagepack) ShaDa files.
Additional differences:
- |shada-c| has no effect.
- |shada-s| now limits size of every item and not just registers.
- When reading ShaDa files history, jump list and change list items are merged
with those in currently running NeoVim instance according to the timestamp.
============================================================================== ==============================================================================
4. New Features *nvim-features-new* 4. New Features *nvim-features-new*

View File

@@ -53,7 +53,7 @@ hidden: The buffer is not displayed. If there is a file for this buffer, it
*inactive-buffer* *inactive-buffer*
inactive: The buffer is not displayed and does not contain anything. Options inactive: The buffer is not displayed and does not contain anything. Options
for the buffer are remembered if the file was once loaded. It can for the buffer are remembered if the file was once loaded. It can
contain marks from the |viminfo| file. But the buffer doesn't contain marks from the |shada| file. But the buffer doesn't
contain text. contain text.
In a table: In a table: