summaryrefslogtreecommitdiffstats
path: root/.config/nvim/sidebars.vim
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-20 20:53:19 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-20 20:53:19 +0200
commitf40cb1bc702cfdb7f76d6a34fd7a679179ab9dd0 (patch)
treed97b87c6b05f8b759c9f4bd4f0a14d2529f767a9 /.config/nvim/sidebars.vim
parentfzf zsh (diff)
downloaddotfiles-bsd-f40cb1bc702cfdb7f76d6a34fd7a679179ab9dd0.tar.gz
dotfiles-bsd-f40cb1bc702cfdb7f76d6a34fd7a679179ab9dd0.tar.bz2
dotfiles-bsd-f40cb1bc702cfdb7f76d6a34fd7a679179ab9dd0.tar.xz
dotfiles-bsd-f40cb1bc702cfdb7f76d6a34fd7a679179ab9dd0.tar.zst
dotfiles-bsd-f40cb1bc702cfdb7f76d6a34fd7a679179ab9dd0.zip
init.vim rework
Diffstat (limited to '.config/nvim/sidebars.vim')
-rw-r--r--.config/nvim/sidebars.vim38
1 files changed, 38 insertions, 0 deletions
diff --git a/.config/nvim/sidebars.vim b/.config/nvim/sidebars.vim
new file mode 100644
index 0000000..f21cf8c
--- /dev/null
+++ b/.config/nvim/sidebars.vim
@@ -0,0 +1,38 @@
+let g:NERDTreeWinPos = 'left'
+let g:NERDTreeWinSize = 30
+let g:NERDTreeQuitOnOpen = 0
+let g:tagbar_left = 1
+let g:tagbar_width = 30
+let g:tagbar_autoclose = 0
+let g:tagbar_autofocus = 1
+let g:tagbar_sort = 0
+let g:undotree_SetFocusWhenToggle = 1
+let g:undotree_SplitWidth = 30
+
+let g:sidebars = {
+ \ 'nerdtree': {
+ \ 'position': 'left',
+ \ 'check_win': {nr -> getwinvar(nr, '&filetype') ==# 'nerdtree'},
+ \ 'open': 'NERDTree',
+ \ 'close': 'NERDTreeClose'
+ \ },
+ \ 'tagbar': {
+ \ 'position': 'left',
+ \ 'check_win': {nr -> bufname(winbufnr(nr)) =~ '__Tagbar__'},
+ \ 'open': 'TagbarOpen',
+ \ 'close': 'TagbarClose'
+ \ },
+ \ 'undotree': {
+ \ 'position': 'left',
+ \ 'check_win': {nr -> getwinvar(nr, '&filetype') ==# 'undotree'},
+ \ 'open': 'UndotreeShow',
+ \ 'close': 'UndotreeHide'
+ \ }
+ \ }
+
+noremap <silent> <F1> :sp<CR><C-w>j:term<CR>:resize -10<CR>i
+noremap <silent> <F2> :call sidebar#toggle('nerdtree')<CR>
+noremap <F4> :make<space>-j5<space>
+noremap <silent> <F3> :call sidebar#toggle('tagbar')<CR>
+noremap <silent> <F5> :call sidebar#toggle('undotree')<CR>
+let g:startify_session_before_save = ['call sidebar#close_all()']