From b9adbcc4fd9c04c7121b1e73f1d3c11828eec440 Mon Sep 17 00:00:00 2001 From: dogeystamp Date: Tue, 28 Jun 2022 21:14:41 -0400 Subject: [PATCH] nvim: Start netrw by default --- src/.config/nvim/init.vim | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/.config/nvim/init.vim b/src/.config/nvim/init.vim index d7ccd0e..dc28284 100755 --- a/src/.config/nvim/init.vim +++ b/src/.config/nvim/init.vim @@ -10,3 +10,28 @@ highlight LineNr ctermfg=grey highlight EndOfBuffer ctermfg=black ctermbg=black nnoremap :noh + +set splitbelow splitright + +let g:netrw_banner = 0 +let g:netrw_liststyle = 3 +let g:netrw_browse_split = 4 +let g:netrw_altv = 1 +let g:netrw_winsize = 20 + +function! OpenNetRW() + vsplit + :vertical resize 25 + Explore + wincmd h +endfunction + +aug ProjectDrawer + au! + au VimEnter * :call OpenNetRW() +aug END + +aug netrw_close + au! + au WinEnter * if winnr('$') == 1 && getbufvar(winbufnr(winnr()), "&filetype") == "netrw"|q|endif +aug END