New answers tagged buffers
0
votes
Setup Telescope to save and close all buffers, when opening a new file
When using telescope to find files, I close all buffers other than unsaved or current buffer:
command! BufOnly execute '%bdelete|edit #|normal `"' "close other buffers (silent! to try-catch ...
Top 50 recent answers are included
Related Tags
buffers × 423vim-windows × 44
vimscript × 40
autocmd × 32
neovim × 30
vimrc × 21
split × 21
hidden-buffers × 17
key-bindings × 16
tabbed-user-interface × 16
netrw × 15
command-line × 13
save × 13
multiple-files × 13
plugin-nerdtree × 12
sessions × 12
terminal-buffer × 11
search × 9
terminal × 9
functions × 9
statusline × 9
quickfix × 8
quit × 8
argument-list × 8
syntax-highlighting × 6