3 ms·
I often use the :wa command to save all my open buffers. But it has the nasty habit of throwing an error when it’s not able to save all buffers nmap <F2> :si
by wruza 2y ago
I often use the :wa command to save all my open buffers. But it has the nasty habit of throwing an error when it’s not able to save all buffers
nmap <F2> :silent! wa<CR>
Copy to System Clipboard
if has('unix')
set clipboard=unnamedplus
else
set clipboard=unnamed
endif
Also, to type word under cursor into command line:
cmap <M-w> <C-R>=expand("<cword>")<CR>
Paste without replacing clipboard (for the lazy):
vnoremap p P
- porridgeraisin 2y ago> Also, to type word under cursor into command line You can also achieve this with <C-R><C-W> in command mode. It is inbuilt. Not sure if it's a vim or a neovim feature though.