5 ms·
The title "pasting text into vim" is kind of wrong. This isn't really about pasting text into vim, that is a very easy thing you learn in your first hour of vim
by slurgfest 14y ago
The title "pasting text into vim" is kind of wrong.
This isn't really about pasting text into vim, that is a very easy thing you learn in your first hour of vim (press p or at worst "+p).
It is about the more meta activity of pasting text (e.g. representing a vim command or an argument to a vim command) into the vim command line.
- a3_nm 14y agoWhen I read "pasting text into vim", I thought of still another thing: ":set paste".
- kajecounterhack 14y agoI thought the same. That one stumped me for a while when I was starting out in vim.
- nsheridan 14y agoMy .vimrc contains: set pastetoggle=<F2> Life is suddenly easier :)
- tux1968 14y agoMy .vimrc contains : set pastetoggle=<Esc>[201~ noremap <Esc>[200~ :set paste<cr>0i inoremap <Esc>[200~ <c-o>:set paste<cr> cnoremap <special> <Esc>[200~ <nop> cnoremap <special> <Esc>[201~ <nop> let &t_ti="\<esc>[?2004h" let &t_te="\<esc>[?2004l" the ti/te sequences are passed from Vim to the client which tells Putty (and others) to bracket all pasting with \e[200~ and \e[201~. The other commands handle these sequences to make pasting happen transparently without having to hit F2 ;o)