diff options
Diffstat (limited to '.vimrc')
| -rw-r--r-- | .vimrc | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -8,6 +8,9 @@ filetype plugin on filetype plugin indent on let mapleader = "," +" No bell +set belloff=all + set guifont=6x13:h13 set rtp+=/opt/homebrew/opt/fzf @@ -101,3 +104,20 @@ noremap <leader>e :cs find e <C-R>=expand("<cword>")<CR><CR><tab> noremap <leader>i :cs find i <C-R>=expand("<cfile>")<CR><CR><tab> " noremap <leader>f :cs find f <C-R>=expand("<cfile>")<CR><CR><tab> noremap <leader>d :cs find d <C-R>=expand("<cword>")<CR><CR><tab> + +function! CloseOnLast() + let cnt = 0 + for i in range(0, bufnr("$")) + if buflisted(i) + let cnt += 1 + endif + endfor + if cnt <= 1 + q + else + bd + endif + endfunction + +noremap <leader><leader> :call CloseOnLast()<cr> + |
