Skip to content

Commit

Permalink
Update init.vim to have nvim jump to the last position when reopening…
Browse files Browse the repository at this point in the history
… a file
  • Loading branch information
gfxcc authored Jun 17, 2022
1 parent bdad7cc commit ec0b953
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion dot_files/.config/nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ if exists("&termguicolors") && exists("&winblend")
colorscheme NeoSolarized
endif


" Uncomment the following to have Vim jump to the last position when
" reopening a file
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g'\"" | endif
endif

nnoremap <C-n> :NvimTreeToggle<CR>
nnoremap <leader>r :NvimTreeRefresh<CR>
Expand All @@ -50,3 +55,4 @@ set termguicolors " this variable must be enabled for colors to be applied prope
lua require'nvim-tree'.setup()
lua require'nvim-web-devicons'.setup()


0 comments on commit ec0b953

Please sign in to comment.