Start with NERDTreeFind; Better resize
This commit is contained in:
parent
0675055e49
commit
42f35e60ec
10
init.vim
10
init.vim
|
@ -20,7 +20,6 @@ Plug 'https://github.com/vim-scripts/gmlua.vim'
|
||||||
" Utility
|
" Utility
|
||||||
Plug 'https://github.com/vim-airline/vim-airline'
|
Plug 'https://github.com/vim-airline/vim-airline'
|
||||||
Plug 'https://github.com/preservim/nerdtree'
|
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 'https://github.com/jistr/vim-nerdtree-tabs' "Other plugin for NerdTree
|
||||||
Plug 'http://github.com/tpope/vim-surround'
|
Plug 'http://github.com/tpope/vim-surround'
|
||||||
Plug 'https://github.com/tpope/vim-commentary'
|
Plug 'https://github.com/tpope/vim-commentary'
|
||||||
|
@ -61,7 +60,7 @@ call plug#end()
|
||||||
let g:NERDTreeDefaultSize = 20
|
let g:NERDTreeDefaultSize = 20
|
||||||
let g:NERDTreeWinSize=g:NERDTreeDefaultSize
|
let g:NERDTreeWinSize=g:NERDTreeDefaultSize
|
||||||
" Start NERDTree and put the cursor back in the other window.
|
" Start NERDTree and put the cursor back in the other window.
|
||||||
autocmd VimEnter * NERDTree | wincmd p
|
autocmd VimEnter * NERDTreeFind | wincmd p
|
||||||
|
|
||||||
function! IsNerdTreeEnabled()
|
function! IsNerdTreeEnabled()
|
||||||
return exists('t:NERDTreeBufName') && bufwinnr(t:NERDTreeBufName) != -1
|
return exists('t:NERDTreeBufName') && bufwinnr(t:NERDTreeBufName) != -1
|
||||||
|
@ -75,10 +74,11 @@ call plug#end()
|
||||||
" Set
|
" Set
|
||||||
function! SetNERDTreeSize(value)
|
function! SetNERDTreeSize(value)
|
||||||
if exists("g:NERDTree") && g:NERDTree.IsOpen()
|
if exists("g:NERDTree") && g:NERDTree.IsOpen()
|
||||||
execute 'let g:NERDTreeWinSize = ' . (a:value)
|
let g:NERDTreeWinSize = a:value
|
||||||
execute 'NERDTree'
|
NERDTree
|
||||||
|
wincmd p
|
||||||
|
NERDTreeFind
|
||||||
wincmd p
|
wincmd p
|
||||||
execute 'NERDTreeFind'
|
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue