aboutsummaryrefslogtreecommitdiff
path: root/base/vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'base/vimrc')
-rw-r--r--base/vimrc6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/vimrc b/base/vimrc
index 16ccf21..9bc3a54 100644
--- a/base/vimrc
+++ b/base/vimrc
@@ -243,6 +243,12 @@ nnoremap <leader>N :call NumberToggle()<cr>
"autocmd InsertEnter * :set norelativenumber
"autocmd InsertLeave * :set relativenumber
+" Open to last position ====----
+
+if has("autocmd")
+ au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
+endif
+
" Custom functions ====----
if filereadable(expand("~/.vimrc.local"))