tags:

views:

187

answers:

3

I do "set:paste"

That will allow me to paste text into putty very nicely.

However, my "smart indents" and 'auto tabbing' --which is in my original config..is gone!?

How do I make it so that

  1. I don't have to do "set: paste" everytime I want to paste something and
  2. if I do have to do that...I can easily go back to normal config?
set nohlsearch
set ai
set bg=dark
set showmatch
highlight SpecialKey ctermfg=DarkGray
set listchars=tab:>-,trail:~
set list
autocmd BufEnter,BufRead *.py set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
set smartindent
syntax on
set listchars=tab:>-
set listchars+=trail:.
set ignorecase
set smartcase
map  :tabr
map  :tabl
map  :tabp
map  :tabn
filetype indent on
filetype on
filetype plugin on
+2  A: 

for 2. :set nopaste

skeept
or you can toggle using `:set paste!`
rampion
+3  A: 

You might want to:

set pastetoggle=<F6>

With this you can change paste status with F6 (you can of course bind it to anything you want.

depesz
A: 

If you can use any of the graphical versions of vim (eg gvim, macvim) then they usually have support for copy and paste that doesn't require :set paste.

Peter
I usually do "vim filename" . But when I paste it becomes like a pyramid..?
TIMEX
it sounds like you're using the terminal-based version of vim. you need gvim or macvim to make this work.
Peter