How can I keep the code formated as original source when I paste them to vim?

Posted by SpawnST on Super User See other posts from Super User or by SpawnST
Published on 2010-04-26T04:02:13Z Indexed on 2010/04/26 4:03 UTC
Read the original article Hit count: 305

Filed under:
|
|

When I copy some code from webpages and paste it to VIM,I find it becomes a mess style like a ladder as follows

xxxxxx
   xxxxxx
      xxxxxx
         xxxxxxxxxx

Since it messed so regularly so I think maybe there's something wrong with my .vimrc which is as below:

set number
set nocompatible
set nowritebackup
set noswapfile
syntax on
filetype indent on
filetype plugin on
filetype on
set background=light
set autoindent
set smartindent
set tabstop=4
set shiftwidth=4
set showmatch
set guioptions=T
set fileencodings=utf-8,prc
set ruler
set incsearch
map gs :%s
set t_Co=256
:colorscheme evening
filetype plugin indent on

Usually I write python in VIM.And help would be appreciated.

© Super User or respective owner

Related posts about vim

Related posts about format