Hacker News new | past | comments | ask | show | jobs | submit login

another way to get into this mode is to start doing a complex command.. so

:%s/

and when you realise it's not as simple as you first thought.. doing ^f will take you "command line" buffer where you can do all the normal vim commands..

as for copy/paste .. if your vim is compiled with the option "+clipboard" then you can use the "+" register to interact with all your system copy/pasting..

however, what I most frequently end up doing is entering paste mode (:set paste) and just using my terminal emulator's paste buffer.. you can also sync these using tmux's buffers etc if you want, but it's a little less elegant imo..

once you have set/unset paste mode aliased to something sensible it makes the whole process as simple as it gets imo

for your vimrc

nmap <silent> <leader>p :set invpaste<CR>:set paste?<CR>




You, sir, are a genius and a scholar.

Do you have any idea how many tutorials there are out there that involve some kind of obscure plugin or xclip incantation for something as simple as pasting text over ssh with formatting?

To think all I needed to do was :set paste... Extraordinary.




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: