mirror of
https://github.com/don-philipe/dotfiles.git
synced 2025-11-08 14:47:03 +01:00
Replace NERDTreeTabs plug
Remove named plugin and replace it with native NERDTree configuration to display NERDTree in all tabs (mirroring). Add C-x as tab closing shortcut. Custom command :NT now opens NERDTree instead of NERDTreeToggle
This commit is contained in:
11
.vimrc
11
.vimrc
@@ -37,9 +37,10 @@ inoremap <expr>> strpart(getline('.'), col('.')-1, 1) == ">" ? "\<Right>" : ">"
|
|||||||
|
|
||||||
" Tab navigation
|
" Tab navigation
|
||||||
" new tab and move to previous window (NERDTree if open)
|
" new tab and move to previous window (NERDTree if open)
|
||||||
nmap <C-t> :tabnew <bar> :wincmd p<CR>
|
nmap <C-t> :tabnew <bar> :wincmd h<CR>
|
||||||
nmap <C-h> :tabprev<CR>
|
nmap <C-h> :tabprev<CR>
|
||||||
nmap <C-l> :tabnext<CR>
|
nmap <C-l> :tabnext<CR>
|
||||||
|
nmap <C-x> :tabclose<CR>
|
||||||
|
|
||||||
" Resize windows with arrow keys
|
" Resize windows with arrow keys
|
||||||
nmap <Up> :res -1<CR>
|
nmap <Up> :res -1<CR>
|
||||||
@@ -63,6 +64,9 @@ if empty(glob(data_dir . '/autoload/plug.vim'))
|
|||||||
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Open the existing NERDTree on each new tab
|
||||||
|
autocmd BufWinEnter * if &buftype != 'quickfix' && getcmdwintype() == '' | silent NERDTreeMirror | endif
|
||||||
|
|
||||||
" Shortcut for JSON formatting via jq
|
" Shortcut for JSON formatting via jq
|
||||||
if executable('jq')
|
if executable('jq')
|
||||||
command JQ %!jq .
|
command JQ %!jq .
|
||||||
@@ -77,9 +81,6 @@ Plug 'pearofducks/ansible-vim'
|
|||||||
" NERDtree
|
" NERDtree
|
||||||
Plug 'preservim/nerdtree'
|
Plug 'preservim/nerdtree'
|
||||||
|
|
||||||
" One NERDtree for all tabs
|
|
||||||
Plug 'jistr/vim-nerdtree-tabs'
|
|
||||||
|
|
||||||
" Git plugin for NERDtree
|
" Git plugin for NERDtree
|
||||||
Plug 'Xuyuanp/nerdtree-git-plugin'
|
Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||||
|
|
||||||
@@ -138,7 +139,7 @@ call plug#end()
|
|||||||
|
|
||||||
|
|
||||||
" Set alias command for toggeling nerd tree
|
" Set alias command for toggeling nerd tree
|
||||||
command NT NERDTreeTabsToggle
|
command NT NERDTree
|
||||||
|
|
||||||
" special configuration:
|
" special configuration:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user