refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / vim-viminfo / README.md
1 ---
2 title: vim-viminfo
3 homepage: https://webinstall.dev/vim-viminfo
4 tagline: |
5   viminfo keeps track of Vim's state when switching between files
6 ---
7
8 To update (replacing the current version) run `webi vim-viminfo`.
9
10 ## Cheat Sheet
11
12 > ~/.viminfo stores cursor position, copy and paste buffers, command history,
13 > and a few other goodies. The defaults aren't always good, and should be
14 > tweaked.
15
16 In an age where we have terabytes of storage (rather than kilobytes of storage),
17 it makes sense to bump the size of Vim's copy buffers to match the full size of
18 largest code file you're likely to come across, and somewhere between several
19 hours and a few days worth of history.
20
21 This one-line plugin does just that.
22
23 ### How to install manually
24
25 Create the file `~/.vim/plugins/viminfo.vim`. Add the same contents as
26 <https://github.com/webinstall/webi-installers/blob/master/vim-viminfo/viminfo.vim>.
27
28 That will look something like this:
29
30 ```vim
31 " Tell vim to remember certain things when we exit
32 "  '100  :  marks will be remembered for up to 100 previously edited files
33 "  "20000:  will save up to 20,000 lines for each register
34 "  :200  :  up to 200 lines of command-line history will be remembered
35 "  %     :  saves and restores the buffer list
36 "  n...  :  where to save the viminfo files
37 set viminfo='100,\"20000,:200,%,n~/.viminfo
38 ```
39
40 Then `~/.vimrc` should be updated to include it:
41
42 ```vim
43 " viminfo: reasonable defaults from webinstall.dev/vim-viminfo
44 source ~/.vim/plugins/viminfo.vim
45 ```