]> code.delx.au - dotfiles/blob - .vim/state.vim
Gratuitous restructuring of vim config
[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/ if it doesn't exist and use ~/tmp to save the
13 " backups into
14 if has("unix")
15 if !isdirectory(expand("~/tmp/vimbak/."))
16 !mkdir -p ~/tmp/vimbak
17 endif
18 endif
19 set backupdir=~/tmp/vimbak
20