diff options
| author | nsfisis <nsfisis@gmail.com> | 2021-11-04 18:08:34 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2021-11-04 18:08:34 +0900 |
| commit | 34f20b49ff87ba8f5fc37760a138b560b0b2d9fc (patch) | |
| tree | 556ecc5408f362ef9cdffa9b24c3afccd943bf97 | |
| parent | 59e234d12c8df1ab21db977785945ac68edc8d68 (diff) | |
| download | dotfiles-34f20b49ff87ba8f5fc37760a138b560b0b2d9fc.tar.gz dotfiles-34f20b49ff87ba8f5fc37760a138b560b0b2d9fc.tar.zst dotfiles-34f20b49ff87ba8f5fc37760a138b560b0b2d9fc.zip | |
.vimrc: jump to the last cursor position when you open a file
| -rw-r--r-- | .vimrc | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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 |
