add vim-vinegar, configure some shortcuts
This commit is contained in:
parent
0fbbc616de
commit
1af043aaa9
3 changed files with 18 additions and 0 deletions
|
@ -18,6 +18,7 @@ map <C-n> :NERDTreeToggle<CR>
|
|||
map <C-f> :Files<CR>
|
||||
map <C-g> :Rg<CR>
|
||||
map <C-l> :noh<CR>
|
||||
let NERDTreeHijackNetrw = 0
|
||||
|
||||
" Keep context visible
|
||||
set scrolloff=10
|
||||
|
@ -60,6 +61,22 @@ fun! ToggleSpell()
|
|||
endif
|
||||
endf
|
||||
|
||||
" Close buffers that I'm not using
|
||||
" source: https://stackoverflow.com/a/30101152
|
||||
function! DeleteHiddenBuffers()
|
||||
let tpbl=[]
|
||||
let closed = 0
|
||||
call map(range(1, tabpagenr('$')), 'extend(tpbl, tabpagebuflist(v:val))')
|
||||
for buf in filter(range(1, bufnr('$')), 'bufexists(v:val) && index(tpbl, v:val)==-1')
|
||||
if getbufvar(buf, '&mod') == 0
|
||||
silent execute 'bwipeout' buf
|
||||
let closed += 1
|
||||
endif
|
||||
endfor
|
||||
echo "Closed ".closed." hidden buffers"
|
||||
endfunction
|
||||
nn <silent> <leader>b :call DeleteHiddenBuffers()<CR>
|
||||
|
||||
" Always show the signcolumn, otherwise it would shift the text each time
|
||||
" diagnostics appear/become resolved.
|
||||
if has("nvim-0.5.0") || has("patch-8.1.1564")
|
||||
|
|
|
@ -4,6 +4,7 @@ call plug#begin('~/.local/.shared/nvim/plugged')
|
|||
Plug 'scrooloose/nerdtree'
|
||||
let g:NERDTreeMinimalMenu=1
|
||||
let g:NERDTreeNodeDelimiter="\u00a0"
|
||||
Plug 'tpope/vim-vinegar'
|
||||
|
||||
" Fuzzy file finding is great
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue