Yuan Yijun (bbbush) wrote,
Yuan Yijun
bbbush

我爱 rst

更爱 vim
1 set nu ci is
2 augroup rst
3 "     autocmd Syntax rst execute "map <F5> <Esc><Esc>:w<CR>:!rst2html " . expand("<afile>") . " > 
" . expand("<afile>:r") . ".html<CR>"
4     autocmd Syntax rst map <F5> <Esc><Esc>:w<CR>:!rst2html % > %:r.html<CR>
5 augroup END
6 



:source /usr/share/vim/vim70/syntax/2html.vim


不过到现在才被迫学了这样一句命令,可见所谓真心的爱,也不过如此。啊,我爱她,但是她不会喜欢我。

一份比较全的 vimrc 在这里
http://amix.dk/vim/vimrc.html


windows 下面,我用这份 _vimrc, 忘了出处了。

colorscheme darkblue
set lines=40
set columns=150
set nu ci

" http://www.lidaibin.com/blog/index.php?action=show&id=44
" multi-encoding setting
if has("multi_byte")
  "set bomb
  set fileencodings=ucs-bom,utf-8,cp936,big5,euc-jp,euc-kr,latin1
  " CJK environment detection and corresponding setting
  if v:lang =~ "^zh_CN"
    " Use cp936 to support GBK, euc-cn == gb2312
    set encoding=cp936
    set termencoding=cp936
    set fileencoding=cp936
  elseif v:lang =~ "^zh_TW"
    " cp950, big5 or euc-tw
    " Are they equal to each other?
    set encoding=big5
    set termencoding=big5
    set fileencoding=big5
  elseif v:lang =~ "^ko"
    " Copied from someone's dotfile, untested
    set encoding=euc-kr
    set termencoding=euc-kr
    set fileencoding=euc-kr
  elseif v:lang =~ "^ja_JP"
    " Copied from someone's dotfile, untested
    set encoding=euc-jp
    set termencoding=euc-jp
    set fileencoding=euc-jp
  endif
  " Detect UTF-8 locale, and replace CJK setting if needed
  if v:lang =~ "utf8$" || v:lang =~ "UTF-8$"
    set encoding=utf-8
    set termencoding=utf-8
    set fileencoding=utf-8
  endif
else
  echoerr "Sorry, this version of (g)vim was not compiled with multi_byte"
endif

Tags: 小东西
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments