aboutsummaryrefslogtreecommitdiffhomepage
path: root/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/.vimrc b/.vimrc
index 3b82731..5c59154 100644
--- a/.vimrc
+++ b/.vimrc
@@ -598,6 +598,13 @@ Autocmd BufEnter,WinEnter,BufWinEnter *
\ let &l:numberwidth = len(line('$')) + 2
+" Jump to the last cursor position when you open a file.
+Autocmd BufRead *
+ \ if 0 < line("'\"") && line("'\"") <= line('$') && &filetype !~# 'commit' |
+ \ execute "normal g`\"" |
+ \ endif
+
+
" Syntax highlight for .vimrc {{{2
Autocmd Filetype vim