vim配置

(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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值