Reopen at last cursor position

This commit is contained in:
sfigato 2021-11-19 23:40:37 +01:00
parent 6baad6a90a
commit e91ce78e7e
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F

View File

@ -63,6 +63,13 @@ augroup packer_user_config
augroup end augroup end
]]) ]])
-- Reopen file to last cursor position, if possible
cmd([[
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
endif
]])
cmd [[command! WhatHighlight :call util#syntax_stack()]] cmd [[command! WhatHighlight :call util#syntax_stack()]]
cmd [[command! PackerInstall packadd packer.nvim | lua require('plugins').install()]] cmd [[command! PackerInstall packadd packer.nvim | lua require('plugins').install()]]
cmd [[command! PackerUpdate packadd packer.nvim | lua require('plugins').update()]] cmd [[command! PackerUpdate packadd packer.nvim | lua require('plugins').update()]]