diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2015-10-16 01:54:07 -0400 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2015-10-16 01:54:07 -0400 |
| commit | 3a970e57dfd48f090f8ccc21567b7974e13d4c68 (patch) | |
| tree | 5aeaf1cd7a85c17b29276eee88e9881f56ea134c /runtime | |
| parent | a3f048ee06dea15490d7b874d295c3fc850cdc51 (diff) | |
| parent | db6cba7d5759e02379005702c7a9d760137f4389 (diff) | |
| download | rneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.tar.gz rneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.tar.bz2 rneovim-3a970e57dfd48f090f8ccc21567b7974e13d4c68.zip | |
Merge pull request #2506 from ZyX-I/shada
Replace viminfo with ShaDa files
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/doc/autocmd.txt | 10 | ||||
| -rw-r--r-- | runtime/doc/cmdline.txt | 2 | ||||
| -rw-r--r-- | runtime/doc/eval.txt | 18 | ||||
| -rw-r--r-- | runtime/doc/index.txt | 6 | ||||
| -rw-r--r-- | runtime/doc/mbyte.txt | 2 | ||||
| -rw-r--r-- | runtime/doc/motion.txt | 16 | ||||
| -rw-r--r-- | runtime/doc/options.txt | 249 | ||||
| -rw-r--r-- | runtime/doc/quickref.txt | 14 | ||||
| -rw-r--r-- | runtime/doc/starting.txt | 484 | ||||
| -rw-r--r-- | runtime/doc/usr_21.txt | 59 | ||||
| -rw-r--r-- | runtime/doc/usr_45.txt | 2 | ||||
| -rw-r--r-- | runtime/doc/usr_toc.txt | 2 | ||||
| -rw-r--r-- | runtime/doc/various.txt | 2 | ||||
| -rw-r--r-- | runtime/doc/vim_diff.txt | 25 | ||||
| -rw-r--r-- | runtime/doc/windows.txt | 2 | ||||
| -rw-r--r-- | runtime/macros/less.vim | 2 | ||||
| -rw-r--r-- | runtime/optwin.vim | 4 |
17 files changed, 594 insertions, 305 deletions
diff --git a/runtime/doc/autocmd.txt b/runtime/doc/autocmd.txt index af9676272f..e922d5b601 100644 --- a/runtime/doc/autocmd.txt +++ b/runtime/doc/autocmd.txt @@ -265,8 +265,8 @@ Name triggered by ~ |TermResponse| after the terminal response to |t_RV| is received |QuitPre| when using `:quit`, before deciding whether to quit -|VimLeavePre| before exiting Vim, before writing the viminfo file -|VimLeave| before exiting Vim, after writing the viminfo file +|VimLeavePre| before exiting Vim, before writing the shada file +|VimLeave| before exiting Vim, after writing the shada file Various |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. *VimLeave* VimLeave Before exiting Vim, just after writing the - .viminfo file. Executed only once, like + .shada file. Executed only once, like VimLeavePre. To detect an abnormal exit use |v:dying|. When v:dying is 2 or more this event is not triggered. *VimLeavePre* 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 happens to be the current buffer when exiting. Mostly useful with a "*" pattern. > @@ -1375,7 +1375,7 @@ use search patterns normally, e.g., with the "n" command. If you want an autocommand to set the search pattern, such that it is used after the autocommand finishes, use the ":let @/ =" command. The search-highlighting cannot be switched off with ":nohlsearch" in an -autocommand. Use the 'h' flag in the 'viminfo' option to disable search- +autocommand. Use the 'h' flag in the 'shada' option to disable search- highlighting when starting Vim. *Cmd-event* diff --git a/runtime/doc/cmdline.txt b/runtime/doc/cmdline.txt index b208bba9a8..627a7000ec 100644 --- a/runtime/doc/cmdline.txt +++ b/runtime/doc/cmdline.txt @@ -729,7 +729,7 @@ function expand() |expand()|. #<n (where n is a number > 0) is replaced with old *:_#<* *c_#<* file name n. See |:oldfiles| or |v:oldfiles| to get the 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 absolute path is needed (when using the file name from a different directory), diff --git a/runtime/doc/eval.txt b/runtime/doc/eval.txt index 2951566ecb..0a17521c08 100644 --- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -557,9 +557,9 @@ Functions that can be used with a Dictionary: > If you need to know the type of a variable or expression, use the |type()| function. -When the '!' flag is included in the 'viminfo' option, global variables that +When the '!' flag is included in the 'shada' option, global variables that 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 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 ~ my_var_6 not 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 @@ -1524,16 +1524,16 @@ v:msgpack_types Dictionary containing msgpack types used by |msgpackparse()| of msgpack types, use |is| operator. *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. The length of the List is limited by the ' argument of the - 'viminfo' option (default is 100). - When the |viminfo| file is not used the List is empty. + 'shada' option (default is 100). + When the |shada| file is not used the List is empty. Also see |:oldfiles| and |c_#<|. 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. - {only when compiled with the |+viminfo| feature} + {only when compiled with the |+shada| feature} *v:operator* *operator-variable* 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. rightleft Compiled with 'rightleft' support. scrollbind Compiled with 'scrollbind' support. +shada Compiled with shada support. showcmd Compiled with 'showcmd' support. signs Compiled with |:sign| support. smartindent Compiled with 'smartindent' support. @@ -6964,7 +6965,6 @@ unix Unix version of Vim. user_commands User-defined commands. vertsplit Compiled with vertically split windows |:vsplit|. vim_starting True while initial source'ing takes place. |startup| -viminfo Compiled with viminfo support. virtualedit Compiled with 'virtualedit' option. visual Compiled with Visual mode. visualextra Compiled with extra Visual mode commands. diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index 7494ab1455..0238d7cc53 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1359,7 +1359,7 @@ tag command action ~ |:number| :nu[mber] print lines with line number |:nunmap| :nun[map] like ":unmap" but 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) |:omap| :om[ap] like ":map" but for Operator-pending mode |:omapclear| :omapc[lear] remove all mappings for Operator-pending mode @@ -1418,9 +1418,9 @@ tag command action ~ |:rewind| :rew[ind] go to the first file in the argument list |:right| :ri[ght] right align text |:rightbelow| :rightb[elow] make split window appear right or below +|:rshada| :rsh[ada] read from ShaDa file |:rundo| :rund[o] read undo information from a file |:runtime| :ru[ntime] source vim scripts in 'runtimepath' -|:rviminfo| :rv[iminfo] read from viminfo file |:substitute| :s[ubstitute] find and replace text |:sNext| :sN[ext] split window and go to previous file in argument list @@ -1579,8 +1579,8 @@ tag command action ~ argument list |:wq| :wq write to a file and quit window or Vim |:wqall| :wqa[ll] write all changed buffers and quit Vim +|:wshada| :wsh[ada] write to ShaDa file |:wundo| :wu[ndo] write undo information to a file -|:wviminfo| :wv[iminfo] write to viminfo file |:xit| :x[it] write if buffer changed and quit window or Vim |:xall| :xa[ll] same as ":wqall" |:xmapclear| :xmapc[lear] remove all mappings for Visual mode diff --git a/runtime/doc/mbyte.txt b/runtime/doc/mbyte.txt index c959c12fb4..17d96103b8 100644 --- a/runtime/doc/mbyte.txt +++ b/runtime/doc/mbyte.txt @@ -387,7 +387,7 @@ Vim will automatically convert from one to another encoding in several places: 'encoding' (requires a gettext version that supports this). - When reading a Vim script where |:scriptencoding| is different from '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 writing files may also be specified with the 'charconvert' option. diff --git a/runtime/doc/motion.txt b/runtime/doc/motion.txt index 8e96aedba6..2e8f0801dc 100644 --- a/runtime/doc/motion.txt +++ b/runtime/doc/motion.txt @@ -805,7 +805,7 @@ unrelated. 'a - 'z lowercase marks, valid within one file '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 buffer list. If you remove the file from the buffer list, all its marks are @@ -820,14 +820,14 @@ Uppercase marks 'A to 'Z include the file name. 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 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 -kept in the .viminfo file. See |viminfo-file-marks|. +for a moment. When the 'shada' option is not empty, uppercase marks are +kept in the .shada file. See |shada-file-marks|. 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 -time, etc. Use the "r" flag in 'viminfo' to specify files for which no -Numbered mark should be stored. See |viminfo-file-marks|. +time, etc. Use the "r" flag in 'shada' to specify files for which no +Numbered mark should be stored. See |shada-file-marks|. *'[* *`[* @@ -1074,8 +1074,8 @@ 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. -If you have included the ' item in the 'viminfo' option the jumplist will be -stored in the viminfo file and restored when starting Vim. +If you have included the ' item in the 'shada' option the jumplist will be +stored in the ShaDa file and restored when starting Vim. CHANGE LIST JUMPS *changelist* *change-list-jumps* *E664* diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index e68a009f35..4b3dbb8a15 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -1290,8 +1290,8 @@ A jump table for the options with a short description can be found at |Q_op|. used. Conversion between "latin1", "unicode", "ucs-2", "ucs-4" and "utf-8" is done internally by Vim, 'charconvert' is not used for this. - 'charconvert' is also used to convert the viminfo file, if the 'c' - flag is present in 'viminfo'. Also used for Unicode conversion. + 'charconvert' is also used to convert the shada file, if 'encoding' is + not "utf-8". Also used for Unicode conversion. Example: > set charconvert=CharConvert() fun CharConvert() @@ -2163,7 +2163,7 @@ A jump table for the options with a short description can be found at |Q_op|. feature} Sets the character encoding used inside Vim. It applies to text in 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. 'encoding' cannot be changed after startup, because (1) it causes @@ -2195,7 +2195,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. 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 effect for encoding used for files when 'fileencoding' is empty. @@ -3407,7 +3407,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 drawn may not continue in a newly drawn line. You can specify whether the highlight status is restored on startup - with the 'h' flag in 'viminfo' |viminfo-h|. + with the 'h' flag in 'shada' |shada-h|. *'history'* *'hi'* 'history' 'hi' number (Vim default: 10000, Vi default: 0) @@ -3793,7 +3793,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/.viminfo". Maybe you should change 'iskeyword' instead. + expand "$HOME/.nvim/shada/main.shada". Maybe you should change + 'iskeyword' instead. *'iskeyword'* *'isk'* 'iskeyword' 'isk' string (Vim default for @@ -5284,6 +5285,123 @@ A jump table for the options with a short description can be found at |Q_op|. with Unix. The Unix version of Vim cannot source dos format scripts, but the Windows version of Vim can source unix format scripts. + *'shada'* *'sd'* *E526* *E527* *E528* +'shada' 'sd' string (Vim default for + Win32: '!,100,<50,s10,h,rA:,rB: + others: '!,100,<50,s10,h + Vi default: "") + global + When non-empty, the shada file is read upon startup and written + when exiting Vim (see |shada-file|). The string should be a comma + separated list of parameters, each consisting of a single character + identifying the particular parameter, followed by a number or string + which specifies the value of that parameter. If a particular + character is left out, then the default value is used for that + parameter. The following is a list of the identifying characters and + the effect of their value. + CHAR VALUE ~ + *shada-!* + ! When included, save and restore global variables that start + with an uppercase letter, and don't contain a lowercase + 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 + read back correctly, you end up with an empty item. + *shada-quote* + " Maximum number of lines saved for each register. Old name of + the '<' item, with the disadvantage that you need to put a + backslash before the ", otherwise it will be recognized as the + start of a comment! + *shada-%* + % When included, save and restore the buffer list. If Vim is + started with a file name argument, the buffer list is not + restored. If Vim is started without a file name argument, the + buffer list is restored from the shada file. Buffers + without a file name and buffers for help files are not written + to the shada file. + When followed by a number, the number specifies the maximum + number of buffers that are stored. Without a number all + buffers are stored. + *shada-'* + ' Maximum number of previously edited files for which the marks + are remembered. This parameter must always be included when + 'shada' is non-empty. + Including this item also means that the |jumplist| and the + |changelist| are stored in the shada file. + *shada-/* + / Maximum number of items in the search pattern history to be + saved. If non-zero, then the previous search and substitute + patterns are also saved. When not included, the value of + 'history' is used. + *shada-:* + : Maximum number of items in the command-line history to be + saved. When not included, the value of 'history' is used. + *shada-<* + < Maximum number of lines saved for each register. If zero then + registers are not saved. When not included, all lines are + saved. '"' is the old name for this item. + Also see the 's' item below: limit specified in KiB. + *shada-@* + @ Maximum number of items in the input-line history to be + saved. When not included, the value of 'history' is used. + *shada-c* + c Dummy option, kept for compatibility reasons. Has no actual + effect. Current encoding state is described in + |shada-encoding|. + *shada-f* + 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 + non-zero, they are all stored. '0 is used for the current + cursor position (when exiting or when doing |:wshada|). + *shada-h* + h Disable the effect of 'hlsearch' when loading the shada + file. When not included, it depends on whether ":nohlsearch" + has been used since the last search command. + *shada-n* + n Name of the shada file. The name must immediately follow + the 'n'. Must be the last one! If the "-i" argument was + given when starting Vim, that file name overrides the one + given here with 'shada'. Environment variables are expanded + when opening the file, not when setting the option. + *shada-r* + r Removable media. The argument is a string (up to the next + ','). This parameter can be given several times. Each + specifies the start of a path for which no marks will be + stored. This is to avoid removable media. For MS-DOS you + could use "ra:,rb:". You can also use it for temp files, + e.g., for Unix: "r/tmp". Case is ignored. + *shada-s* + s Maximum size of an item contents in KiB. If zero then nothing + is saved. Unlike Vim this applies to all items, except for + the buffer list and header. Full item size is off by three + unsigned integers: with `s10` maximum item size may be 1 byte + (type: 7-bit integer) + 9 bytes (timestamp: up to 64-bit + integer) + 3 bytes (item size: up to 16-bit integer because + 2^8 < 10240 < 2^16) + 10240 bytes (requested maximum item + contents size) = 10253 bytes. + + Example: > + :set shada='50,<1000,s100,:0,n~/nvim/shada +< + '50 Marks will be remembered for the last 50 files you + edited. + <1000 Contents of registers (up to 1000 lines each) will be + remembered. + s100 Items with contents occupying more then 100 KiB are + skipped. + :0 Command-line history will not be saved. + n~/nvim/shada The name of the file to use is "~/nvim/shada". + no / Since '/' is not specified, the default will be used, + that is, save all of the search history, and also the + previous search and substitute patterns. + no % The buffer list will not be saved nor read back. + no h 'hlsearch' highlighting will be restored. + + When setting 'shada' from an empty value you can use |:rshada| to + load the contents of the file, this is not done automatically. + + This option cannot be set from a |modeline| or in the |sandbox|, for + security reasons. + *'shell'* *'sh'* *E91* 'shell' 'sh' string (default $SHELL or "sh", MS-DOS and Win32: "command.com" or @@ -6616,7 +6734,7 @@ A jump table for the options with a short description can be found at |Q_op|. global When bigger than zero, Vim will give messages about what it is doing. 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. >= 5 Every searched tags file and include file. >= 8 Files for which a group of autocommands is executed. @@ -6676,120 +6794,11 @@ A jump table for the options with a short description can be found at |Q_op|. with Unix. The Unix version of Vim cannot source dos format scripts, but the Windows version of Vim can source unix format scripts. - *'viminfo'* *'vi'* *E526* *E527* *E528* -'viminfo' 'vi' string (Vim default for - Win32: '!,100,<50,s10,h,rA:,rB: - others: '!,100,<50,s10,h - Vi default: "") + *'viminfo'* *'vi'* +'viminfo' 'vi' string global - {not available when compiled without the |+viminfo| - feature} - When non-empty, the viminfo file is read upon startup and written - when exiting Vim (see |viminfo-file|). The string should be a comma - separated list of parameters, each consisting of a single character - identifying the particular parameter, followed by a number or string - which specifies the value of that parameter. If a particular - character is left out, then the default value is used for that - parameter. The following is a list of the identifying characters and - the effect of their value. - CHAR VALUE ~ - *viminfo-!* - ! When included, save and restore global variables that start - with an uppercase letter, and don't contain a lowercase - 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 - read back correctly, you end up with an empty item. - *viminfo-quote* - " Maximum number of lines saved for each register. Old name of - the '<' item, with the disadvantage that you need to put a - backslash before the ", otherwise it will be recognized as the - start of a comment! - *viminfo-%* - % When included, save and restore the buffer list. If Vim is - started with a file name argument, the buffer list is not - restored. If Vim is started without a file name argument, the - buffer list is restored from the viminfo file. Buffers - without a file name and buffers for help files are not written - to the viminfo file. - When followed by a number, the number specifies the maximum - number of buffers that are stored. Without a number all - buffers are stored. - *viminfo-'* - ' Maximum number of previously edited files for which the marks - are remembered. This parameter must always be included when - 'viminfo' is non-empty. - Including this item also means that the |jumplist| and the - |changelist| are stored in the viminfo file. - *viminfo-/* - / Maximum number of items in the search pattern history to be - saved. If non-zero, then the previous search and substitute - patterns are also saved. When not included, the value of - 'history' is used. - *viminfo-:* - : Maximum number of items in the command-line history to be - saved. When not included, the value of 'history' is used. - *viminfo-<* - < Maximum number of lines saved for each register. If zero then - registers are not saved. When not included, all lines are - saved. '"' is the old name for this item. - Also see the 's' item below: limit specified in Kbyte. - *viminfo-@* - @ Maximum number of items in the input-line history to be - saved. When not included, the value of 'history' is used. - *viminfo-c* - c When included, convert the text in the viminfo file from the - 'encoding' used when writing the file to the current - 'encoding'. See |viminfo-encoding|. - *viminfo-f* - 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 - non-zero, they are all stored. '0 is used for the current - cursor position (when exiting or when doing ":wviminfo"). - *viminfo-h* - h Disable the effect of 'hlsearch' when loading the viminfo - file. When not included, it depends on whether ":nohlsearch" - has been used since the last search command. - *viminfo-n* - n Name of the viminfo file. The name must immediately follow - the 'n'. Must be the last one! If the "-i" argument was - given when starting Vim, that file name overrides the one - given here with 'viminfo'. Environment variables are expanded - when opening the file, not when setting the option. - *viminfo-r* - r Removable media. The argument is a string (up to the next - ','). This parameter can be given several times. Each - specifies the start of a path for which no marks will be - stored. This is to avoid removable media. For MS-DOS you - could use "ra:,rb:". You can also use it for temp files, - e.g., for Unix: "r/tmp". Case is ignored. Maximum length of - each 'r' argument is 50 characters. - *viminfo-s* - s Maximum size of an item in Kbyte. If zero then registers are - not saved. Currently only applies to registers. The default - "s10" will exclude registers with more than 10 Kbyte of text. - Also see the '<' item above: line count limit. - - Example: > - :set viminfo='50,<1000,s100,:0,n~/vim/viminfo -< - '50 Marks will be remembered for the last 50 files you - edited. - <1000 Contents of registers (up to 1000 lines each) will be - remembered. - s100 Registers with more than 100 Kbyte text are skipped. - :0 Command-line history will not be saved. - n~/vim/viminfo The name of the file to use is "~/vim/viminfo". - no / Since '/' is not specified, the default will be used, - that is, save all of the search history, and also the - previous search and substitute patterns. - no % The buffer list will not be saved nor read back. - no h 'hlsearch' highlighting will be restored. - - When setting 'viminfo' from an empty value you can use |:rviminfo| to - load the contents of the file, this is not done automatically. - - This option cannot be set from a |modeline| or in the |sandbox|, for - security reasons. + Deprecated alias for 'shada' option. Is kept for compatibility + reasons. *'virtualedit'* *'ve'* 'virtualedit' 've' string (default "") diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index c42d98ba90..1b24efc4f9 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -838,6 +838,7 @@ Short explanation of each option: *option-list* 'selection' 'sel' what type of selection to use 'selectmode' 'slm' when to use Select mode instead of Visual mode 'sessionoptions' 'ssop' options for |:mksession| +'shada' 'sd' use .shada file upon startup and exiting 'shell' 'sh' name of shell to use for external commands 'shellcmdflag' 'shcf' flag to shell to execute one command 'shellpipe' 'sp' string to put output of ":make" in error file @@ -911,7 +912,6 @@ Short explanation of each option: *option-list* 'verbosefile' 'vfile' file to write messages in 'viewdir' 'vdir' directory where to store files with :mkview 'viewoptions' 'vop' specifies what to save for :mkview -'viminfo' 'vi' use .viminfo file upon startup and exiting 'virtualedit' 've' when to use virtual editing 'visualbell' 'vb' use visual bell instead of beeping '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} (overwrite) |-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 |--help| --help show list of arguments and exit |--version| --version show version info and exit @@ -1215,12 +1215,12 @@ Context-sensitive completion on the command-line: ------------------------------------------------------------------------------ *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] idem, overwrite existing info -|:wviminfo| :wv[iminfo] [file] add info to viminfo file [file] -|:wviminfo| :wv[iminfo]! [file] write info to viminfo file [file] +|:rshada| :rsh[ada] [file] read info from ShaDa file [file] +|:rshada| :rsh[ada]! [file] idem, overwrite existing info +|:wshada| :wsh[ada] [file] add info to ShaDa file [file] +|:wshada| :wsh[ada]! [file] write info to ShaDa file [file] |modeline| Automatic option setting when editing a file diff --git a/runtime/doc/starting.txt b/runtime/doc/starting.txt index aa37913779..84bd70db62 100644 --- a/runtime/doc/starting.txt +++ b/runtime/doc/starting.txt @@ -12,7 +12,7 @@ Starting Vim *starting* 4. Suspending |suspend| 5. Saving settings |save-settings| 6. Views and Sessions |views-sessions| -7. The viminfo file |viminfo-file| +7. The ShaDa file |shada-file| ============================================================================== 1. Vim arguments *vim-arguments* @@ -128,7 +128,7 @@ argument. "pat" in the first file being edited (see |pattern| for the available search patterns). The search starts at the cursor 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". +{command} *-+c* *-c* @@ -251,7 +251,7 @@ argument. *-V* *verbose* -V[N] Verbose. Sets the 'verbose' option to [N] (default: 10). 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. Example: > vim -V8 foobar @@ -322,10 +322,10 @@ argument. same effect as "NONE", but loading plugins is not skipped. *-i* --i {viminfo} The file "viminfo" is used instead of the default viminfo - file. If the name "NONE" is used (all uppercase), no viminfo - file is read or written, even if 'viminfo' is set or when - ":rv" or ":wv" are used. See also |viminfo-file|. +-i {shada} The file {shada} is used instead of the default ShaDa + file. If the name "NONE" is used (all uppercase), no ShaDa + file is read or written, even if 'shada' is set or when + ":rsh" or ":wsh" are used. See also |shada-file|. *-s* -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 |gui-init|. -9. Read the viminfo file - If the 'viminfo' option is not empty, the viminfo file is read. See - |viminfo-file|. +9. Read the ShaDa file + If the 'shada' option is not empty, the ShaDa file is read. See + |shada-file|. 10. Read the quickfix file 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 out what happens. -If you have "viminfo" enabled, the loading of the viminfo file may take a -while. You can find out if this is the problem by disabling viminfo for a +If you have 'shada' enabled, the loading of the ShaDa file may take a +while. You can find out if this is the problem by disabling ShaDa for a 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 shada='20,<50,s10". |shada-file|. *:intro* 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, 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 -remember information for all Views and Sessions together |viminfo-file|. +Views and Sessions are a nice addition to ShaDa files, which are used to +remember information for all Views and Sessions together |shada-file|. You can quickly start editing with a previously saved View or Session with the |-S| argument: > @@ -865,7 +865,7 @@ The output of ":mkview" contains these items: Note that Views and Sessions are not perfect: - They don't restore everything. For example, defined functions, autocommands 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. 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 @@ -896,15 +896,16 @@ To automatically save and restore views for *.c files: > au BufWinEnter *.c silent loadview ============================================================================== -8. The viminfo file *viminfo* *viminfo-file* *E136* - *E575* *E576* *E577* +8. The ShaDa file *shada* *shada-file* + 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 -enables you to continue where you left off. +information. The ShaDa file can be used to remember that information, which +enables you to continue where you left off. Its name is the abbreviation of +SHAred DAta because it is used for sharing data between Neovim sessions. 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 search string history. - The input-line history. @@ -915,62 +916,59 @@ The viminfo file is used to store: - The buffer list. - Global variables. -The viminfo file is not supported when the |+viminfo| feature has been -disabled at compile time. - -You could also use a Session file. The difference is that the viminfo file +You could also use a Session file. The difference is that the ShaDa file 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 -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| - *viminfo-read* -When Vim is started and the 'viminfo' option is non-empty, the contents of -the viminfo file are read and the info can |