]> code.delx.au - dotfiles/blob - .vim/state.vim
gitconfig: added expire-prune
[dotfiles] / .vim / state.vim
1 " Keep viminfo
2 set viminfo=%,'100,\"100,:100,n~/.vim/viminfo
3
4 " Vim jumps to the last position when reading a file
5 au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal g'\"" | endif
6
7 " Keep history
8 set history=100
9
10 " Make a backup (i. e. 'file~') and save it.
11 set backup
12 " create ~/tmp/vimbak if it doesn't exist and use it to save the backups
13 if has("unix")
14 if !isdirectory(expand("~/tmp/vimbak/."))
15 !mkdir -p ~/tmp/vimbak
16 endif
17 set backupdir=~/tmp/vimbak
18 endif
19
20 " Create backups by copying files to backup directory instead of renaming
21 set backupcopy=yes
22
23 " Use modelines
24 set modelines=5
25