mirror of
https://github.com/prurigro/darkcloud-nvimconfig.git
synced 2024-11-22 19:54:10 -05:00
add leader+bracket toggles for sidebars and play with placement/touchup
This commit is contained in:
parent
95a0548ebc
commit
646d18bd4c
4 changed files with 47 additions and 31 deletions
12
README.md
12
README.md
|
@ -101,12 +101,12 @@ As usual, to have your system use `vimpager` in place of `less`, you'll need to
|
|||
#### Sidebars ####
|
||||
|
||||
| Binding | Mode | Action |
|
||||
|-----------------|------|-----------------------------------------------|
|
||||
| Ctrl-or-Alt+F1 | ALL | Toggle **vimfiler** file manager sidebar |
|
||||
| Ctrl-or-Alt+F2 | ALL | Toggle the **gundo** undo history sidebar |
|
||||
| Ctrl-or-Alt+F3 | ALL | Toggle the **tagbar** source code tag sidebar |
|
||||
| Ctrl-or-Alt+F4 | ALL | Toggle the **extradite** git history window |
|
||||
| Ctrl-or-Alt+F12 | ALL | Toggle the **goyo** distraction-free mode |
|
||||
|--------------------------------|------|-----------------------------------------------|
|
||||
| Ctrl or Alt+F1 or Backslash+\[ | ALL | Toggle **vimfiler** file manager sidebar |
|
||||
| Ctrl or Alt+F2 or Backslash+\] | ALL | Toggle the **gundo** undo history sidebar |
|
||||
| Ctrl or Alt+F3 or Backslash+{ | ALL | Toggle the **tagbar** source code tag sidebar |
|
||||
| Ctrl or Alt+F4 or Backslash+} | ALL | Toggle the **extradite** git history window |
|
||||
| Ctrl or Alt+F12 | ALL | Toggle the **goyo** distraction-free mode |
|
||||
|
||||
#### Toggles ####
|
||||
|
||||
|
|
|
@ -51,8 +51,8 @@ endif
|
|||
autocmd BufEnter,FileType extradite setlocal number "enable line numbers in extradite
|
||||
autocmd BufEnter,FileType help* setlocal nocursorline "remove the horizontal cursor line
|
||||
|
||||
"load help in an 80 char vertical split if the window is wider than 140 characters, otherwise load horizontally at 33% of the height
|
||||
autocmd BufEnter,FileType help* if (winwidth(0) >= 140)|wincmd L|vertical resize 80|endif
|
||||
"load in an 80 char vertical split if the window is wider than 140 characters
|
||||
autocmd BufEnter,FileType help* if (winwidth(0) >= 110)|wincmd L|vertical resize 80|endif
|
||||
|
||||
"settings for buffers in diff mode
|
||||
autocmd VimEnter,FilterWritePre * if &diff|setlocal nofoldenable|endif
|
||||
|
|
|
@ -114,13 +114,17 @@
|
|||
" <Space>0 | (N) -> reset all folds using default fold level
|
||||
"
|
||||
" <Ctrl-F1> | (A) -> toggle vimfiler sidebar
|
||||
" <Ctrl-F2> | (A) -> toggle the gundo sidebar
|
||||
" <Ctrl-F3> | (A) -> toggle the tagbar sidebar
|
||||
" <Ctrl-F4> | (A) -> toggle extradite git commit history
|
||||
" <Alt-F1> | (A) -> toggle vimfiler sidebar
|
||||
" <Alt-F2> | (A) -> toggle the gundo sidebar
|
||||
" <Alt-F3> | (A) -> toggle the tagbar sidebar
|
||||
" <Leader>[ | (A) -> toggle vimfiler sidebar
|
||||
" <Ctrl-F2> | (A) -> toggle the tagbar sidebar
|
||||
" <Alt-F2> | (A) -> toggle the tagbar sidebar
|
||||
" <Leader>] | (A) -> toggle the tagbar sidebar
|
||||
" <Ctrl-F3> | (A) -> toggle the gundo sidebar
|
||||
" <Alt-F3> | (A) -> toggle the gundo sidebar
|
||||
" <Leader>{ | (A) -> toggle the gundo sidebar
|
||||
" <Ctrl-F4> | (A) -> toggle extradite git commit history
|
||||
" <Alt-F4> | (A) -> toggle extradite git commit history
|
||||
" <Leader>} | (A) -> toggle extradite git commit history
|
||||
"
|
||||
" <F1> | (A) -> toggle line wrapping
|
||||
" <F2> | (A) -> toggle spell check
|
||||
|
@ -495,22 +499,31 @@
|
|||
nnoremap <silent><expr> <A-F1> ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
|
||||
xnoremap <silent><expr> <A-F1> '<Esc>:VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
|
||||
inoremap <silent><expr> <A-F1> '<Esc>:VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
|
||||
|
||||
"bindings to trigger the gundo undo history
|
||||
nnoremap <silent><expr> <C-F2> ':GundoToggle<CR>:echo "undo history sidebar toggled"<CR>'
|
||||
xnoremap <silent><expr> <C-F2> '<Esc>:GundoToggle<CR>'
|
||||
inoremap <silent><expr> <C-F2> '<Esc>:GundoToggle<CR>'
|
||||
nnoremap <silent><expr> <A-F2> ':GundoToggle<CR>:echo "undo history sidebar toggled"<CR>'
|
||||
xnoremap <silent><expr> <A-F2> '<Esc>:GundoToggle<CR>'
|
||||
inoremap <silent><expr> <A-F2> '<Esc>:GundoToggle<CR>'
|
||||
nnoremap <silent><expr> <Leader>[ ':VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
|
||||
xnoremap <silent><expr> <Leader>[ '<Esc>:VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
|
||||
inoremap <silent><expr> <Leader>[ '<Esc>:VimFiler -split -simple -toggle -no-quit -direction=topleft -winwidth=45<CR>'
|
||||
|
||||
"bindings to trigger the tagbar list of tags
|
||||
nnoremap <silent><expr> <C-F3> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
|
||||
xnoremap <silent><expr> <C-F3> '<Esc>:TagbarToggle<CR>gv'
|
||||
inoremap <silent><expr> <C-F3> '<C-O>:TagbarToggle<CR>'
|
||||
nnoremap <silent><expr> <C-F2> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
|
||||
xnoremap <silent><expr> <C-F2> '<Esc>:TagbarToggle<CR>gv'
|
||||
inoremap <silent><expr> <C-F2> '<C-O>:TagbarToggle<CR>'
|
||||
nnoremap <silent><expr> <A-F3> ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
|
||||
xnoremap <silent><expr> <A-F3> '<Esc>:TagbarToggle<CR>gv'
|
||||
inoremap <silent><expr> <A-F3> '<C-O>:TagbarToggle<CR>'
|
||||
nnoremap <silent><expr> <Leader>] ':TagbarToggle<CR>:echo "tagbar toggled"<CR>'
|
||||
xnoremap <silent><expr> <Leader>] '<Esc>:TagbarToggle<CR>gv'
|
||||
inoremap <silent><expr> <Leader>] '<C-O>:TagbarToggle<CR>'
|
||||
|
||||
"bindings to trigger the gundo undo history
|
||||
nnoremap <silent><expr> <C-F3> ':GundoToggle<CR>:echo "undo history sidebar toggled"<CR>'
|
||||
xnoremap <silent><expr> <C-F3> '<Esc>:GundoToggle<CR>'
|
||||
inoremap <silent><expr> <C-F3> '<Esc>:GundoToggle<CR>'
|
||||
nnoremap <silent><expr> <A-F2> ':GundoToggle<CR>:echo "undo history sidebar toggled"<CR>'
|
||||
xnoremap <silent><expr> <A-F2> '<Esc>:GundoToggle<CR>'
|
||||
inoremap <silent><expr> <A-F2> '<Esc>:GundoToggle<CR>'
|
||||
nnoremap <silent><expr> <Leader>{ ':GundoToggle<CR>:echo "undo history sidebar toggled"<CR>'
|
||||
xnoremap <silent><expr> <Leader>{ '<Esc>:GundoToggle<CR>'
|
||||
inoremap <silent><expr> <Leader>{ '<Esc>:GundoToggle<CR>'
|
||||
|
||||
"view commit history and diffs
|
||||
nnoremap <expr><silent> <C-F4> ':SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
|
@ -519,6 +532,9 @@
|
|||
nnoremap <expr><silent> <A-F4> ':SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
xnoremap <expr><silent> <A-F4> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
inoremap <expr><silent> <A-F4> '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
nnoremap <silent><expr> <Leader>} ':SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
xnoremap <silent><expr> <Leader>} '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
inoremap <silent><expr> <Leader>} '<Esc>:SyntasticToggleOff<CR>:Extradite!<CR>:resize 10<CR>:wincmd x<CR>:wincmd b<CR>:wincmd H<CR>:wincmd b<CR>'
|
||||
|
||||
"toggle line wrapping (and bottom bar if using the gui)
|
||||
nnoremap <silent><expr> <F1> ':set wrap!<CR>:echo "line wrapping toggled"<CR>'
|
||||
|
@ -781,7 +797,7 @@
|
|||
autocmd FileType qf map <buffer> h j
|
||||
autocmd FileType qf map <buffer> l k
|
||||
autocmd FileType qf map <buffer> <silent><expr> q ':call ToggleQuickfixList()<CR>'
|
||||
autocmd FileType qf map <buffer> <silent><expr> <C-F3> ':call ToggleQuickfixList()<CR>'
|
||||
autocmd FileType qf map <buffer> <silent><expr> <C-F2> ':call ToggleQuickfixList()<CR>'
|
||||
autocmd FileType qf map <buffer> <silent><expr> <A-F3> ':call ToggleQuickfixList()<CR>'
|
||||
|
||||
"vimdiff
|
||||
|
@ -808,9 +824,9 @@
|
|||
"MAPPINGS DISABLED FOR GIVEN FILETYPES: {{{
|
||||
"remove incompatible toggles from specific file types
|
||||
autocmd Filetype qf,gundo,vimfiler,tagbar,extradite,help noremap <buffer> ` <Nop>
|
||||
autocmd Filetype qf,vimfiler,extradite,help noremap <buffer> <C-F2> <Nop>
|
||||
autocmd Filetype qf,vimfiler,extradite,help noremap <buffer> <C-F3> <Nop>
|
||||
autocmd Filetype qf,vimfiler,extradite,help noremap <buffer> <A-F2> <Nop>
|
||||
autocmd Filetype gundo,vimfiler,extradite,help noremap <buffer> <C-F3> <Nop>
|
||||
autocmd Filetype gundo,vimfiler,extradite,help noremap <buffer> <C-F2> <Nop>
|
||||
autocmd Filetype gundo,vimfiler,extradite,help noremap <buffer> <A-F3> <Nop>
|
||||
autocmd Filetype qf,gundo,vimfiler,tagbar,help,diff noremap <buffer> <C-F4> <Nop>
|
||||
autocmd Filetype qf,gundo,vimfiler,tagbar,help,diff noremap <buffer> <A-F4> <Nop>
|
||||
|
|
|
@ -82,7 +82,7 @@ scriptencoding utf-8
|
|||
"}}}
|
||||
|
||||
"GUNDO: {{{
|
||||
let g:gundo_right=1
|
||||
let g:gundo_right=0
|
||||
let g:gundo_width=35
|
||||
let g:gundo_preview_height=10
|
||||
|
||||
|
@ -96,7 +96,7 @@ scriptencoding utf-8
|
|||
map g/ <Plug>(incsearch-stay)
|
||||
|
||||
"n and N behavioru is consistant
|
||||
let g:incsearch#consistent_n_direction = 1
|
||||
let g:incsearch#consistent_n_direction=1
|
||||
"}}}
|
||||
|
||||
"JSON: {{{
|
||||
|
@ -413,7 +413,7 @@ scriptencoding utf-8
|
|||
\ 'subseparator': {'left': '|', 'right': '|'},
|
||||
\ 'component': {
|
||||
\ 'tagbar': '%{tagbar#currenttag("[%s]", "", "f")}',
|
||||
\ },
|
||||
\ }
|
||||
\ }
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue