comparison vimrc @ 16:17afab9bd228

Open vim at last known position
author zegervdv <zegervdv@me.com>
date Wed, 12 Mar 2014 21:35:40 +0100
parents 09c60bc0fc38
children fdff344860ef
comparison
equal deleted inserted replaced
15:4e87e8610500 16:17afab9bd228
62 filetype plugin indent on 62 filetype plugin indent on
63 autocmd FileType ruby set tabstop=2|set shiftwidth=2 63 autocmd FileType ruby set tabstop=2|set shiftwidth=2
64 64
65 set clipboard=unnamed 65 set clipboard=unnamed
66 66
67 set viminfo='10,\"100,:20,%,n~/.viminfo
68
69 " When editing a file, always jump to the last known cursor position.
70 " Don't do it for commit messages, when the position is invalid, or when
71 " inside an event handler (happens when dropping a file on gvim).
72 autocmd BufReadPost *
73 \ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") |
74 \ exe "normal g`\"" |
75 \ endif
67 76
68 map <Leader>d :bp<bar>sp<bar>bn<bar>bd<CR> 77 map <Leader>d :bp<bar>sp<bar>bn<bar>bd<CR>
69 78
70 " See long lines as line breaks 79 " See long lines as line breaks
71 map j gj 80 map j gj