From 42f35e60ecfdd778523fcc9db091dcbe724ff78f Mon Sep 17 00:00:00 2001 From: Xamora Date: Fri, 19 Jan 2024 18:14:45 +0100 Subject: [PATCH] Start with NERDTreeFind; Better resize --- init.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/init.vim b/init.vim index 0e1eee5..38d6e7a 100644 --- a/init.vim +++ b/init.vim @@ -20,7 +20,6 @@ Plug 'https://github.com/vim-scripts/gmlua.vim' " Utility Plug 'https://github.com/vim-airline/vim-airline' Plug 'https://github.com/preservim/nerdtree' -Plug 'https://github.com/baopham/vim-nerdtree-unfocus' "Add Unfocus command Plug 'https://github.com/jistr/vim-nerdtree-tabs' "Other plugin for NerdTree Plug 'http://github.com/tpope/vim-surround' Plug 'https://github.com/tpope/vim-commentary' @@ -61,7 +60,7 @@ call plug#end() let g:NERDTreeDefaultSize = 20 let g:NERDTreeWinSize=g:NERDTreeDefaultSize " Start NERDTree and put the cursor back in the other window. - autocmd VimEnter * NERDTree | wincmd p + autocmd VimEnter * NERDTreeFind | wincmd p function! IsNerdTreeEnabled() return exists('t:NERDTreeBufName') && bufwinnr(t:NERDTreeBufName) != -1 @@ -75,10 +74,11 @@ call plug#end() " Set function! SetNERDTreeSize(value) if exists("g:NERDTree") && g:NERDTree.IsOpen() - execute 'let g:NERDTreeWinSize = ' . (a:value) - execute 'NERDTree' + let g:NERDTreeWinSize = a:value + NERDTree + wincmd p + NERDTreeFind wincmd p - execute 'NERDTreeFind' endif endfunction