r/ProgrammerHumor • • Apr 20 '15

vim

Post image
1.3k Upvotes

427 comments sorted by

View all comments

Show parent comments

45

u/Neekoy Apr 20 '15 edited Sep 08 '26

Marvelous coordinated pause smile cough blanket

This post was anonymized with Redact

0

u/[deleted] Apr 20 '15

[deleted]

4

u/paraffin Apr 20 '15

i for insert mode, ctrl+shift+v or shift+insert to paste

3

u/the_omega99 Apr 21 '15

Note that you probably have to set paste mode, otherwise vim will likely try to format your pasted text and possible screw it up. You could do this with :set paste and :set nopaste, but more ideally you should make a shortcut for this. I use this in my .vimrc:

map <leader>pp :setlocal paste!<cr>

This lets you type <leader>pp to toggle paste mode. IIRC, <leader> is backslash by default, but that's a pain in the ass to type, so most people change it to , (comma) with:

let mapleader = ","
let g:mapleader = ","

Thus, ,pp will toggle paste mode.