(1)打開vim的配置文件
(2)把下面程序粘貼進去
syntax on
set nocompatible
set incsearch
set ignorecase smartcase
set tabstop=4 "Indentation levels every 4 columns
set autoindent "Preserve current indent on new lines
set backspace=indent,eol,start "Make backspaces delete sensibly
set expandtab "Convert all tabs typed into spaces
set shiftwidth=4 "Indent/outdent by 4 columns
set shiftround "Indent/outdent to nearest tabstop
set history=100
set ruler
set hlsearch
set number
vnoremap <silent> # :s#^#\##<cr>:noh<cr>
vnoremap <silent> -# :s#^\###<cr>:noh<cr>
set background=dark
if has("autocmd")
" Enable file type detection.
" Use the default filetype settings, so that mail gets 'tw' set to 72,
" 'cindent' is on in C files, etc.
" Also load indent files, to automatically do language-dependent indenting.
filetype plugin indent on
" ...
endif
" restore cursor position
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
" set executable permissions for sh/py/pl
"au BufWritePost *.sh :!chmod a+x <afile>
"au BufWritePost *.py :!chmod a+x <afile>
"au BufWritePost *.pl :!chmod a+x <afile>
" gracefully paste
nnoremap <F2>: set invpaste paste?<Enter>
imap <F2> <C-O><F2>
set pastetoggle=<F2>
" highlight tailing white spaces
" set list listchars=trail:
highlight SpecialKey ctermfg=DarkGray ctermbg=yellow
"set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set fileencodings=utf-8
au FileType python set formatprg=/opt/bin/pyindent.py
noremap <F11> gggqG
" Pathogen load
filetype off
"Change python mode leader
"let mapleader = ","
let g:pymode = 1
let g:pymode_rope = 1
let mapleader = ","
let g:pymode_options_max_line_length = 79
let g:pymode_rope_completion_bind = '<C-P>'
let g:pymode_folding = 0
filetype plugin indent on
syntax on
(3)重啓xshell或者scureCRT