.vimrc

2009-05-13 04:45:00来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

" vim:shiftwidth=2:tabstop=8:expandtab
if has('autocmd')
  " Remove ALL autocommands for the current group
  au!
  " Mark .asm files MASM-type assembly
  au BufNewFile,BufReadPre *.asm let b:asmsyntax='masm'
endif
if has('gui_running')
  let do_syntax_sel_menu=1
endif
if has('gui_running') && $LANG !~ '\.'
  set encoding=utf-8
endif
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
set autoindent
set nobackup
set showmatch
set formatoptions+=mM
set fileencodings=ucs-bom,utf-8,gbk
set statusline=% 601
  if v:lang =~? '^\(zh\)\|\(ja\)\|\(ko\)'
    set ambiwidth=double
  endif
endif
" Key mappings to ease browsing long lines
noremap         gj
noremap         gk
noremap        gj
noremap          gk
inoremap  gj
inoremap    gk
" Key mappings for quick arithmetic inside Vim
nnoremap  ma yypV:!calcu '"'k$
vnoremap  ma yopV:!calcu '"'k$
nnoremap  mr yyV:!calcu '"'$
vnoremap  mr ygvmaomb:r !calcu '"'"ay$dd`bv`a"ap
" Key mapping to stop the search highlight
nmap        :nohlsearch
imap   :nohlsearch
" Key mapping for the taglist.vim plugin
nmap       :Tlist
imap  :Tlist
" Key mappings for the quickfix commands
nmap  :cn
nmap  :cp
" Non-GUI setting
if !has('gui_running')
  " Do not increase the windows width in the taglist.vim plugin
  if has('eval')
    let Tlist_Inc_Winwidth=0
  endif
  " Set text-mode menu
  if has('wildmenu')
    set wildmenu
    set cpoptions-=
    nmap       :emenu
    imap  :emenu
  endif
endif
if has('autocmd')
  function! SetFileEncodings(encodings)
    let b:my_fileencodings_bak=&fileencodings
    let &fileencodings=a:encodings
  endfunction
  function! RestoreFileEncodings()
    let &fileencodings=b:my_fileencodings_bak
    unlet b:my_fileencodings_bak
  endfunction
  function! CheckFileEncoding()
    if &modified && &fileencoding != ''
      exec 'e! ++enc=' . &fileencoding
    endif
  endfunction
  function! ConvertHtmlEncoding(encoding)

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:FreeBSD下构建安全的Web服务器(4)

下一篇:ipf ipnat