Wiki: Paste Indent Problems


Note: You are viewing an old revision of this page. View the current version.


<cgreen> trying to cut a paste from shell running VIM to another shell running VIM, indents are all screwed <morbuz> :set paste <morbuz> then :set nopaste when you're done <cgreen> I have tried :set noai but editing python code and need to maintain idents of pasted text <morbuz> turns off autoindenting and stuff like that


<ar> use :set paste! to toggle and then use the command scrollback buffer


<absolon> I made myself a nice mapping for this. Put the following in your .vimrc, and if you paste and the indentation gets fscked just press C-a. <absolon> inoremap <silent> <C-a> <ESC>u:set paste<CR>.:set nopaste<CR>gi


Sponsored by: Labrat Technology -- Need Consulting Services? Programming, Maintenance, Security, Database Analysis & Design, Hosting -- we do it all!
Copyright 2005 Robert Melton
Send questions and comments to
Last updated March 10th, 2005