Reopen at last cursor position

master
blallo 2021-11-19 23:40:37 +01:00
parent 6baad6a90a
commit e91ce78e7e
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F
1 changed files with 7 additions and 0 deletions

View File

@ -63,6 +63,13 @@ augroup packer_user_config
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! PackerInstall packadd packer.nvim | lua require('plugins').install()]]
cmd [[command! PackerUpdate packadd packer.nvim | lua require('plugins').update()]]