From 6093c9230bddceb7d3698edc5c476651129113f3 Mon Sep 17 00:00:00 2001 From: Yigit Sever Date: Fri, 19 Nov 2021 18:29:35 +0300 Subject: no time sorry! --- .config/nvim/after/plugin/autocmds.vim | 6 ++++++ 1 file changed, 6 insertions(+) (limited to '.config/nvim/after/plugin') diff --git a/.config/nvim/after/plugin/autocmds.vim b/.config/nvim/after/plugin/autocmds.vim index b361f7c..05b7ce9 100644 --- a/.config/nvim/after/plugin/autocmds.vim +++ b/.config/nvim/after/plugin/autocmds.vim @@ -6,3 +6,9 @@ autocmd BufNewFile,BufRead /tmp/neomutt* set noautoindent filetype=mail wm=0 tw= augroup bukugroup au! BufRead,BufNewFile,BufEnter buku-edit-* set filetype=buku augroup END + +" Restore last position +autocmd BufReadPost * + \ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit' + \ | exe "normal! g`\"" + \ | endif -- cgit v1.2.3-70-g09d2