开发者

I have a vim config. However, when I paste text

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  :tab开发者_开发百科l
map  :tabp
map  :tabn
filetype indent on
filetype on
filetype plugin on


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.


for 2. :set nopaste


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜