mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
chore(vim): add autocmd to remember the cursor position
This commit is contained in:
@@ -3,5 +3,14 @@
|
|||||||
|
|
||||||
augroup highlight_yank
|
augroup highlight_yank
|
||||||
autocmd!
|
autocmd!
|
||||||
au TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=700}
|
autocmd TextYankPost * silent! lua vim.highlight.on_yank{higroup="IncSearch", timeout=700}
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
" Remember cursor position
|
||||||
|
augroup line_return
|
||||||
|
autocmd!
|
||||||
|
autocmd BufReadPost *
|
||||||
|
\ if line("'\"") > 1 && line("'\"") <= line("$") |
|
||||||
|
\ exe "normal! g`\"" |
|
||||||
|
\ endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|||||||
Reference in New Issue
Block a user