锘??xml version="1.0" encoding="utf-8" standalone="yes"?>午夜欧美大尺度福利影院在线看,亚洲欧美欧美一区二区三区,伊人成人网在线看http://www.shnenglu.com/liu1061/category/5738.html鐢熸椿鍜屽伐浣滈兘瑕佸厖婊℃縺鎯?鍚﹀垯浣犳棤娉曚綋浼氬埌娣嬫紦灝借嚧鐨勫揩涔愪笌鐥涜嫤zh-cnWed, 22 Oct 2008 14:31:59 GMTWed, 22 Oct 2008 14:31:59 GMT60VIM 鍑芥暟璺寵漿蹇敭 鏉ヨ嚜FLWhttp://www.shnenglu.com/liu1061/articles/64700.htmlT.S LiuT.S LiuWed, 22 Oct 2008 08:13:00 GMThttp://www.shnenglu.com/liu1061/articles/64700.htmlhttp://www.shnenglu.com/liu1061/comments/64700.htmlhttp://www.shnenglu.com/liu1061/articles/64700.html#Feedback0http://www.shnenglu.com/liu1061/comments/commentRss/64700.htmlhttp://www.shnenglu.com/liu1061/services/trackbacks/64700.html[[
]]
[]
鍐嶅姞涓?br>][
涓鍏辨槸 4 涓湪孌佃惤錛堝浜?C 鏉ヨ灝辨槸鍑芥暟錛夐棿璺寵漿鐨勫懡浠ゃ?br>
鎬葷粨鏄細
1錛岀浉鍚屽氨璺沖埌鍑芥暟鐨勫紑澶達細錛堝鏋滈兘鏄乏鎷彿鎴栬呴兘鏄彸鎷彿錛夛紝涓嶅悓灝辮煩鍒板嚱鏁扮殑緇撳熬錛?br>     { 鍜?} 鐢ㄦ潵璺沖埌鍑芥暟鐨勫紑澶淬?br>     [] 鍜?][ 鐢ㄦ潵璺沖埌鍑芥暟鐨勭粨灝俱?br>2錛屽乏鍙沖乏鍙籌紝“宸?#8221;鍦ㄥ墠闈€傚墠鍚庡墠鍚庯紝“鍓?#8221;涔熷湪鍓嶉潰銆傚洜姝ゅ乏鎷彿鎵撳ご鍒欒〃紺哄悜鍓嶏紝鍙蟲嫭鍙鋒墦澶村垯琛ㄧず鍚戝悗錛?br>     [[ 鍜?[] 鐢ㄦ潵鍚戝墠璺?br>     ]] 鍜?][ 鐢ㄦ潵鍚戝悗璺?br>
緇撳悎璧鋒潵灝辨槸錛?br>[[ 鐢ㄦ潵璺沖埌鍏夋爣鍓嶉潰鐨勪竴涓嚱鏁板紑濮嬪銆傚鏋滃厜鏍囧湪鍑芥暟浣撳唴鐨勮瘽錛岄偅灝辨槸鎵鍦ㄥ嚱鏁扮殑寮濮嬪銆?br>][ 鐢ㄦ潵璺沖埌鍏夋爣鍚庨潰鐨勪竴涓嚱鏁扮粨灝懼銆傚鏋滃厜鏍囧湪鍑芥暟浣撳唴鐨勮瘽錛岄偅灝辨槸鎵鍦ㄥ嚱鏁扮殑緇撳熬澶勩?br>]] 鐢ㄦ潵璺沖埌鍏夋爣鍚庨潰鐨勪竴涓嚱鏁板紑濮嬪銆傚鏋滃厜鏍囧湪鍑芥暟浣撳唴鐨勮瘽錛岄偅灝辨槸涓嬩竴涓嚱鏁扮殑寮濮嬪銆?br>[] 鐢ㄦ潵璺沖埌鍏夋爣鍓嶉潰鐨勪竴涓嚱鏁扮粨灝懼銆傚鏋滃厜鏍囧湪鍑芥暟浣撳唴鐨勮瘽錛岄偅灝辨槸涓婁竴涓嚱鏁扮殑緇撳熬澶勩?

1錛屽厛鎯蟲槸鎯沖線鍓嶈煩錛岃繕鏄線鍚庤煩錛?br>濡傛灉鏄兂寰鍓嶏紝灝辨憗 [錛屽鏋滄槸鎯沖線鍚庯紝灝辨憗 ]錛岀劧鍚庢寚澶村埆鏉懼紑銆?br>2錛屽啀鎯蟲槸鎯沖埌寮濮嬪錛岃繕鏄粨灝懼錛?br>濡傛灉鏄紑濮嬪錛屽氨鍐嶆憗涓涓嬨傚鏋滄槸緇撳熬澶勶紝灝辨憗鍙︿竴涓敭銆?

T.S Liu 2008-10-22 16:13 鍙戣〃璇勮
]]>
_vimrc (杞?http://www.shnenglu.com/liu1061/articles/62349.htmlT.S LiuT.S LiuSat, 20 Sep 2008 06:28:00 GMThttp://www.shnenglu.com/liu1061/articles/62349.htmlhttp://www.shnenglu.com/liu1061/comments/62349.htmlhttp://www.shnenglu.com/liu1061/articles/62349.html#Feedback0http://www.shnenglu.com/liu1061/comments/commentRss/62349.htmlhttp://www.shnenglu.com/liu1061/services/trackbacks/62349.html" 涓鑸瀹?
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 璁懼畾榛樿瑙g爜
set fenc=utf-8
set fencs=utf-8,usc-bom,euc-jp,gb18030,gbk,gb2312,cp936

" 涓嶈浣跨敤vi鐨勯敭鐩樻ā寮忥紝鑰屾槸vim鑷繁鐨?
set nocompatible

" history鏂囦歡涓渶瑕佽褰曠殑琛屾暟
set history=100

" 鍦ㄥ鐞嗘湭淇濆瓨鎴栧彧璇繪枃浠剁殑鏃跺欙紝寮瑰嚭紜
set confirm

" 涓巜indows鍏變韓鍓創鏉?
set clipboard+=unnamed

" 渚︽祴鏂囦歡綾誨瀷
filetype on

" 杞藉叆鏂囦歡綾誨瀷鎻掍歡
filetype plugin on

" 涓虹壒瀹氭枃浠剁被鍨嬭澆鍏ョ浉鍏崇緝榪涙枃浠?
filetype indent on

" 淇濆瓨鍏ㄥ眬鍙橀噺
set viminfo+=!

" 甯︽湁濡備笅絎﹀彿鐨勫崟璇嶄笉瑕佽鎹㈣鍒嗗壊
set iskeyword+=_,$,@,%,#,-

" 璇硶楂樹寒
syntax on

" 楂樹寒瀛楃錛岃鍏朵笉鍙?00鍒楅檺鍒?
:highlight OverLength ctermbg=red ctermfg=white guibg=red guifg=white
:match OverLength '\%101v.*'

" 鐘舵佽棰滆壊
highlight StatusLine guifg=SlateBlue guibg=Yellow
highlight StatusLineNC guifg=Gray guibg=White

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 鏂囦歡璁劇疆
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 涓嶈澶囦喚鏂囦歡錛堟牴鎹嚜宸遍渶瑕佸彇鑸嶏級
set nobackup

" 涓嶈鐢熸垚swap鏂囦歡錛屽綋buffer琚涪寮冪殑鏃跺欓殣钘忓畠
setlocal noswapfile
set bufhidden=hide

" 瀛楃闂存彃鍏ョ殑鍍忕礌琛屾暟鐩?
set linespace=0

" 澧炲己妯″紡涓殑鍛戒護琛岃嚜鍔ㄥ畬鎴愭搷浣?
set wildmenu

" 鍦ㄧ姸鎬佽涓婃樉紺哄厜鏍囨墍鍦ㄤ綅緗殑琛屽彿鍜屽垪鍙?
set ruler
set rulerformat=%20(%2*%<%f%=\ %m%r\ %3l\ %c\ %p%%%)

" 鍛戒護琛岋紙鍦ㄧ姸鎬佽涓嬶級鐨勯珮搴︼紝榛樿涓?錛岃繖閲屾槸2
set cmdheight=2

" 浣垮洖鏍奸敭錛坆ackspace錛夋甯稿鐞唅ndent, eol, start絳?
set backspace=2

" 鍏佽backspace鍜屽厜鏍囬敭璺ㄨ秺琛岃竟鐣?
set whichwrap+=<,>,h,l

" 鍙互鍦╞uffer鐨勪換浣曞湴鏂逛嬌鐢ㄩ紶鏍囷紙綾諱技office涓湪宸ヤ綔鍖哄弻鍑婚紶鏍囧畾浣嶏級
set mouse=a
set selection=exclusive
set selectmode=mouse,key

" 鍚姩鐨勬椂鍊欎笉鏄劇ず閭d釜鎻村姪绱㈤┈閲屽効绔ョ殑鎻愮ず
set shortmess=atI

" 閫氳繃浣跨敤: commands鍛戒護錛屽憡璇夋垜浠枃浠剁殑鍝竴琛岃鏀瑰彉榪?
set report=0

" 涓嶈vim鍙戝嚭璁ㄥ帉鐨勬淮婊村0
set noerrorbells

" 鍦ㄨ鍒嗗壊鐨勭獥鍙i棿鏄劇ず絀虹櫧錛屼究浜庨槄璇?
set fillchars=vert:\ ,stl:\ ,stlnc:\

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 鎼滅儲鍜屽尮閰?
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 楂樹寒鏄劇ず鍖歸厤鐨勬嫭鍙?
set showmatch

" 鍖歸厤鎷彿楂樹寒鐨勬椂闂達紙鍗曚綅鏄崄鍒嗕箣涓縐掞級
set matchtime=5

" 鍦ㄦ悳绱㈢殑鏃跺欏拷鐣ュぇ灝忓啓
set ignorecase

" 涓嶈楂樹寒琚悳绱㈢殑鍙ュ瓙錛坧hrases錛?
set nohlsearch

" 鍦ㄦ悳绱㈡椂錛岃緭鍏ョ殑璇嶅彞鐨勯愬瓧絎﹂珮浜紙綾諱技firefox鐨勬悳绱級
set incsearch

" 杈撳叆:set list鍛戒護鏄簲璇ユ樉紺轟簺鍟ワ紵
set listchars=tab:\|\ ,trail:.,extends:>,precedes:<,eol:$

" 鍏夋爣縐誨姩鍒癰uffer鐨勯《閮ㄥ拰搴曢儴鏃朵繚鎸?琛岃窛紱?
set scrolloff=3

" 涓嶈闂儊
set novisualbell

" 鎴戠殑鐘舵佽鏄劇ず鐨勫唴瀹癸紙鍖呮嫭鏂囦歡綾誨瀷鍜岃В鐮侊級
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [POS=%l,%v][%p%%]\ %{strftime(\"%d/%m/%y\ -\ %H:%M\")}

" 鎬繪槸鏄劇ず鐘舵佽
set laststatus=2

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 鏂囨湰鏍煎紡鍜屾帓鐗?
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 鑷姩鏍煎紡鍖?
set formatoptions=tcrqn

" 緇ф壙鍓嶄竴琛岀殑緙╄繘鏂瑰紡錛岀壒鍒傜敤浜庡琛屾敞閲?
"set autoindent

" 涓篊紼嬪簭鎻愪緵鑷姩緙╄繘
set smartindent

" 浣跨敤C鏍峰紡鐨勭緝榪?
set cindent

" 鍒惰〃絎︿負4
set tabstop=4

" 緇熶竴緙╄繘涓?
set softtabstop=4
set shiftwidth=4

" 涓嶈鐢ㄧ┖鏍間唬鏇垮埗琛ㄧ
set noexpandtab

" 涓嶈鎹㈣
set nowrap

" 鍦ㄨ鍜屾寮濮嬪浣跨敤鍒惰〃絎?
set smarttab

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" CTags鐨勮瀹?
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 鎸夌収鍚嶇О鎺掑簭
let Tlist_Sort_Type = "name"

" 鍦ㄥ彸渚ф樉紺虹獥鍙?
let Tlist_Use_Right_Window = 1

" 鍘嬬緝鏂瑰紡
let Tlist_Compart_Format = 1

" 濡傛灉鍙湁涓涓猙uffer錛宬ill紿楀彛涔焝ill鎺塨uffer
let Tlist_Exist_OnlyWindow = 1

" 涓嶈鍏抽棴鍏朵粬鏂囦歡鐨則ags
let Tlist_File_Fold_Auto_Close = 0

" 涓嶈鏄劇ず鎶樺彔鏍?
let Tlist_Enable_Fold_Column = 0

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Autocommands
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 鍙湪涓嬪垪鏂囦歡綾誨瀷琚睛嫻嬪埌鐨勬椂鍊欐樉紺鴻鍙鳳紝鏅氭枃鏈枃浠朵笉鏄劇ず

if has("autocmd")
   autocmd FileType xml,html,c,cs,java,perl,shell,bash,cpp,python,vim,php,ruby set number
   autocmd FileType xml,html vmap <C-o> <ESC>'<i<!--<ESC>o<ESC>'>o-->
   autocmd FileType java,c,cpp,cs vmap <C-o> <ESC>'<o/*<ESC>'>o*/
   autocmd FileType html,text,php,vim,c,java,xml,bash,shell,perl,python setlocal textwidth=100
   autocmd Filetype html,xml,xsl source $VIMRUNTIME/plugin/closetag.vim
   autocmd BufReadPost *
      \ if line("'\"") > 0 && line("'\"") <= line("$") |
      \   exe "normal g`\"" |
      \ endif
endif " has("autocmd")

" F5緙栬瘧鍜岃繍琛孋紼嬪簭錛孎6緙栬瘧鍜岃繍琛孋++紼嬪簭
" 璇鋒敞鎰忥紝涓嬭堪浠g爜鍦╳indows涓嬩嬌鐢ㄤ細鎶ラ敊
" 闇瑕佸幓鎺?/榪欎袱涓瓧絎?

" C鐨勭紪璇戝拰榪愯
map <F5> :call CompileRunGcc()<CR>
func! CompileRunGcc()
exec "w"
exec "!gcc % -o %<"
exec "! ./%<"
endfunc

" C++鐨勭紪璇戝拰榪愯
map <F6> :call CompileRunGpp()<CR>
func! CompileRunGpp()
exec "w"
exec "!g++ % -o %<"
exec "! ./%<"
endfunc

" 鑳藉婕備寒鍦版樉紺?NFO鏂囦歡
set encoding=utf-8
function! SetFileEncodings(encodings)
    let b:myfileencodingsbak=&fileencodings
    let &fileencodings=a:encodings
endfunction
function! RestoreFileEncodings()
    let &fileencodings=b:myfileencodingsbak
    unlet b:myfileencodingsbak
endfunction

au BufReadPre *.nfo call SetFileEncodings('cp437')|set ambiwidth=single
au BufReadPost *.nfo call RestoreFileEncodings()

" 楂樹寒鏄劇ず鏅歵xt鏂囦歡錛堥渶瑕乼xt.vim鑴氭湰錛?
au BufRead,BufNewFile *  setfiletype txt

" 鐢ㄧ┖鏍奸敭鏉ュ紑鍏蟲姌鍙?
set foldenable
set foldmethod=manual
nnoremap <space> @=((foldclosed(line('.')) < 0) ? 'zc' : 'zo')<CR>

" minibufexpl鎻掍歡鐨勪竴鑸緗?
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1


T.S Liu 2008-09-20 14:28 鍙戣〃璇勮
]]>
ctags涓枃鎵嬪唽!(杞?http://www.shnenglu.com/liu1061/articles/55056.htmlT.S LiuT.S LiuTue, 01 Jul 2008 08:49:00 GMThttp://www.shnenglu.com/liu1061/articles/55056.htmlhttp://www.shnenglu.com/liu1061/comments/55056.htmlhttp://www.shnenglu.com/liu1061/articles/55056.html#Feedback0http://www.shnenglu.com/liu1061/comments/commentRss/55056.htmlhttp://www.shnenglu.com/liu1061/services/trackbacks/55056.html闃呰鍏ㄦ枃

T.S Liu 2008-07-01 16:49 鍙戣〃璇勮
]]>
鏈浣硋im鎶宸?/title><link>http://www.shnenglu.com/liu1061/articles/54940.html</link><dc:creator>T.S Liu</dc:creator><author>T.S Liu</author><pubDate>Mon, 30 Jun 2008 02:34:00 GMT</pubDate><guid>http://www.shnenglu.com/liu1061/articles/54940.html</guid><wfw:comment>http://www.shnenglu.com/liu1061/comments/54940.html</wfw:comment><comments>http://www.shnenglu.com/liu1061/articles/54940.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/liu1061/comments/commentRss/54940.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/liu1061/services/trackbacks/54940.html</trackback:ping><description><![CDATA[鍘熶綔鑰咃細d.j.rayner (zzapper)<br>緲昏瘧錛歨misty (<a href="mailto: <script%20language="javascript'%20type='text/javascript'>%20<!--%20var%20prefix%20=%20'ma'%20+%20'il'%20+%20'to';%20var%20path%20=%20'hr'%20+%20'ef'%20+%20'=';%20var%20addy31103%20=%20'lqy99'%20+%20'@';%20addy31103%20=%20addy31103%20+%20'mails'%20+%20'.'%20+%20'tsinghua'%20+%20'.'%20+%20'edu'%20+%20'.'%20+%20'cn';%20document.write(%20'<a%20'%20+%20path%20+%20'/''%20+%20prefix%20+%20':'%20+%20addy31103%20+%20'/'>'%20);%20document.write(%20addy31103%20);%20document.write(%20'<//a>'%20);%20//-->%20</script> <noscript>%20姝ら偖浠跺湴鍧鍙梥pam%20bots淇濇姢錛岄渶瑕佷嬌鐢?20Javascript%20鍔熻兘鏉ユ煡闃呫?/noscript>"> <script language=JavaScript type=text/javascript><!-- var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy31103 = 'lqy99' + '@'; addy31103 = addy31103 + 'mails' + '.' + 'tsinghua' + '.' + 'edu' + '.' + 'cn'; document.write( '<a ' + path + '\'' + prefix + ':' + addy31103 + '\'>' ); document.write( addy31103 ); document.write( '<\/a>' ); //--></script> <font color=#56662d></font><a href="mailto:lqy99@mails.tsinghua.edu.cn"><font color=#56662d>lqy99@mails.tsinghua.edu.cn</font></a><a href="mailto:lqy99@mails.tsinghua.edu.cn"><font color=#56662d>lqy99@mails.tsinghua.edu.cn</font></a><noscript> 姝ら偖浠跺湴鍧鍙梥pam bots淇濇姢錛岄渶瑕佷嬌鐢?Javascript 鍔熻兘鏉ユ煡闃呫? </noscript></a>)<br>2003-3-23 <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">[杞創]鏈浣硋im鎶宸?br>鏂囦歡鍘熺綉鍧錛?BBS 姘存湪娓呭崕绔?smth.org<br>--------------------------------------------------------------------------------<br> <br> <br>鍘熶綔鑰咃細d.j.rayner (zzapper)<br>緲昏瘧錛歨misty (<a href="mailto: <script%20language="javascript'%20type='text/javascript'>%20<!--%20var%20prefix%20=%20'ma'%20+%20'il'%20+%20'to';%20var%20path%20=%20'hr'%20+%20'ef'%20+%20'=';%20var%20addy31103%20=%20'lqy99'%20+%20'@';%20addy31103%20=%20addy31103%20+%20'mails'%20+%20'.'%20+%20'tsinghua'%20+%20'.'%20+%20'edu'%20+%20'.'%20+%20'cn';%20document.write(%20'<a%20'%20+%20path%20+%20'/''%20+%20prefix%20+%20':'%20+%20addy31103%20+%20'/'>'%20);%20document.write(%20addy31103%20);%20document.write(%20'<//a>'%20);%20//-->%20</script> <noscript>%20姝ら偖浠跺湴鍧鍙梥pam%20bots淇濇姢錛岄渶瑕佷嬌鐢?20Javascript%20鍔熻兘鏉ユ煡闃呫?/noscript>"> <script language=JavaScript type=text/javascript><!-- var prefix = 'ma' + 'il' + 'to'; var path = 'hr' + 'ef' + '='; var addy31103 = 'lqy99' + '@'; addy31103 = addy31103 + 'mails' + '.' + 'tsinghua' + '.' + 'edu' + '.' + 'cn'; document.write( '<a ' + path + '\'' + prefix + ':' + addy31103 + '\'>' ); document.write( addy31103 ); document.write( '<\/a>' ); //--></script> <font color=#56662d></font><a href="mailto:lqy99@mails.tsinghua.edu.cn"><font color=#56662d>lqy99@mails.tsinghua.edu.cn</font></a><a href="mailto:lqy99@mails.tsinghua.edu.cn"><font color=#56662d>lqy99@mails.tsinghua.edu.cn</font></a><noscript> 姝ら偖浠跺湴鍧鍙梥pam bots淇濇姢錛岄渶瑕佷嬌鐢?Javascript 鍔熻兘鏉ユ煡闃呫? </noscript></a>)<br>2003-3-23</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 鏈浣硋im鎶宸?br>----------------------------------------<br># 淇℃伅鏉ユ簮<br>----------------------------------------<br><a rel=nofollow><font color=#56662d>www.vim.org</font></a> : 瀹樻柟绔欑偣<br>comp.editors : 鏂伴椈緇?br><a rel=nofollow><font color=#56662d>http://www.newriders.com/books/opl/ebooks/0735710015.html</font></a> : Vim涔︾睄<br><a rel=nofollow><font color=#56662d>http://vimdoc.sourceforge.net/cgi-bin/vim2html2.pl</font></a> : 鍏充簬vim鐨勫彲鏌ヨ鏂囨。<br><a rel=nofollow><font color=#56662d>http://vimdoc.sourceforge.net/vimfaq.html</font></a> : VIM FAQ<br>----------------------------------------<br># 鍩虹<br>----------------------------------------<br>* # g* g# : 瀵繪壘鍏夋爣澶勭殑鐙箟鍗曡瘝(<cword>) (鍓嶅悜/鍚庡悜)<br>% : 鎷彿閰嶅瀵繪壘 {}[]()<br>matchit.vim : 浣垮緱 % 鑳藉閰嶅鏍囪  <br><script> <?php 絳夌瓑<br><C-N><C-P> : 鎻掑叆妯″紡涓嬬殑鍗曡瘝鑷姩瀹屾垚<br><C-X><C-L> : 琛岃嚜鍔ㄥ畬鎴?瓚呯駭鏈夌敤)<br>/<C-R><C-W> : 鎶婄嫮涔夊崟璇?<cword> 鍐欏埌 鎼滅儲鍛戒護 琛?br>/<C-R><C-A> : 鎶婂箍涔夊崟璇?<cWORD> 鍐欏埌 鎼滅儲鍛戒護 琛?br>:set ignorecase : 鎼滅儲鏃跺拷鐣ュぇ灝忓啓<br>:syntax on : 鍦?Perl,HTML,PHP 絳変腑榪涜璇硶鐫鑹?br>:h regexp<C-D> : 鎸変笅 control-D 閿嵆鍙緱鍒板寘鍚湁 regexp 鐨勫府鍔╀富棰樼殑鍒楄〃<br>: (浣跨敤TAB鍙互瀹炵幇甯姪鐨勮嚜鍔ㄨˉ榻?<br>----------------------------------------<br># 浣挎洿鏂?_vimrc 鏇村鏄?br>:nmap ,s :source $VIM/_vimrc<br># 璇戦噴錛歯map 鏄粦瀹氫竴涓湪normal妯″紡涓嬬殑蹇嵎閿?br>:nmap ,v :e $VIM/_vimrc<br># 璇戦噴錛氬湪normal妯″紡涓嬶紝鍏堝悗鎸変笅 ,s 涓や釜閿墽琛宊vimrc錛岃?,v 鍒欐槸緙栬緫_vimrc<br>----------------------------------------<br># visual 妯″紡 (渚嬪瓙鏄細杞繪澗娣誨姞鍏跺畠鐨?HTML Tags)<br>:vmap sb "zdi<C-R>z<ESC> :鍦╲isual妯″紡涓嬮変腑鐨勬枃瀛楀墠鍚庡垎鍒姞涓婂拰<br># 璇戦噴錛歷map 鏄粦瀹氫竴涓湪visual妯″紡涓嬬殑蹇嵎閿?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 璇戦噴錛氬師鐞嗭細鍦╲isual妯″紡涓嬶紝"zd 鎶婁竴涓変腑鐨勫尯鍩熷懡鍚嶄負z 鐒跺悗鍒犻櫎錛?br># i 榪涘叆鎻掑叆妯″紡錛岃緭鍏ワ紝<C-R>z 鎾ら攢鍒氭墠鐨勫垹闄?鐒跺悗鍐嶅啓鍏ワ紝<br># 鏈鍚?lt;ESC>榪斿洖normal妯″紡</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 璇戦噴錛?z 鍛戒護鍒涘緩涓涓変腑鐨勫尯鍩熶負register錛屽茍鎶婂畠鍛藉悕涓簔</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 璇戦噴錛氭洿浠や漢寮蹇冪殑鏈夛細鍦╲isual妯″紡涓嬮変腑鍑犺錛岀劧鍚庤緭鍏?2> ,<br># 鍒欓変腑鐨勮浼氬叏閮ㄧ緝榪涗袱涓猼ab<br># 555,鍋朵竴寮濮嬭繕鏄敤 :xx,xx s/^/\t\t/錛屽ソ鍌誨晩錛?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:vmap st "zdi<?= <C-R>z ?><ESC> :鍦╲isual妯″紡涓嬮変腑鐨勬枃瀛楀墠鍚庡垎鍒姞涓?lt;?= 鍜??><br>----------------------------------------<br># 鏂囦歡嫻忚<br>:Ex : 寮鍚洰褰曟祻瑙堝櫒錛屾敞鎰忛瀛楁瘝E鏄ぇ鍐欑殑<br>:Sex : 鍦ㄤ竴涓垎鍓茬殑紿楀彛涓紑鍚洰褰曟祻瑙堝櫒<br>:ls : 鏄劇ず褰撳墠buffer鐨勬儏鍐?br>:cd .. : 榪涘叆鐖剁洰褰?br>:args : 鏄劇ず鐩墠鎵撳紑鐨勬枃浠?br>:lcd %:p:h : 鏇存敼鍒板綋鍓嶆枃浠舵墍鍦ㄧ殑鐩綍<br># 璇戦噴錛歭cd鏄揣绱ф敼鍙樺綋鍓嶇獥鍙g殑宸ヤ綔璺緞錛? 鏄唬琛ㄥ綋鍓嶆枃浠剁殑鏂囦歡鍚?<br># 鍔犱笂 :p鎵╁睍鎴愬叏鍚嶏紙灝辨槸甯︿簡璺緞錛夛紝鍔犱笂 :h鏋愬彇鍑鴻礬寰?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:autocmd BufEnter * lcd %:p:h : 鑷姩鏇存敼鍒板綋鍓嶆枃浠舵墍鍦ㄧ殑鐩綍<br># 璇戦噴錛歛utocmd鎸囧畾涓涓嚜鍔ㄥ懡浠わ紝BufEnter鎸囧畾涓涓簨浠訛紝* 鎸囧畾浜嬩歡鐨勫璞★紝<br># lcd %:p:h 鎸囧畾涓涓姩浣?br># hehe,濂借薄鍜屽啓璁板彊鏂囧樊涓嶅<br>----------------------------------------<br># 緙撳啿鍖?buffer)嫻忚鍣?(絎笁鏂圭殑涓涓渶嫻佽鐨勮剼鏈?<br># 闇瑕佷笅杞?bufexplorer.vim 錛?a rel=nofollow><font color=#56662d>http://www.vim.org/script.php?script_id=42</font></a> 涓婂氨鏈?br>\be : 鍦ㄧ紦鍐插尯嫻忚鍣ㄤ腑鎵撳紑緙撳啿鍖哄垪琛?br>\bs : 浠ュ垎鍓茬獥鍙g殑褰㈠紡鎵撳紑緙撳啿鍖烘祻瑙堝櫒<br>----------------------------------------<br># 澶у皬鍐欒漿鎹?br>guu : 琛屽皬鍐?br>gUU : 琛屽ぇ鍐?br>g~~ : 琛岀炕杞紙褰撶劧鎸囧ぇ灝忓啓鍟︼級<br># 璇戦噴錛?g 鏄ぇ灝忓啓杞崲鍛戒護(greate)錛寀/U/~鏄笁縐嶈漿鎹㈠艦寮?灝忓啓/澶у啓/緲昏漿)錛?br># 鏈鍚庝竴涓噸澶嶅垯琛ㄧず璇ヨ漿鎹㈡槸瀵逛簬涓琛岃岃█鐨?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">guw : 瀛楀ぇ鍐?鐙箟瀛? 璇戞敞錛氬緩璁姣攊w<br>gUw : 瀛楀皬鍐?鐙箟瀛?<br>g~w : 瀛楃炕杞?鐙箟瀛?<br># 璇戦噴錛氭渶鍚庝竴涓獁 琛ㄧず璇ヨ漿鎹㈡槸瀵逛簬涓涓瓧鑰岃█鐨勶紝鐢變簬鏄湪normal妯″紡涓嬶紝<br># 鎵浠ヨ繖涓獁 琛ㄧず涓涓嫮涔夊瓧<cword> </p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">vEU : 瀛楀ぇ鍐?騫夸箟瀛?<br>vE~ : 瀛楃炕杞?騫夸箟瀛?<br># 璇戦噴錛歷E 榪欎釜鎸囦護緇勫悎浼氳繘鍏isual妯″紡錛岀劧鍚庨夋嫨涓涓箍涔夊瓧<CWORD></p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">ggguG : 鎶婃暣涓枃绔犲叏閮ㄥ皬鍐欙紙ft!bt!錛?br>gf : 鍙栧綋鍓嶅厜鏍囧鐨勫箍涔夊瓧浣滀負鏂囦歡鍚嶏紝鐒跺悗璇曞浘鎵撳紑瀹冿紒<br># 璇戦噴錛氫負浠涔堟槸騫夸箟瀛楀憿錛熷洜涓鴻繖鏍峰彲浠ユ柟渚跨殑鍙栧埌璺緞鍟婏紝鍍?var/www/html/index.htm</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">ga : 鏄劇ず鍏夋爣澶勫瓧絎︾殑ascii,hex,oct,...鏅曡彍鐨勪竴鍫嗚漿鎹?br>ggVGg? : 鐢╮ot13緙栫爜鏁翠釜鏂囦歡錛堟檿錛侊級<br># 璇戦噴錛歡g鍒版枃浠墮琛岄瀛楃錛孷榪涘叆Visual-Line妯″紡錛孏鍒版枃浠舵湯琛岄瀛楃錛?br># 榪欐牱灝遍変腑浜嗘暣綃囨枃绔狅紝鐒跺悗g?灝辨槸鐢╮ot13緙栫爜鏁翠釜鏂囦歡鍟?br># <br># 銆愬叧浜巖ot13鈥斺旇皝璁╄嫳鏂囨槸鍋舵暟涓瓧姣嶅晩銆?br># ROT13 鏄竴縐嶇畝鍗曠殑緙栫爜錛屽畠鎶婂瓧姣嶅垎鎴愬墠鍚庝袱緇勶紝姣忕粍13涓紝緙栫爜鍜岃瘧鐮?br># 鐨勭畻娉曠浉鍚岋紝浠呬粎浜ゆ崲瀛楁瘝鐨勮繖涓や釜閮ㄥ垎錛屽嵆錛歔a..m] --> [n..z] 鍜?[n..z]<br># --> [a..m] 銆?ROT13 鐢ㄧ畝鏄撶殑鎵嬫浣垮緱淇′歡涓嶈兘鐩存帴琚瘑鍒拰闃?br># 璇伙紝涔熶笉浼氳鎼滅儲鍖歸厤紼嬪簭鐢ㄩ氬父鐨勬柟娉曠洿鎺ユ壘鍒般傜粡甯哥敤浜?USENET 涓彂琛ㄤ竴<br># 浜涙敾鍑繪ф垨浠や漢涓嶅揩鐨勮█璁烘垨鏈夌畝鍗曚繚瀵嗛渶瑕佺殑鏂囩珷銆?br># 鐢變簬 ROT13 鏄嚜閫嗙畻娉曪紝鎵浠ワ紝璇戠爜鍜岀紪鐮佹槸鍚屼竴涓繃紼嬨?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"><C-A>,<C-X> : 澧炲姞,鍑忓皯 鍏夋爣澶勭殑鐙箟瀛楁墍琛ㄧず鐨勬暟瀛?br>:錛?浠呬粎鏄垎鍓蹭簡榪欎袱涓懡浠わ紝涓嶆槸鍛戒護鐨勪竴閮ㄥ垎錛?br>: Win32鐨勭敤鎴峰彲鑳介渶瑕侀噸鏂板畾涔変竴涓婥trl-A錛屽懙鍛?br># 璇戞敞錛歡ood guy, 浠や漢涓嶅緱涓嶆兂鍒皃erl鐨勬暟瀛楃涓?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"><C-R>=5*5 : 鎻掑叆25 (榪欐槸涓涓糠浣犺綆楀櫒鑰訛紒)<br>----------------------------------------<br># 濂界帺鐨勪笢涓?br>:h 42 : 涔熷彲浠ヨ闂?<a rel=nofollow><font color=#56662d>http://www.google.com/search?q=42</font></a><br>: 絎竴涓粨鏋滃氨鏄?News. Douglas Adams 1952 - 2001. <br>: Floor 42 extends its deepest sympathies to<br>: the family, friends, and fans of Douglas Adams.<br>:h holy-grail<br>:h!<br>----------------------------------------<br># 鏍囪鍜岀Щ鍔?br>'. : 璺沖埌鏈鍚庝慨鏀圭殑閭d竴琛?(瓚呯駭鏈夌敤)(ft,鎬庝箞鍙堟槸榪欎釜璇勪環)<br>`. : 涓嶄粎璺沖埌鏈鍚庝慨鏀圭殑閭d竴琛岋紝榪樿瀹氫綅鍒頒慨鏀圭偣<br><C-O> : 渚濇娌跨潃浣犵殑璺寵漿璁板綍鍚戝洖璺?(浠庢渶榪戠殑涓嬈″紑濮?<br><C-I> : 渚濇娌跨潃浣犵殑璺寵漿璁板綍鍚戝墠璺?br>:ju(mps) : 鍒楀嚭浣犺煩杞殑瓚寵抗<br>:help jump-motions<br>:history : 鍒楀嚭鍘嗗彶鍛戒護璁板綍<br>:his c : 鍛戒護琛屽懡浠ゅ巻鍙?br>:his s : 鎼滅儲鍛戒護鍘嗗彶<br>q/ : 鎼滅儲鍛戒護鍘嗗彶鐨勭獥鍙?br>q: : 鍛戒護琛屽懡浠ゅ巻鍙茬殑紿楀彛<br>:<C-F> : 鍘嗗彶鍛戒護璁板綍鐨勭獥鍙?br>----------------------------------------<br># 緙╁啓鍜岄敭鐩樻槧鍍?鍘熸枃涓枃浠朵婦渚嬮兘鐢ㄤ簡c:/aaa/x錛屽伓鍏ㄧ粰浠栨敼鎴?path/file浜嗭紝鍝煎敡)<br>:map <f7> :'a,'bw! /path/file<br># 璇戦噴錛歮ap鏄槧鍍忎竴涓猲ormal妯″紡涓嬬殑閿?br># 榪欓噷鏄妸F7閿槧鍍忔垚鎶婃爣璁癮鍒版爣璁癰涓棿鐨勫唴瀹瑰彟瀛樹負涓涓枃浠?path/file<br># 鏍囪(mark)鐨勬柟娉曪細鎶婂厜鏍囩Щ鍔ㄥ埌闇瑕佹爣璁扮殑鍦版柟錛岃緭鍏錛岀劧鍚庤緭鍏ユ爣璁板悕錛屼緥濡俛</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 寮曠敤鏍囪鐨勬柟娉曪細'a 錛屽嵆錛氬崟寮曞彿鍔犳爣璁板悕</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:map <f8> :r /path/file<br># 璇戦噴錛氭妸F8閿槧鍍忔垚鍦ㄥ綋鍓嶄綅緗彃鍏ユ枃浠?path/file鐨勫唴瀹?br>:map <f11> :.w! /path/file2<CR><br># 璇戦噴錛?錛堢偣鍙鳳級琛ㄧず褰撳墠琛?br># 鎵浠11灝辨槸鎶婂綋鍓嶈瀛樹負/path/file2<br># 鏈鍚庣殑<CR>琛ㄧず涓涓洖杞?br>:map <f12> :r /path/file2<CR><br>:ab php : 鍒楀嚭php琛ㄧず鐨勭緝鍐?br># 璇戦噴錛氬畾涔変竴涓緝鍐欎嬌鐢細:iab hm hmisty<br># 涓涓湁瓚g殑鐜拌薄鏄紝瀹冨垪鍑虹殑浼氭槸php鍜屽畠鐨勫墠瀛愪覆寮澶寸殑緙╁啓<br># 渚嬪錛屾湁榪欎箞鍑犱釜緙╁啓錛?br># h => hmisty1 , hm => hmisty2 , hmi => hmisty3, m => hmisty4<br># 閭d箞浣跨敤 :ab hm浼氭樉紺鴻繖涔堝嚑涓緝鍐欙細hm 鍜?h<br># 鑰屼笉鏄綘鎯寵薄涓殑 hm 鍜?hmi</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:map , : 鍒楀嚭浠ラ楀彿寮濮嬬殑閿洏鏄犲儚<br># 璇戦噴錛氫竴鑸岃█錛屾垜浠О榪欎簺閫楀彿寮濮嬬殑緇勫悎閿負銆岄楀彿鍛戒護銆?br># 涓嶈繃hmisty鏇村枩嬈㈢敤;鏋勬垚銆屽垎鍙峰懡浠ゃ?br># 鑰屼笖涓嶆槸鐢╩ap,鑰屾槸鐢╥map<br># 鍥犱負鍋舵噿涔堬紝鎳掑緱鎸?lt;Esc>,鎵浠ョ洿鎺ュ湪insert妯″紡涓嬪氨鎵ц鍛戒護浜?br># 涓轟粈涔堢敤鍒嗗彿鍛紵鍥犱負鎴戞渶甯哥敤瀹冨啓紼嬪簭鍟?br># perl/C/C++/object pascal/java錛岄兘鏄敤鍒嗗彿緇撴潫涓涓鍙?br># 鎴戜滑涓鑸緢灝戝湪鍒嗗彿鍚庨潰榪炵畫鍐欏叾瀹冨瓧絎?br># 鎵浠ョ敤銆屽垎鍙鳳紜鍏跺畠閿嶅氨寰堝皯浼氬湪杈撳叆鐨勬椂鍊欓犳垚鍐茬獊</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 鍦ㄩ敭鐩樻槧鍍忎腑甯哥敤鐨勮〃紺?br><CR> : 鍥炶濺<br><ESC> : Esc<br><LEADER> : 杞箟絎﹀彿 \<br><BAR> : 綆¢亾絎﹀彿 |<br>----------------------------------------<br># 鍒楀嚭瀵勫瓨鍣?Registers)<br>:reg : 鏄劇ず鎵鏈夊綋鍓嶇殑registers<br>"1p : "琛ㄧず寮曠敤register錛?琛ㄧず涓涓悕瀛楀彨鍋?鐨剅egister錛?br>: p灝辨槸綺樿創錛坧aste錛夊懡浠?br># 璇戦噴錛?涔熺敤鏉ュ畾涔塺egister<br># 鍏堣緭鍏?",琛ㄧず瀹氫箟register<br># 鐒跺悗杈撳叆鍚嶅瓧錛屽0~9,a~z<br># 鐒跺悗鎵ц鍒犻櫎鎴栧鍒跺懡浠わ紝濡俤d鎴杫錛?br># 鎴栬呮槸visual妯″紡涓嬬殑d(鍒犻櫎閫変腑鐨勯儴鍒?鎴杫(澶嶅埗閫変腑鐨勯儴鍒?<br># 鍒欒鍒犻櫎鎴栧鍒剁殑閮ㄥ垎灝辮瀛樺叆浜嗚繖涓懡鍚嶇殑register<br>#<br># 瑙傚療錛氫竴涓壒孌婄殑register, "" 錛岄噷闈㈠瓨鍌ㄤ簡涓涓尶鍚嶇殑鍒犻櫎/澶嶅埗<br># 鍦ㄤ綘鎵цdd鎴杫鐨勬椂鍊欙紝琚綔鐢ㄧ殑閮ㄥ垎琚瓨鍒頒簡""涓?br># 榪欎簺鍜宲erl鏄涔堝儚鍟?br>----------------------------------------<br># Useful trick<br>"<a href="mailto:ayy@a"><font color=#56662d>ayy@a</font></a> : 鎶婂綋鍓嶈浣滀負涓涓猇im鍛戒護鏉ユ墽琛?br># 璇戦噴錛?ayy 鏄畾涔夊綋鍓嶈鍒皉egister a錛岀劧鍚嶡a鏄墽琛宺egister a涓瓨鍌ㄧ殑鎸囦護<br># yy: 澶嶅埗涓琛?br># 10yy: 澶嶅埗浠庢鍚戜笅鐨?0琛?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">yy@" : 鐢ㄤ笂闈㈡墍鎻愬埌鐨勯偅涓尶鍚峳egister<br>----------------------------------------<br># 浠庡叾瀹冪▼搴忚幏鍙栬緭鍑?(闇瑕佸閮ㄧ▼搴?<br>:r!ls.exe : 璇誨彇ls鐨勮緭鍑哄埌褰撳墠浣嶇疆<br>!!date : 璇誨彇date鐨勮緭鍑?(浣嗘槸浼氭浛鎹㈠綋鍓嶈鐨勫唴瀹?<br># 璇戦噴錛氬叾瀹炰綘杈撳叆浜?!鍚庯紝vim灝辮嚜鍔ㄨ漿鎹㈠埌 :.! 絳夊緟浣犵戶緇緭鍏?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 浣跨敤澶栭儴紼嬪簭sort榪涜鎺掑簭(sort鏄疷nix鏍囧噯鍛戒護錛宭s,date涔熸槸)<br>:%!sort -u : 浣跨敤sort紼嬪簭鎺掑簭鏁翠釜鏂囦歡錛堢敤緇撴灉閲嶅啓鏂囦歡錛?br># 璇戦噴錛?琛ㄧず鏁翠釜鏂囦歡鐨勬墍鏈夎<br># !sort琛ㄧず鎵ц澶栭儴鍛戒護sort<br># -u鏄痵ort鐨勫弬鏁幫紝man sort鐪嬬湅錛岃繖涓弬鏁扮殑鎰忎箟鏄悎騫剁浉鍚岀殑琛?br># u灝辨槸unique,濡傛灉涓よ鍐呭鐩稿悓錛屽垯緇撴灉涓彧淇濈暀涓琛岀殑璇?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:'a,'b!sort -u : 瀵筸ark a 鍒癿ark b涓棿鐨勫唴瀹硅繘琛屾帓搴?br>!1} sort -u : 鎺掑簭褰撳墠孌佃惤 (鍙兘鍦╪ormal妯″紡涓嬩嬌鐢?!)<br># 璇戦噴錛?琛ㄧず浣跨敤filter錛?}琛ㄧずfilter鐨勫璞℃槸浠庡綋鍓嶈寮濮嬪悜鍚庢暟涓孌?br># 孌佃惤鎸囧埌絀鴻澶勭粨鏉燂紝涓嶅寘鎷┖琛?br># 鍏跺疄浣犱竴鏃﹁緭鍏?!1}錛寁im灝辮嚜鍔ㄨ綆楀綋鍓嶆钀藉簲璇ュ埌閭d竴琛?eg.+5)錛岀劧鍚庣敓鎴?br># :.,.+5! 絳夊緟涔嬪悗杈撳叆sort -u錛屽洖杞︼紝瀹屾垚鎿嶄綔<br># .琛ㄧず褰撳墠琛岋紝.+5褰撶劧灝辨槸褰撳墠琛屽悜鍚庢暟5琛?br>----------------------------------------<br># 澶氭枃妾旀搷浣?(鍩虹)<br># 璇戞敞錛氱敤 :ls! 鍙互鏄劇ず鍑哄綋鍓嶆墍鏈夌殑buffer<br>:bn : 璺寵漿鍒頒笅涓涓猙uffer<br>:bp : 璺寵漿鍒頒笂涓涓猙uffer<br>:wn : 瀛樼洏褰撳墠鏂囦歡騫惰煩杞埌涓嬩竴涓?鍙堟槸銆岃秴綰?.....銆?ft!)<br>:wp : 瀛樼洏褰撳墠鏂囦歡騫惰煩杞埌涓婁竴涓?br>:bd : 鎶婅繖涓枃浠朵粠buffer鍒楄〃涓仛鎺?br>:bun : 鍗告帀buffer (鍏抽棴榪欎釜buffer鐨勭獥鍙d絾鏄笉鎶婂畠浠庡垪琛ㄤ腑鍋氭帀)<br>:badd file.c : 鎶婃枃浠秄ile.c娣誨姞鍒癰uffer鍒楄〃<br>:b 3 : 璺沖埌絎?涓猙uffer<br>:b main : 璺沖埌涓涓悕瀛椾腑鍖呭惈main鐨刡uffer,渚嬪main.c <br>: (ultra錛岃繖涓庝箞緲昏瘧錛?()<br>:sav php.html : 鎶婂綋鍓嶆枃浠跺瓨涓簆hp.html騫舵墦寮php.html<br>:sav! %<.bak : 鎹竴涓悗緙淇濆瓨<br>:e! : 榪斿洖鍒頒慨鏀逛箣鍓嶇殑鏂囦歡(淇敼涔嬪悗娌℃湁瀛樼洏)<br>:w /path/% : 鎶婃枃浠跺瓨鍒頒竴涓湴鍎?br>:e # : 緙栬緫鏍囪涓?鐨刡uffer(榪欎釜buffer蹇呴』鍚湁涓涓彲緙栬緫鐨勬枃浠?<br>: 鐢╨s鍛戒護灝辮兘鐪嬪埌鍝竴涓猙uffer鏈?<br>: %a琛ㄧず褰撳墠姝e湪緙栬緫鐨刡uffer<br>: u 琛ㄧず涓嶈兘緙栬緫鎴栬呭凡緇忚鍋氭帀鐨刡uffer<br>:e #3 : 緙栬緫緙栧彿涓?鐨刡uffer(榪欎釜buffer蹇呴』鍚湁涓涓彲緙栬緫鐨勬枃浠?<br>:rew : 鍥炲埌絎竴涓彲緙栬緫鐨勬枃浠?br>:brew : 鍥炲埌絎竴涓猙uffer<br>:sp fred.txt : 鍦ㄤ竴涓按騫沖垎鍓茬殑紿楀彛涓墦寮鏂囦歡fred.txt<br># 璇戞敞錛歷s fred.txt鍙互瀹炵幇鍨傜洿鍒嗗壊<br>:sball : 鎶婂綋鍓嶆墍鏈夊惈鏈夊彲緙栬緫鏂囦歡鐨刡uffer鏄劇ず鍒頒竴涓垎鍓茬獥鍙d腑<br>: (鍋惰鑰冭檻鎶妔uper緲昏瘧鎴?楂樼駭鎸囦護 浜?ft)<br>:map <F5> :ls<CR>:e # : 鍦╪ormal妯″紡涓嬫寜F5閿紝鍒欎細鏄劇ず鎵鏈夊惈鏈変竴涓?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">: 鍙紪杈戞枃浠剁殑buffer錛岀劧鍚庢彁紺轟綘杈撳叆buffer鐨勫簭鍙鳳紝<br>: 杈撳叆鍚庡洖杞︼紝鍒欑紪杈戣繖涓猙uffer<br># 璇戞敞錛氳繖鏄竴涓敭鐩樼粦瀹?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:set hidden : 鍏佽涓嶄繚瀛榖uffer鑰屽垏鎹uffer (w/o=without)<br>----------------------------------------<br># 鍦ㄥ垎鍓茬獥鍙d腑蹇熷垏鎹?br>:map <C-J> <C-W>j<C-W>_<br># 璇戞敞錛氬師鏂囨澶勬湁璇紝鍓嶉潰搴旇鍔犱笂鍐掑彿<br># 榪欐槸涓涓敭鐩樼粦瀹氾紝鎶奀trl-J瀹氫箟鎴愬垏鎹㈠埌涓嬩竴涓獥鍙e茍鏈澶у寲<br>:map <C-K> <C-W>k<C-W>_<br>----------------------------------------<br># 鍛戒護褰曞埗 (鏈浣蟲妧宸э紝ft)<br>qq #褰曞埗鍒皅<br>.. #杈撳叆涓緋誨垪澶嶆潅鐨勬寚浠?br>q #鍐嶆鎸塹鍋滄褰曞埗<br>@q #鎵цq涓瓨鍌ㄧ殑鎸囦護<br>@@ #閲嶅鎵ц<br># 緙栬緫register/褰曞埗<br>"ap #鎶妑egister a涓殑鍐呭璐村埌褰撳墠浣嶇疆<br>.. #鐜板湪浣犲彲浠ヤ慨鏀瑰畠浜?br>"add#鍒犻櫎涔嬶紝閲嶆柊瀛樺叆register a <br>@a #鎵цregister a涓殑鎸囦護<br>----------------------------------------<br># _vimrc鍩虹<br>:set incsearch : 瀹炴椂鍖歸厤浣犺緭鍏ョ殑鍐呭<br>:set wildignore=*.o,*.obj,*.bak,*.exe : tab閿殑鑷姩瀹屾垚鐜板湪浼氬拷鐣ヨ繖浜?br>:set shiftwidth=4 : 鐜板湪鑷姩緙╄繘灝嗘槸4涓瓧絎?br># 璇戞敞錛氫竴涓猼ab浣嶉氬父鏄?涓瓧絎?br># 鎵浠ワ紝鎴戜滑榪樿璁懼畾 :set tabstop=4錛岃繖鏍鳳紝鎵鏈夌殑緙╄繘閮芥槸4瀛楃浜?br># emacs榛樿灝辨槸4瀛楃緙╄繘鍚э紵<br>:set vb t_vb=". : 娌夐粯鏂瑰紡(涓嶈鍙玝eep錛?<br>----------------------------------------<br># 鍔犺澆windows iexplorer鏉ユ祻瑙?鎴戞兂榪欏彧鏈夊湪windows涓嬬敤gvim鎵嶈兘鐢ㄥ埌)<br>:nmap ,f :update<CR>:silent !start c:\progra~1\intern~1\iexplore.exe <a ><font color=#56662d>file://%:p</font></a><br># 璇戦噴錛歯map鏄仛涓涓猲ormal妯″紡涓嬬殑閿洏緇戝畾<br># 榪欓噷緇戝畾浜嗕竴涓楀彿鍛戒護 ,f<br># :update鏄啓榪欎釜鏂囦歡錛屼笌:w涓嶅悓錛屽畠鍙湁褰撴枃浠惰淇敼浜嗙殑鏃跺欐墠鍐?br># :silent鍒寮瑰嚭紿楀彛鎶ュ憡鎵ц緇撴灉<br># !...鍚庨潰灝辨槸鎵цwindows鍛戒護浜嗐傚懙鍛碉紝鍘婚棶bill gates浠涔堟剰鎬濆惂銆?br># 涓嶈繃鍋剁敤gvim 6.1璇曡繃浜嗭紝濂界敤錛?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:nmap ,i :update<CR>: !start c:\progra~1\intern~1\iexplore.exe <cWORD><CR><br>----------------------------------------<br># 鐢╒IM緙栬緫ftp鏂囦歡<br>:cmap ,r :Nread <a ><font color=#56662d>ftp://209.51.134.122/public_html/index.html</font></a><br>:cmap ,w :Nwrite <a ><font color=#56662d>ftp://209.51.134.122/public_html/index.html</font></a><br># 璇戞敞錛氬師鏂囦涪澶變簡寮澶寸殑鍐掑彿<br># cmap鏄懡浠?command)妯″紡緇戝畾</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">gvim <a ><font color=#56662d>ftp://209.51.134.122/public_html/index.html</font></a><br># 榪欎竴鍙ュ氨鏄紑濮嬬紪杈戜竴涓猣tp榪滅▼鐨勬枃浠訛紝ft<br>----------------------------------------<br># 闄勫姞鍒頒竴涓猺egister (灝辨槸鐢ㄥぇ鍐欑殑register鍚嶅瓧鍟︼紒)<br>"a5yy #澶嶅埗5琛屽埌a涓?br>10j #涓嬬Щ10琛?br>"A5yy #鍐嶆坊鍔?琛屽埌a涓?br>----------------------------------------<br>[I : 鏄劇ず鍏夋爣澶勭殑鐙箟瀛楀彲浠ュ尮閰嶇殑琛?楂樼駭鎸囦護)<br># 璇戞敞錛? 鍙互鍏ㄦ枃鏌ユ壘涓庡厜鏍囧鐨勭嫮涔夊瓧鐩稿尮閰嶇殑瀛楋紝<br># 榪欏湪鏌ユ壘鍑芥暟鍘熷瀷鍜屽疄鐜幫紝鎴栬呭彉閲忎嬌鐢ㄧ殑鏃跺欏緢鏈夌敤<br>----------------------------------------<br># 甯歌緙╄繘<br>:'a,'b>><br># 璇戦噴錛氭妸mark a鍒癿ark b涔嬮棿鐨勫唴瀹硅繘琛屼袱嬈$緝榪?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 鍦╲isual妯″紡涓嬬緝榪?(鏃犻檺鍙噸澶?<br>:vnoremap < <gv<br># 璇戦噴錛?vnoremap 閲嶅畾涔変簡visual妯″紡涓?< 絎﹀彿鐨勫惈涔?br># 鎶婂畠瀹氫箟鎴?<gv<br># 鍗籌細鍏?lt;鍚戝緙╄繘錛岀劧鍚巊v閲嶆柊閫夋嫨涓婁竴嬈¢夋嫨浜嗙殑鍖哄煙<br># 榪欐牱鍦╲isual妯″紡涓嬪氨鍙互瀹炵幇榪炵畫鎸?lt;鑰岃繛緇緝榪涗簡<br>:vnoremap > >gv<br># 鍚岄噷錛屽唴緙?br>----------------------------------------<br># 鏌ユ壘錛堣瘧娉細寤鴻鍏堝涔犳鍒欒〃杈懼紡錛?br># 璇戞敞錛氭煡鎵懼懡浠や笉鐢ㄨ繘鍏?鍛戒護妯″紡錛岀洿鎺ユ寜/灝卞彲浠ヤ簡<br># 濡傛灉娌℃湁淇グ錛屽彲浠ヤ笉瑕佸彸杈圭殑/<br># 鍜宻mth bbs宸笉澶氬暒錛屽懙鍛?br>/joe/e : 鍏夋爣鍋滅暀鍦ㄥ尮閰嶅崟璇嶆渶鍚庝竴涓瓧姣嶅<br>/joe/e+1 : 鍏夋爣鍋滅暀鍦ㄥ尮閰嶅崟璇嶆渶鍚庝竴涓瓧姣嶇殑涓嬩竴涓瓧姣嶅<br>/joe/s : 鍏夋爣鍋滅暀鍦ㄥ尮閰嶅崟璇嶇涓涓瓧姣嶅<br>/^joe.*fred.*bill/ : ft,鏍囧噯姝e垯琛ㄨ揪寮?br>/^[A-J]\+/ : 鎵句竴涓互A~J涓竴涓瓧姣嶉噸澶嶄袱嬈℃垨浠ヤ笂寮澶寸殑琛?br>/forum\(\_.\)*pent : 澶氳鍖歸厤<br>/fred\_s*joe/i : 涓棿鍙互鏈変換浣曠┖鐧斤紝鍖呮嫭鎹㈣絎n<br># 璇戞敞錛氳繖涓拰perl涓嶅お涓鏍風殑鍝?br>/fred\|joe : 鍖歸厤FRED鎴朖OE<br>/\<fred\>/i : 鍖歸厤fred,fred蹇呴』鏄竴涓嫭绔嬬殑鍗曡瘝錛岃屼笉鏄瓙涓?br># 璇戞敞錛氳繖鍜宲erl涔熶笉澶竴鏍鳳紝perl鏄敤\b鍋氬崟璇嶅畾鐣岀鐨?br>/\<\d\d\d\d\> : 鍖歸厤4涓暟瀛?br>\<\d\{4}\> : 涔熸槸鍖歸厤4涓暟瀛?br># 鍦╲isual妯″紡涓嬫煡鎵?br>:vmap g/ y/<C-R>"<CR> : 鍖歸厤閫変腑鐨勯珮浜枃瀛?br># 璇戦噴錛歷map鏄湪visual妯″紡涓嬬殑閿洏鏄犲儚<br># 鏄犲儚浜唃/榪欎釜鍛戒護緇勫悎<br># y 鎶婇変腑鐨勯珮浜枃瀛楀啓鍏ュ尶鍚峳egister "<br># / 鎵撳紑鎼滅儲妯″紡<br># <C-R> 鍑嗗綺樿創register<br># " 綺樿創浜?"涓殑鍐呭<br># <CR> 鍥炶濺錛屾墽琛?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:vmap <silent> g/ y/<C-R>=escape(@", '\\/.*$^~[]')<CR><CR> : with spec chars<br># 璇戦噴錛欯#$&^*@#%&*#$@!</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 璺ㄨ鍖歸厤錛孿_ 琛ㄧず鍏佽鍖歸厤鎹㈣絎︼紝鎴栬呰錛屽厑璁稿尮閰嶆柊琛?br># 璇戞敞錛氬皬蹇冿紝鍜宲erl涓嶄竴鏍?br>/<!--\_p\{-}--> : 鍖歸厤澶氳娉ㄩ噴<br>/fred\_s*joe/i : 浼間箮涓婇潰鏈変簡錛宖t<br>/bugs\(\_.\)*bunny : 涓棿鍙互鏈夋棤鏁頒笢瑗?br>:h \_ : 鐪嬬湅鍏充簬 \_ 鐨勫府鍔?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 鏌ユ壘褰撳墠鍏夋爣浣嶇疆鎵鍦ㄥ瓙渚嬬▼/鍑芥暟(subroutine/function)鐨勫0鏄?br>:nmap gx yiw/^\(sub\<bar>function\)\s\+<C-R>"<CR><br># 璇戦噴錛歯map 鍋氫竴涓猲ormal妯″紡涓嬬殑閿洏緇戝畾<br># y 榪涘叆澶嶅埗鐘舵侊紝鍚庨潰闇瑕佷竴涓猰otion<br># 鎺ョ潃灝辯敤 iw 鎸囧嚭浜嗚繖涓猰otion,鏄痠nner word<br># inner word涔熸槸鐙箟瀛?lt;cword>錛屼絾鏄拰 w 涓嶅悓<br># w 鏄粠鍏夋爣浣嶇疆寮濮嬪悜鍚庣湅<br># 鑰宨nner word鎬繪槸鎶婂厜鏍囩Щ鍒扮涓涓瓧姣嶏紝浠庤屾昏兘寰楀埌涓涓畬鏁寸殑鐙箟瀛?br># 璇曚竴璇?gUw 鍜?gUiw 灝辯煡閬撳尯鍒簡錛屽懙鍛點?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 鍦ㄥ涓枃妗d腑鎼滅儲<br>:bufdo /searchstr</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:argdo /searchstr<br>----------------------------------------<br># 鏇挎崲<br># 璇戞敞錛氭浛鎹㈠懡浠ら渶瑕佸厛榪涘叆:鍛戒護妯″紡</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:%s/fred/joe/igc : 涓涓父瑙佺殑鏇挎崲鍛戒護錛屼慨楗扮igc鍜宲erl涓竴鏍鋒剰鎬?br>:%s/\r//g : 鍒犻櫎DOS鏂瑰紡鐨勫洖杞M<br>:%s= *$== : 鍒犻櫎琛屽熬絀虹櫧<br>:'a,'bg/fred/s/dick/joe/igc : 闈炲父鏈夌敤錛侊紙ft,鍙堟潵浜嗭紒錛?br># 璇戦噴錛?a,'b鎸囧畾涓涓寖鍥達細mark a ~ mark b<br># g//鐢ㄤ竴涓鍒欒〃杈懼紡鎸囧嚭浜嗚繘琛屾搷浣滅殑琛屽繀欏誨彲浠ヨfred鍖歸厤<br># 鐪嬪悗闈紝g//鏄竴涓叏灞鏄劇ず鍛戒護<br># s/dick/joe/igc鍒欏浜庤繖浜涙弧瓚蟲潯浠剁殑琛岃繘琛屾浛鎹?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 鍒楀鍒?br># 璇戞敞錛欯#%&^#*^%#$!<br>:%s= [^ ]\+$=&&= : 澶嶅埗鏈鍚庝竴鍒?br>:%s= \f\+$=&&= : 涓鏍風殑鍔熻兘<br>:%s= \S\+$=&& : ft,榪樻槸涓鏍?br># 鍙嶅悜寮曠敤錛屾垨縐拌蹇?br>:s/\(.*\):\(.*\)/\2 : \1/ : 棰犲掔敤:鍒嗗壊鐨勪袱涓瓧孌?br>:%s/^\(.*\)\n\1/\1$/ : 鍒犻櫎閲嶅琛?br># 闈炶椽濠尮閰嶏紝\{-}<br>:%s/^.\{-}pdf/new.pdf/ : 鍙槸鍒犻櫎絎竴涓猵df<br># 璺ㄨ秺鍙兘鐨勫琛?br>:%s/<!--\_.\{-}-->// : 鍙堟槸鍒犻櫎澶氳娉ㄩ噴錛堝挦錛熶負浠涔堣璇淬屽張銆嶅憿錛燂級<br>:help /\{-} : 鐪嬬湅鍏充簬 闈炶椽濠暟閲忕 鐨勫府鍔?br>:s/fred/<c-r>a/g : 鏇挎崲fred鎴恟egister a涓殑鍐呭錛屽懙鍛?br># 鍐欏湪涓琛岄噷鐨勫鏉傚懡浠?br>:%s/\f\+\.gif\>/\r&\r/g | v/\.gif$/d | %s/gif/jpg/<br># 璇戞敞錛氬氨鏄敤 | 綆¢亾鍟?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 鎴栬?br>:%s/suck\|buck/loopy/gc : 鎴栬?鎴栬呴渶瑕乗錛宖t錛侊紝|涓嶆槸鎴栬?<br># ft, \涓嶅氨鏄漿涔変簡涔堬紒榪欎釜鍜宲erl鐪熸槸涓嶅悓浜嗭紒</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 璋冪敤VIM鍑芥暟<br>:s/__date__/\=strftime("%c")/ : 鎻掑叆鏃墮棿涓?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 澶勭悊鍒楋紝鏇挎崲鎵鏈夊湪絎笁鍒椾腑鐨剆tr1<br>:%s:\(\(\w\+\s\+\)\{2}\)str1:\1str2:</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 浜ゆ崲絎竴鍒楀拰鏈鍚庝竴鍒?(鍏?鍒?<br>:%s:\(\w\+\)\(.*\s\+\)\(\w\+\)$:\3\2\1:</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># filter all form elements into paste register<br># 鎶婃墍鏈夌殑form鍏冪礌錛堝氨鏄痟tml閲岄潰鐨刦orm鍟︼級鏀懼埌register閲岋紵<br># ft, 澶寸柤錛屼笉瑙i噴浜?br>:redir @*|sil exec 'g#<\(input\|select\|textarea\|/\=form\)\>#p'|redir END<br>:nmap ,z :redir @*<Bar>sil exec <a href="mailto:"g@</(input/<bar>select/<bar>textarea/<bar>//=fo"><font color=#56662d>'g@<\(input\<Bar>select\<Bar>textarea\<Bar>/\=fo</font></a><br># 涓婇潰榪欎竴琛屼笉鑳藉畬鍏ㄦ樉紺猴紝鏈濂紺opy Article涓嬪幓鐪?/p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">----------------------------------------<br># 鍏ㄥ眬(global)鏄劇ず鍛戒護錛屽氨鏄敤 :g錛嬫鍒欒〃杈懼紡<br># 璇戦噴錛?:g/{pattern}/{cmd} 灝辨槸鍏ㄥ眬鎵懼埌鍖歸厤鐨勮<br># 鐒跺悗瀵硅繖浜涜鎵ц鍛戒護{cmd}<br>:g/\<fred\>/ : 鏄劇ず鎵鏈夎兘澶熶負鍗曡瘝fred鎵鍖歸厤鐨勮<br>:g/<pattern>/z#.5 : 鏄劇ず鍐呭錛岃繕鏈夎鍙鳳紝鍛靛懙<br>:g/<pattern>/z#.5|echo "==========" : 婕備寒鐨勬樉紺猴紝ft!</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 鍏ㄥ眬鍛戒護 (鍏跺畠)<br>:g/^\s*$/d : 鍒犻櫎鎵鏈夌┖琛?br>:g!/^dd/d : 鍒犻櫎涓嶅惈瀛楃涓?dd'鐨勮<br>:v/^dd/d : 鍚屼笂<br># 璇戦噴錛歷 == g!錛屽氨鏄笉鍖歸厤錛?br>:g/fred/,/joe/d : not line based (very powerfull)<br>:v/./.,/./-1join : 鍘嬬緝絀鴻<br>:g/^$/,/./-j : 鍘嬬緝絀鴻<br>:g/<input\|<form/p : 鎴栬?瑕佺敤\|<br>:g/^/pu _ : 鎶婃枃涓┖琛屾墿澧炰竴鍊?(pu = put)<br>: 鍗籌細鍘熸潵涓よ闂存湁涓涓┖琛岋紝鐜板湪鍙樻垚2涓?br>:g/^/m0 : 鎸夎緲昏漿鏂囩珷 (m = move)<br>:g/fred/t$ : 鎷瘋礉琛岋紝浠巉red鍒版枃浠舵湯灝?EOF)<br>:%norm jdd : 闅旇鍒犻櫎<br># 璇戦噴錛? 鎸囨槑鏄鎵鏈夎榪涜鎿嶄綔<br># norm鎸囧嚭鍚庨潰鏄痭ormal妯″紡鐨勬寚浠?br># j鏄笅縐諱竴琛岋紝dd鏄垹闄よ</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># incrementing numbers<br>:.,$g/^\d/exe "norm! \<c-a>" : 澧炲姞鍦˙OL(beginning of line)澶勭殑鏁板瓧<br># 璇戞敞錛?,$ 鎸囨槑鍛戒護浠庡綋鍓嶈鎵ц鍒版渶鍚庝竴琛?br># 濡傛灉娌℃湁 .,$ 闄愬畾鑼冨洿錛岄偅涔坓//灝變細瀵規暣涓枃浠惰繘琛屾搷浣?br># exe 鏄墽琛屽悗闈㈢殑鍛戒護緇勫悎</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:.,$g/^\d/exe "norm \<c-p>" : Win32涓嬪繀欏婚噸瀹氫箟Ctrl-A</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 淇濆瓨鍏ㄥ眬鍛戒護鐨勭粨鏋?(娉ㄦ剰蹇呴』浣跨敤娣誨姞妯″紡)<br>:g/fred/y A : 娣誨姞鎵鏈変負fred鎵鍖歸厤鐨勮鍒皉egister a<br>:'a,'b g/^Error/ . w >> errors.txt</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 澶嶅埗姣忎竴琛岋紝鐒跺悗鍦ㄥ鍒跺嚭鏉ョ殑姣忎竴琛屼袱渚у姞涓婁竴涓?print '澶嶅埗鍑烘潵鐨勫唴瀹?<br>:g/./yank|put|-1s/'/"/g|s/.*/Print '&'/<br>----------------------------------------<br># 鍏ㄥ眬鍛戒護鍜屾浛鎹㈠懡浠よ仈濮?(寮哄ぇ鐨勭紪杈戣兘鍔?<br>:'a,'bg/fred/s/joe/susan/gic : 鍙互浣跨敤鍙嶅悜寮曠敤鏉ュ尮閰?br>:g/fred/,/joe/s/fred/joe/gic : non-line based (ultra)<br>----------------------------------------<br># 鍏堟壘fred錛岀劧鍚庢壘joe錛岀劧鍚?a href="mailto:#$^$%^#$%^@%^%&amp;"><font color=#56662d>#$^$%^#$%^@%^%&%</font></a>^*!<br>:/fred/;/joe/-2,/sid/+3s/sally/alley/gIC<br>----------------------------------------<br># 澶嶄綅鍚戝埌register * 鍜?綺樿創register *<br>:redir @* : 澶嶄綅鍚戝懡浠ょ殑杈撳嚭緇撴灉錛堟渶涓嬫柟鍛戒護琛屼笂鐨勭粨鏋滐級<br>: 鍒皉egister * (ft,* 浠h〃0~1,a~z,..)<br>:redir END : 緇撴潫澶嶄綅鍚?br># 澶勭悊綺樿創<br>"*yy : 涓婇潰璁茶繃浜嗭紝灝辨槸澶嶅埗鍒皉egister *涓?br>"*p : 鐒跺悗璐村嚭鏉?br>----------------------------------------<br>:redir >> out.txt : 澶嶄綅鍚戝埌涓涓枃浠?br>----------------------------------------<br># 閲嶆柊鏍煎紡鍖栨枃鏈?br>gq<CR><br>gqap (a鏄痬otion p鏄钀?visual妯″紡))<br>ggVGgq 閲嶆柊鏍煎紡鍖栨暣涓枃绔?br>----------------------------------------<br># 瀵瑰涓枃妗e疄鏂藉懡浠?br>:argdo %s/foo/bar/ : 瀵規墍鏈?args鍒楄〃涓殑鏂囨。鎵ц鍛戒護<br>:bufdo %s/foo/bar/<br>:windo %s/foo/bar/<br>:argdo exe '%!sort'|w! : 浣跨敤澶栭儴鍛戒護<br>----------------------------------------<br># 鍛戒護琛岀殑涓浜涘ソ鐜╃殑涓滀笢<br>gvim -h : 嬋媧葷殑鏃跺欐縺媧誨府鍔?Win32)<br>vi -h 鎴?vim -h : 榪欎釜鏄痷nix涓嬬敤<br>ls | gvim - : 緙栬緫涓涓暟鎹祦錛?br>gvim -o file1 file2 : 浠ュ垎鍓茬獥鍙f墦寮涓や釜鏂囦歡</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 鎸囧嚭鎵撳紑涔嬪悗鎵ц鐨勫懡浠?br>gvim.exe -c "/main" joe.c : 鎵撳紑joe.c錛岀劧鍚庤煩杞埌'main'</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 瀵逛竴涓枃浠舵墽琛屽涓懡浠?br>vim -c "%s/ABC/DEF/ge | update" file1.c</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 瀵逛竴緇勬枃浠舵墽琛屽涓懡浠?br>vim -c "argdo %s/ABC/DEF/ge | update" *.c</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 鑷姩緙栬緫鏂囦歡 (緙栬緫鍛戒護搴忓垪Ex commands宸茬粡鍖呭惈鍦╟onvert.vim涓簡)<br>vim -s "convert.vim" file.c</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 涓嶈鍔犺澆.vimrc鍜屼換浣昿lugins (嬋媧諱竴涓共鍑鐨刅IM)<br>gvim -u NONE -U NONE -N<br>----------------------------------------<br># GVIM 涓嶅悓鐨勫湴鏂?br>gvim -d file1 file2 : vimdiff (姣旇緝涓嶅悓)<br>dp : 鎶婂厜鏍囧鐨勪笉鍚屾斁鍒板彟涓涓枃浠?br>do : 鍦ㄥ厜鏍囧浠庡彟涓涓枃浠跺彇寰椾笉鍚?br>----------------------------------------<br># Vim闄烽槺<br># 鍦╲im鐨勬鍒欒〃杈懼紡涓紝 + 鍜?| 閮藉繀欏誨姞杞箟絎?\<br># 灝忓績錛岃繖鍜宲erl涓嶄竴鏍鳳紒<br>/fred\+/ : 鍖歸厤fred鎴杅reddy浣嗘槸涓嶅尮閰峟ree<br>----------------------------------------<br># \v 錛屾垨鍙仛very magic (閫氬父閮芥槸榪欎箞鍙?鍙互鍙栨秷杞箟絎?br>/codes\(\n\|\s\)*where : 鏅氱殑姝e垯琛ㄨ揪寮?br>/\vcodes(\n|\s)*where : very magic錛寍 涓嶇敤鍔?\ 浜嗭紒</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">----------------------------------------<br># 鎶婁笢瑗塊佸埌鍛戒護琛?鎼滅儲琛?(SUPER:鍋朵笉鍐嶇炕璇戣繖縐嶅徆璇嶄簡)<br><C-R><C-W> : 閫佷竴涓嫮涔夎瘝<br><C-R><C-A> : 閫佷竴涓箍涔夎瘝<br><C-R>- : 閫佷竴涓皬鍨嬪垹闄ゅ瘎瀛樺櫒register<br><C-R>[0-9a-z] : 閫佷竴涓懡鍚嶅瘎瀛樺櫒register<br><C-R>% : 閫佹枃浠跺悕榪囧幓 (#涔熻)<br>----------------------------------------<br># 鎿嶄綔瀵勫瓨鍣?br>:let @a=@_ : 娓呴櫎register a<br>:let @*=@a : 瀵勫瓨鍣ㄨ祴鍊?br>:map <f11> "qyy:let @q=@q."zzz"<br># 璇戞敞錛氱寽鐚滆繖涓棤鑱婄殑緇戝畾鏄粈涔堟剰鎬濓紵<br>----------------------------------------<br># 鍏充簬甯姪鐨勫府鍔?br>:h quickref : 緲誨埌VIM Quick Reference欏?鏈夌敤錛?<br>:h tips : Vim鑷繁鐨則ips<br>:h visual<C-D><tab> : 寰楀埌涓涓叧浜巚isual鍏抽敭璇嶇殑甯姪鍒楄〃<br>: 鐒跺悗鐢╰ab閿幓閫夋嫨<br>:h ctrl<C-D> : 鏄劇ず鎵鏈夊叧浜嶤trl鐨勫府鍔?br>:h :r : :ex鍐掑彿鍛戒護<br>:h CTRL-R : 鏅氭ā寮忓懡浠?br>:h \r : \r鍦ㄦ鍒欒〃杈懼紡涓槸浠涔堟剰鎬濆憿錛?br>:h i_CTRL-R : insert妯″紡涓嬬殑Ctrl-R<br>:h c_CTRL-R : 鍛戒護琛?command-line)妯″紡涓嬬殑Ctrl-R<br>:h v_CTRL-V : visual妯″紡涓嬬殑Ctrl-V<br>:h tutor : VIM 鎸囧崡<br>gvim -h : 鍏充簬 VIM 鍛戒護鐨勫府鍔?br>vi/vim -h<br><C-S>T : Control Shift T go backwards in help<br>: 鍋朵笉娓呮鏈変粈涔堢敤:(<br>----------------------------------------<br># 閫夐」璁劇疆鍦ㄥ摢閲岋紵<br>:scriptnames : 鍒楀嚭鎵鏈夊姞杞界殑 plugins, _vimrcs<br>:verbose set history : 鏄劇ずhistory鐨勫煎茍鎸囧嚭璁劇疆鏂囦歡鐨勪綅緗?br>----------------------------------------<br># 鍒朵綔浣犺嚜宸辯殑VIM甯姪<br>:helptags /vim/vim61/doc : 閲嶅緩 /doc 涓墍鏈夌殑 *.txt 甯姪鏂囦歡<br>:help add-local-help<br>----------------------------------------<br># 鐢ㄥ閮ㄧ▼搴忔潵榪愯紼嬪簭 (渚嬪 perl :)<br>map <f2> :w<CR>:!perl -c %<CR><br># 璇戦噴錛?w<CR>鍐欐枃浠?br># :!perl -c %<CR>鐢╬erl鏉ヨ繍琛屽綋鍓嶆枃浠?br># 褰撳墠鏂囦歡蹇呴』鏈夋枃浠跺悕錛?br>----------------------------------------<br># 鎻掑叆DOS鎹㈣絎?br>:%s/nubian/<C-V><C-M>&/g : Ctrl-V鏄竴縐嶈漿涔夛紝瀹冭瑕佽В閲?lt;C-M><br>:%s/nubian/<C-Q><C-M>&/g : 瀵逛簬Win32搴旇榪欐牱<br>:%s/nubian/^M&/g : 浣犵湅鍒扮殑^M鏄竴涓瓧絎?br>:%s/nubian/\r&/g : 鏇村ソ鐨勫艦寮?br>----------------------------------------<br># 鎶婃渶鍚庝竴涓懡浠よ創鍒板綋鍓嶄綅緗?br>i<c-r>:<br># 鎶婃渶鍚庝竴涓悳绱㈡寚浠よ創鍒板綋鍓嶄綅緗?br>i<c-r>/<br># 璇戦噴錛歩鏄繘鍏nsert妯″紡錛?br># Ctrl-r鏄紑鍚彃鍏ユā寮忎笅register鐨勫紩鐢?br># :鍜?鍒嗗埆寮曠敤浜嗕袱涓猺egister鐨勫唴瀹?br>----------------------------------------<br># 鏇村鐨勫畬鎴愬姛鑳?br><C-X><C-F> :鎻掑叆褰撳墠鐩綍涓嬬殑涓涓枃浠跺悕鍒板綋鍓嶄綅緗?br># 鍦╥nsert妯″紡涓嬩嬌鐢?br># 鐒跺悗鐢?Ctrl-P/Ctrl-N 緲婚〉<br>----------------------------------------<br># 鏇挎崲涓涓獀isual鍖哄煙<br># 閫夋嫨涓涓尯鍩燂紝鐒跺悗杈撳叆 :s/Emacs/Vim/ 絳夌瓑錛寁im浼氳嚜鍔ㄨ繘鍏?妯″紡<br>:'<,'>s/Emacs/Vim/g : 鍓嶉潰鐨?<,'>鏄痸im鑷姩娣誨姞鐨?br>----------------------------------------<br># 鍦ㄦ枃浠朵腑鎻掑叆琛屽彿(涓嶆槸鏄劇ず琛屽彿錛屾槸鎻掑叆錛?<br>:g/^/exec "s/^/".strpart(line(".")." ", 0, 4)<br>----------------------------------------<br># 鐢╒IM鐨勬柟寮忔潵緙栧彿琛?br>:set number :鏄劇ず琛屽彿<br>:set nonu :鍙栨秷鏄劇ず<br>:%s/^/\=strpart(line('.')." ",0,&ts)</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">#浠庝換鎰忚寮濮嬬紪鍙?闇瑕乸erl錛屽樋鍢?<br>:'a,'b!perl -pne 'BEGIN{$a=223} substr($_,2,0)=$a++'<br>#浼間箮鏈夌偣灝忛棶棰橈紝浣犺瘯璇曠湅:)</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">qqmnYP`n^Aq : 璁板綍鍒皅 鐒跺悗鐢?@q 閲嶅<br>#浼間箮涓嶈兘宸ヤ綔錛屼綘璇曡瘯鐪?)</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 閫掑宸插瓨鍦ㄦ暟瀛楀埌鏂囦歡鏈?br>:.,$g/^\d/exe "normal! \<c-a>"</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new"># 楂樼駭閫掑錛岀湅錛?br><a rel=nofollow><font color=#56662d>http://vim.sourceforge.net/tip_view.php?tip_id=150</font></a><br>----------------------------------------<br># 楂樼駭閫掑 ("鐪熺殑寰堟湁鐢?錛宖t)<br>" 鎶婁笅闈㈠嚑鍙ユ斁鍒?_vimrc #vimrc鑴氭湰鐢?" 鍋氳娉ㄩ噴絎?br>let g:I=0<br>function! INC(increment)<br>let g:I =g:I + a:increment<br>return g:I<br>endfunction<br>" 渚嬪浠巑ark a 鍒癿ark b 閫掑錛屼粠223寮濮嬶紝姝ラ暱涓?<br>:let I=223<br>:'a,'bs/$/\=INC(5)/<br>" (鍘熸枃錛歝reate a map for INC) <br>" 浣嗘槸cab鏄竻妤氬懡浠よ緙╁啓鍟婏紵鎬庝箞鍥炰簨錛?br>cab viminc :let I=223 \| 'a,'bs/$/\=INC(5)/<br>----------------------------------------<br># 鍔犲瘑(灝忓績浣跨敤錛屼笉瑕佸繕浜嗗瘑鐮?</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:X : 鐒跺悗vim浼氭彁紺轟綘杈撳叆瀵嗙爜<br>:h :X<br>----------------------------------------<br># modeline (make a file readonly etc) must be in first/last 5 lines<br># 涓嶄細鐢紝涓嶇炕浜?br>// vim:noai:ts=2:sw=4:readonly:<br>:h modeline<br>----------------------------------------<br># Creating your own GUI Toolbar entry<br># 瀵逛簬text妯″紡涓嬬殑vim娌$敤錛屼笉緲諱簡<br>amenu Modeline.Insert\ a\ VIM\ modeline <Esc><Esc>ggOvim:ff=unix ts=4 ss=4<CR>v<br>----------------------------------------<br># 涓涓繚瀛樺綋鍓嶅厜鏍囦笅鐨勭嫮涔夊瓧鍒頒竴涓枃浠剁殑鍑芥暟<br>function! SaveWord() "榪欓噷鐢?鏄己鍒惰鐩栦互鍓嶇殑瀹氫箟<br>normal yiw<br>exe ':!echo <a href="mailto:".@0.'"><font color=#56662d>'.@0.'</font></a> >> word.txt'<br>endfunction<br>map ,p :call SaveWord() #浣跨敤璇ュ嚱鏁扮殑涓涓緥瀛?br>----------------------------------------<br># 鍒犻櫎閲嶅琛岀殑鍑芥暟<br>function! Del()<br>if getline(".") == getline(line(".") - 1)<br>norm dd<br>endif<br>endfunction</p> <p style="FONT-SIZE: 10pt; FONT-FAMILY: courier new">:g/^/ call Del() #浣跨敤璇ュ嚱鏁扮殑涓涓緥瀛?br>----------------------------------------<br># 鍙屽瓧鑺傜紪鐮?(non alpha-numerics)<br>:digraphs : 鏄劇ず緙栫爜琛?br>:h dig : 甯姪<br>i<C-K>e' : 杈撳叆 é<br>i<C-V>233 : 杈撳叆 é (Unix)<br>i<C-Q>233 : 杈撳叆 é (Win32)<br>ga : 鏌ョ湅瀛楃鐨刪ex鍊?br>----------------------------------------<br># 鏂囦歡鍚嶈嚜鍔ㄥ畬鎴?(渚嬪 main_c.c)<br>:e main_<tab> : tab 閿畬鎴?br>gf : 鎵撳紑鍏夋爣澶勫箍涔夊瓧鍛藉悕鐨勬枃浠?(normal妯″紡)<br>main_<C-X><C-F> : 鏂囦歡鍚嶈嚜鍔ㄥ畬鎴?insert妯″紡)<br>----------------------------------------<br># Vim澶嶆潅浣跨敤<br># 浜ゆ崲涓や釜鍗曡瘝<br>:%s/\<\(on\|off\)\>/\=strpart("offon", 3 * ("off" == submatch(0)), 3)/g<br>----------------------------------------<br># 鎶妕ext鏂囦歡杞崲鎴恏tml鏂囦歡(oh,ft)<br>:runtime! syntax/2html.vim : 杞崲 txt 鎴?html<br>:h 2html : 鐪嬬湅甯姪<br>----------------------------------------<br># VIM 鏈変竴涓唴閮ㄨ嚜甯︾殑 grep 鍛戒護<br>:grep some_keyword *.c : 寰楀埌涓涓寘鍚玸ome_keyword鐨刢鏂囦歡鍚嶅垪琛?br>:cn : 鍘諱笅涓涓嚭鐜扮殑浣嶇疆<br>----------------------------------------<br># 寮哄埗鏃犲悗緙鏂囦歡鐨勮娉曠潃鑹叉柟寮?.pl<br>:set syntax=perl<br># 鍙栨秷璇硶鐫鑹?br>:set syntax off<br># 鏀瑰彉鑹插僵涓婚 (鍦▇vim/vim??/colors涓殑浠諱綍鏂囦歡)<br>:colorscheme blue<br>----------------------------------------<br>:set noma (non modifiable) : 闃叉淇敼<br>:set ro (Read Only) : 鍙淇濇姢<br>----------------------------------------<br># Sessions (鎵撳紑涓緋誨垪鏂囦歡)<br>gvim file1.c file2.c lib/lib.h lib/lib2.h :鍦?session"涓姞杞戒竴緋誨垪鏂囦歡<br>:mksession : 鐢熸垚涓涓猄ession鏂囦歡 (榛樿鏄疭ession.vim)<br>:q<br>gvim -S Session.vim : 閲嶆柊璇誨彇涓涓猻ession錛屼篃灝辮鍙栦簡鎵鏈夋枃浠?ft<br>----------------------------------------<br># 鏍囪(tags) (璺寵漿鍒皊ubroutines/functions)<br>taglist.vim : 鏈嫻佽鐨勬彃浠?br>:Tlist : 鏄劇ずTags (functions鐨勫垪琛?<br><C-]> : 璺寵漿鍒板厜鏍囧鐨刦unction<br>: 榪欎釜閿?Ctrl-] 鍜寁im甯姪涓槸涓鏍風殑<br>----------------------------------------<br># Just Another Vim Hacker JAVH<br># Juat Another Perl Hacker JAPH錛屽樋鍢?br>vim -c ":%s/^/WhfgTNabgureRIvzSUnpxre/|:%s/[R-T]/ /Ig|:normal ggVGg?"<br># 璇戦噴錛氬懙鍛碉紝璋佹潵瑙i噴涓涓嬪惂錛?br># 鍏跺疄涓嶈繃鏄湪嬋媧籿im鐨勬椂鍊欐墽琛屼簡涓涓懡浠?br># 鍏堝啓鍏ヤ簡 Just Another Vim Hacker 鐨剅ot13緙栫爜<br># 鐒跺悗鍐嶈瘧鐮?br>----------------------------------------<br>緇堜簬緲誨畬浜嗭紝鍛靛懙銆傚ソ绱晩錛?br>__END__</p> <img src ="http://www.shnenglu.com/liu1061/aggbug/54940.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/liu1061/" target="_blank">T.S Liu</a> 2008-06-30 10:34 <a href="http://www.shnenglu.com/liu1061/articles/54940.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>vim+Ctags錛媡aglist+omnicppcomplete錛媠upertab(鎻掍歡)http://www.shnenglu.com/liu1061/articles/54925.htmlT.S LiuT.S LiuSun, 29 Jun 2008 14:37:00 GMThttp://www.shnenglu.com/liu1061/articles/54925.htmlhttp://www.shnenglu.com/liu1061/comments/54925.htmlhttp://www.shnenglu.com/liu1061/articles/54925.html#Feedback0http://www.shnenglu.com/liu1061/comments/commentRss/54925.htmlhttp://www.shnenglu.com/liu1061/services/trackbacks/54925.htmlGvim C++IDE for windows XP (Ubuntu)
GVim v7錛堜富紼嬪簭錛?Ctags錛媡aglist+omnicppcomplete錛媠upertab(鎻掍歡)

涓錛屽畨瑁?br>錛?,omnicppcomplete 鐨勫畨瑁咃細
   錛嶏紞1,涓嬭澆omnicppcomplete,瑙e帇鍙緱鍒頒笁涓枃浠跺す錛坅utoload,after,doc錛?鍒嗗埆澶嶅埗鍒癵vim鐨勫畨瑁呯洰褰曚笅鐨剉imfiles鏂囦歡澶逛腑(ubuntu涓負~/.vim)銆傝繖鏍穙mnicppcomplete灝卞畨瑁呭畬鎴愪簡銆?br>錛?,ctags 瀹夎
   錛嶏紞1,涓嬭澆Ctags鏈鏂皐in32鐗堟湰錛堝綋鍓嶆槸5.6錛?瑙e帇鑷蟲煇涓鐩綍錛堝c:\ctags56錛?騫跺湪緋葷粺鐜鍙橀噺涓妸娣誨姞ctags鐨勫畨瑁呰礬寰勶紙濡俻ath=c:\ctags56錛夛紝鑷蟲ctags涔熷畨瑁呭畬鎴愪簡(ubuntu 涓洿鎺?sudo apt-get install ctags)銆?br>錛?,taglist 瀹夎
   錛嶏紞1,涓嬭澆taglist鎻掍歡錛岃В鍘嬪緱鍒頒袱涓枃浠跺す錛坉oc錛宲lugin錛夛紝鎶婇噷闈㈢殑鏂囦歡鍒嗗埆澶嶅埗鍒皏im瀹夎鐩綍涓嬪搴旂殑鏂囦歡澶逛腑(ubuntu涓負~/.vim)銆?br>錛?,supertab鎻掍歡瀹夎
   錛嶏紞1,涓嬭澆supertab鎻掍歡錛屽鍒秙upertab.vim鍒皏im瀹夎鐩綍鐨刾lugin鐩綍涓嬶紝浣跨敤鏃跺彧瑕佺洿鎺ユ寜tab閿紝灝卞彲浠ョ洿鎺ヨ繘琛岃ˉ鍏ㄣ?/font>

浜岋紝閰嶇疆
錛?,涓嬭澆鏈枃鐨勯檮浠訛紝瑙e帇鍙緱鍒頒袱涓枃浠訛紙stltags,cpptags;榪欎袱涓枃浠舵槸鏍規嵁mingw5.3鍜宑++ 鏍囧噯搴搒tl3.3鍒朵綔鐨勶級,澶嶅埗鍒版煇鐩綍(C:\ctags56\)錛岀劧鍚庡湪_vimrc(ubuntu涓嬩負~/.gvimrc鎴?usr/share/vim/gvimrc)涓坊鍔犱笅鍒椾唬鐮侊紝浣跨敤鏃剁敤TAB閿夋嫨鎻愮ず鐨勪唬鐮侊細

-----------------------------
"setting for omnicppcomplete
set nocp
filetype plugin on

"涓嬮潰鐨勮緗敤浜庡綋鐢ㄦ埛棰勫厛澹版槑namespace鏃朵篃鑳借嚜鍔ㄨˉ鍏ㄤ唬鐮侊紙濡備嬌鐢╱sing std::string錛?
let OmniCpp_DefaultNamespaces = ["std"]

" 璁劇疆浠g爜鎻愮ず紿楀彛鐨勯鑹詫紙榛樿涓虹矇綰㈣壊錛屽闄勫浘1,涓嬮潰鐨勮緗殑鏁堟灉濡傞檮鍥?錛?
highlight Pmenu ctermbg=13 guibg=LightGray
highlight PmenuSel ctermbg=7 guibg=DarkBlue guifg=White
highlight PmenuSbar ctermbg=7 guibg=DarkGray
highlight PmenuThumb guibg=Black

"璁劇疆tags鐩綍錛屽彲浠ユ牴鎹嚜宸辯殑璁劇疆鑷姩璋冩暣
set tags+=C:\ctags56\stltags
set tags+=C:\ctags56\cpptags
------------------------------


錛?,鍒朵綔鍏跺畠搴撴枃浠剁殑tags鏂囦歡
    錛嶏紞1,鍦ㄥ懡浠よ妯″紡涓嬭繘鍏ュ簱鏂囦歡鐨勭洰褰曪紙涓鑸負include鍜宻rc錛夛紝鎵цctags -R --c++-kinds=+p --fields=+iaS --extra=+q 錛岀劧鍚庡湪璇ュ簱鏂囦歡鐩綍涓嬪嵆鍙緱鍒頒竴涓悕涓簍ags鐨勬枃浠訛紝鏇村悕鍚庡鍒跺埌鑷繁鐨則ags鐩綍涓嬶紝騫跺湪_vimrc涓緗?


T.S Liu 2008-06-29 22:37 鍙戣〃璇勮
]]>
vim\gvim `s pluginhttp://www.shnenglu.com/liu1061/articles/39961.htmlT.S LiuT.S LiuSat, 29 Dec 2007 14:12:00 GMThttp://www.shnenglu.com/liu1061/articles/39961.htmlhttp://www.shnenglu.com/liu1061/comments/39961.htmlhttp://www.shnenglu.com/liu1061/articles/39961.html#Feedback0http://www.shnenglu.com/liu1061/comments/commentRss/39961.htmlhttp://www.shnenglu.com/liu1061/services/trackbacks/39961.html榪欎釜鎻掍歡瀹炵幇浜嗙被浼糢ltraEdit涓殑鏍囩欏電殑鍔熻兘錛岃屼笖鑳介氳繃Alt-<n>鏉ュ垏鎹?
瀹夎錛?br>鎷瘋礉鏂囦歡鍒癧浣犵殑gvim鐨勫畨瑁呯洰褰昡\vimfiles\plugin\涓嵆鍙紒
涓嬭澆錛?br>http://www.vim.org/scripts/script.php?script_id=1338


word_complete.vim
Insert妯″紡涓嬪湪杈撳叆鐨勬椂鍊欒嚜鍔ㄨˉ鍏ㄥ崟璇嶏紝濡傛灉琛ュ叏姝g‘鍙互鎸塗ab閿帴鍙楋紝鍚﹀垯鍙互涓嶇瀹冪戶緇緭鍏ユ垨鑰呮寜

Ctrl-n錛孋trl-p鍒囨崲琛ュ叏銆?娉ㄦ剰鏄緭鍏ヤ笁涓瓧絎﹀悗鎵嶅紑濮嬭ˉ鍏ㄣ?br>瀹夎錛?br>1. 鎷瘋礉鏂囦歡鍒癧浣犵殑gvim鐨勫畨瑁呯洰褰昡\vimfiles\plugin\
2. 嬋媧昏ˉ鍏ㄦā寮?br>:call DoWordComplete()
3. 鍙栨秷琛ュ叏妯″紡
:call EndWordComplete()
4. 鑷姩鍔犺澆琛ュ叏妯″紡
鍦?vimrc鎴朹vimrc鏂囦歡涓姞鍏?br>:autocmd  BufEnter  *  call  DoWordComplete()
涓嬭澆錛?br>http://www.vim.org/scripts/script.php?script_id=73


c.vim
榪欎釜鎻掍歡瓚呭己錛屾彁渚涗簡寰堝渚夸簬C/C++緙栫▼鐨勫姛鑳斤紝姣斿鏂囦歡澶存ā鐗堬紝浠g爜鐗囨柇絳夈?br>灝卞儚甯姪鏂囨。鐨勫ご涓鍙ュ啓鐨勯偅鏍? C/C++IDE for vim/gvim.鍏蜂綋濡備綍鐨勫己澶у灝辯湅鐪嬪府鍔╁ソ浜?
瀹夎:
榪欎釜鐩稿鍦版瘮杈冪畝鍗?浣嗘槸鏂囦歡鍗存槸涓嶅皯:
1. 鎷瘋礉cvim.zip鍒癧浣犵殑gvim鐨勫畨瑁呯洰褰昡\vimfiles,
   鎵цunzip,(娉ㄦ剰,濡傛灉鏄痺indow鐨剈nzip,璇烽夋嫨瑙e帇緙╁埌褰撳墠鐩綍)
2. 浣犲彲浠ヨ緗竴浜涗釜浜轟俊鎭湪.vimrc鎴朹vimrc涓?渚嬪:

      let g:C_AuthorName      = 'Moonz_wu'    
      let g:C_AuthorRef       = 'Mn'                        
      let g:C_Email           = 'moonz.wu@gmail.com'           
      let g:C_Company         = 'FSky co.'   
3. 閲嶆柊鍚姩vim,騫舵墽琛屽懡浠?br>:help [浣犵殑gvim鐨勫畨瑁呯洰褰昡\vimfiles\doc鏉ヤ駭鐢熷府鍔╂枃妗?
鍩烘湰涓婂畬鎴愯繖浜涙楠?榪欎釜cvim鎻掍歡灝卞彲浠ョ敤浜?涓嶈繃榪欓噷瑕佽鏄庣殑鏄В鍘嬪畬鍚?浣犱細鐪嬪埌涓や釜鍘嬬緝鏂囦歡
c-templates-comm.zip鍜宑-templates+comm.zip,榪欎袱涓尯鍒氨鏄痗-templates+comm.zip甯︽柟娉曟敞閲?
c-templates-comm.zip娌℃湁, 浣犲彲浠ヨВ鍘嬪叾涓竴涓?騫舵嫹璐濆埌.\plugin\templates.
浣犲彲浠ュ湪瑙e帇瀹岀殑doc涓壘鍒頒竴涓猦otkey.pdf鏂囦歡,閲岄潰璁蹭簡cvim瀹氫箟鐨勬墍鏈夊揩鎹烽敭.


crefvim.vim
涓篤IM瀹氬埗鐨凜鍙傝冩墜鍐岋紝榪欐牱瀵逛簬璇硶鎴栬呭嚱鏁頒笉娓呮鐨勫湴鏂瑰彲浠ユ柟渚跨殑鏌ユ壘浜?br>瀹夎錛?br>1.灝嗚剼鏈嫹璐濆埌浣犵殑鏈湴鐩綍涓紝
Unix: ~/.vim/plugin
windows: [浣犵殑gvim鐨勫畨瑁呯洰褰昡\vimfiles\plugin
2. 灝嗗府鍔╂枃浠?鍗砫oc涓嬬殑鏂囦歡)鎷瘋礉鍒?br>  Unix:    ~/.vim/doc
  Windows: [浣犵殑gvim鐨勫畨瑁呯洰褰昡\vimfiles\doc
3.灝嗚娉曟枃浠?鍗硈yntax涓嬬殑鏂囦歡)鎷瘋礉鍒?br>  Unix:    ~/.vim/after/syntax
  Windows: [浣犵殑gvim鐨勫畨瑁呯洰褰昡\vimfiles\after\syntax


鐒跺悗鍚姩vim灝卞皢鑷姩鐨勫姞杞借剼鏈傜劧鍚庡湪vim鎵ц浠ヤ笅鍛戒護
Unix
:helptags ~/.vim/doc
windows
:helptags [浣犵殑gvim鐨勫畨瑁呯洰褰昡\vimfiles\doc
鍛靛懙錛岄偅涔堟悶瀹氬悗浣犲湪vim涓啓鍏ヤ竴涓猘toi(),榪愯鍛戒護\cr錛岀湅鐪嬫晥鏋溿?br>榪欎釜鏄痗refvim甯姪閲岀殑(<Leader> = \)
  <Leader>cr normal mode:  get help for word under cursor
                           Memory aid cr: (c)-(r)eference
  <Leader>cr visual mode:  get help for visually selected text
                           Memory aid cr: (c)-(r)eference
  <Leader>cw:              prompt for word CRefVim should search for
                           Memory aid cw: (c)-reference (w)hat
  <Leader>cc:              jump to table of contents of the C-reference manual
                           Memory aid cc: (c)-reference (c)ontents
鍏蜂綋榪橀渶鐪嬬湅甯姪銆?br>涓嬭澆:
http://www.vim.org/scripts/script.php?script_id=614

榪欓噷鏈変竴綃囧緢濂界殑璁瞯im鎻掍歡鐨勬枃绔?鎴戜篃鍊熼壌浜嗕竴閮ㄤ喚^_^!
http://www.pconline.com.cn/pcedu/soft/gj/photo/0609/877033_5.html

VIM script鍖呭惈鍑犲ぇ綾?

  • 銆銆color scheme 閰嶈壊鏂規
  • 銆銆ftplugin File type鎻掍歡錛岀壒瀹氳璦璇硶鐨勮緗紝姣斿濡備綍璇嗗埆娉ㄩ噴
  • 銆銆syntax  璇硶楂樹寒鐨勯厤鑹?
  • 銆銆plugin  鎻愪緵棰濆鍔熻兘鐨勬彃浠訛紝姣斿鏅鴻兘瀹屾垚銆佺紦鍐插尯綆$悊銆?/li>

銆銆VIM鐨剆cript瀹夎闈炲父綆鍗曪紝涓嬭澆鐨剆cript鏂囦歡鎴栬呭帇緙╁寘閲屽ご閮芥湁瀹夎璇存槑錛屽湪VIM鐨勫畨瑁呯洰褰曪紙姣斿C:\VIM64錛変笅闈㈡湁涓涓獀imfiles鐩綍錛屾妸script鏀懼埌vimfiles鐩綍涓嬪嵆鍙傚浜庡鐢ㄦ埛緋葷粺錛屽彲浠ュ湪HOME鐩綍錛堜竴鑸槸c:\Documents and Settings\ <USER_NAME>\錛変笅闈㈠緩绔嬩竴涓獀imfiles鐩綍錛屾妸script鏀劇疆鍒拌繖閲屻?/p>

銆銆涓嬮潰鏄竴浜涘ソ鐢ㄧ殑VIM鎻掍歡錛屽叿浣撲嬌鐢ㄥ姙娉曡鍙傝冨悇鑷倂im鏂囦歡澶撮儴鐨勬敞閲娿?/p>

銆銆BufExplorer.vim  *****
銆銆http://www.vim.org/scripts/script.php?script_id=42
銆銆榪欎釜鎻掍歡鍙互浣跨紪杈戝鏂囦歡鏇村姞鏂逛究錛岃瀹屾彃浠跺悗Normal mode涓嬭緭鍏be鍗沖彲鎵撳紑緙撳啿鍖哄垪琛紝鍏夋爣鏀劇疆鍦ㄦ煇涓涓枃浠朵笂鎸夊洖杞﹀嵆鍙墦寮榪欎釜鏂囦歡錛岃岀紦鍐插尯鍒楄〃鑷姩鍏抽棴銆?/p>

銆銆Taglist.vim  *****
銆銆http://www.vim.org/scripts/script.php?script_id=273
銆銆榪欎釜鎻掍歡鍙互瀹炵幇綾繪垨鑰呭嚱鏁板垪琛ㄥ姛鑳斤紝鏀寔C/C++錛宩ava錛宲erl錛宲ython錛宼cl錛宻ql錛宲hp絳夎璦錛屽畠鍙互鍦╒IM涓垱寤轟竴涓獥鍙o紝鍒楀嚭緙栬緫鐨勬簮鏂囦歡涓殑綾匯佸嚱鏁般佸彉閲忓畾涔夊垪琛紝鑰屼笖鏇存柟渚跨殑鏄繖涓垪琛ㄤ篃鎻掑叆鍦ㄤ簡鍙抽敭鑿滃崟涓紝鍒嗙被瀛樻斁錛岃闂潪甯告柟渚褲?/p>

銆銆TabBar.vim  ***
銆銆http://www.vim.org/scripts/script.php?script_id=1338
銆銆榪欎釜鎻掍歡瀹炵幇浜嗙被浼糢ltraEdit涓殑鏍囩欏電殑鍔熻兘錛岃屼笖鑳介氳繃Alt-<n>鏉ュ垏鎹紝<n>浠h〃1-9銆?/p>

銆銆minibufexpl.vim  ***
銆銆http://www.vim.org/scripts/script.php?script_id=159
銆銆瀹炵幇浜嗙被浼糢ltraEdit涓殑鏍囩涔熷姛鑳姐?/p>

銆銆c.vim   ***
銆銆http://www.vim.org/scripts/script.php?script_id=213
銆銆鎻愪緵浜嗗緢澶氫究浜嶤/C++緙栫▼鐨勫姛鑳斤紝姣斿鏂囦歡澶存ā鐗堬紝浠g爜鐗囨柇絳夈?/p>

銆銆CRefVim   **
銆銆http://www.vim.org/scripts/script.php?script_id=614
銆銆涓篤IM瀹氬埗鐨凜鍙傝冩墜鍐岋紝榪欐牱瀵逛簬璇硶鎴栬呭嚱鏁頒笉娓呮鐨勫湴鏂瑰彲浠ユ柟渚跨殑鏌ユ壘浜嗐?/p>

銆銆latex-suite  *****
銆銆http://www.vim.org/scripts/script.php?script_id=475
銆銆http://vim-latex.sf.net/
銆銆鎻愪緵浜嗗緢澶氫究浜庣紪杈慣eX/LaTeX鏂囦歡鐨勫姛鑳斤紝姣斿鍦╒IM閲岄潰緙栬瘧鎴栬呴瑙堛佽嚜鍔ㄦ彃鍏eX鏍囪絳夈?/p>

銆銆word_complete.vim ***
銆銆http://www.vim.org/scripts/script.php?script_id=73
銆銆Insert妯″紡涓嬪湪杈撳叆鐨勬椂鍊欒嚜鍔ㄨˉ鍏ㄥ崟璇嶏紝濡傛灉琛ュ叏姝g‘鍙互鎸塗ab閿帴鍙楋紝鍚﹀垯鍙互涓嶇瀹冪戶緇緭鍏ユ垨鑰呮寜Ctrl-n錛孋trl-p鍒囨崲琛ュ叏銆?娉ㄦ剰鏄緭鍏ヤ笁涓瓧絎﹀悗鎵嶅紑濮嬭ˉ鍏ㄣ?/p>

銆銆Vim JDE
銆銆http://www.vim.org/scripts/script.php?script_id=1213
銆銆鏀寔C/C++絳夌殑鑷姩瀹屾垚錛堥渶瑕乂IM 7.0錛岀紪璇戞椂鎵撳紑+ruby鐗規э級錛?/p>

銆銆cppcomplete.vim  **
銆銆http://www.vim.org/scripts/script.php?script_id=527
銆銆鑳借嚜鍔ㄥ畬鎴怌/C++/Java鐨勭粨鏋勬垨綾繪垚鍛橈紝娉ㄦ剰瀹冪殑蹇嵎閿槸Alt-l錛堝瓧姣峀錛変笉鏄疉lt-i銆?/p>

銆銆The NEAD Commenter **
銆銆http://www.vim.org/scripts/script.php?script_id=1218
銆銆鍦ㄨ澶氱被鍨嬬殑鏂囦歡涓柟渚跨殑鍔犱笂娉ㄩ噴鎴栬呭彇娑堟敞閲娿?/p>

銆銆winmanager
銆銆http://www.vim.org/scripts/script.php?script_id=95
銆銆鎶婃爣鍑嗙殑File Explorer浠ュ強Buffer Explorer鎻掍歡闆嗘垚鍦ㄤ竴璧鳳紝鎻愪緵鐜頒唬緙栬緫鍣ㄤ腑甯歌鐨勬枃浠跺垪琛ㄥ拰緙撳啿鍖哄垪琛ㄥ姛鑳姐?/p>

銆銆sketch.vim ***
銆銆http://www.vim.org/scripts/script.php?script_id=705
銆銆Draw with mouse: boxes, arrows, lines, fills. Transparent/opaque drag and drop.鐓х潃瀹冪殑鏁欑▼鍋氫竴閬嶏紝浣犲氨浼氶渿鎾間簬瀹冪殑鍒涙剰浜嗐?/p>

銆銆DrawIt.vim **
銆銆http://www.vim.org/scripts/script.php?script_id=40
銆銆鍙互鏂逛究鐨勭敾榪炵嚎鍥俱?/p>

銆銆MultipleSearch  ***
銆銆http://www.vim.org/scripts/script.php?script_id=479
銆銆MultipleSearch2.vim ***
銆銆http://www.vim.org/scripts/script.php?script_id=1183
銆銆Mark.vim  ***
銆銆http://www.vim.org/scripts/script.php?script_id=1238
銆銆otf.vim   **
銆銆http://www.vim.org/scripts/script.php?script_id=634
銆銆榪欎簺鎻掍歡鍙互鍚屾椂楂樹寒鏄劇ず澶氭鎼滅儲緇撴灉錛岃繖涓壒鎬ч潪甯告湁鍒╀簬鏄劇ず浠g爜涓煇浜涘彉閲忔垨鍑芥暟鐨勮皟鐢ㄤ綅緗?/p>

銆銆SearchComplete.vim *
銆銆http://www.vim.org/scripts/script.php?script_id=474
銆銆鍙互鐢?鎼滅儲鏃舵寜Tab琛ュ叏瑕佹悳绱㈢殑鍗曡瘝銆?/p>

銆銆Vim Intellisense
銆銆http://insenvim.sourceforge.net
銆銆欏懼悕鎬濅箟錛屾鎻掍歡鐢ㄤ簬緇橵IM鎻愪緵鏅鴻兘瀹屾垚鍔熻兘錛屾敮鎸丆++錛孋#錛孞ava錛孞SP錛孒TML錛孲QL錛孹ML錛岀瑪鑰呭畨瑁呭悗涓鐩存噿寰楅厤緗紝涔熷氨娌$敤涓娿?/p>

銆銆project
銆銆http://www.vim.org/scripts/script.php?script_id=69
銆銆鎻愪緵涓浜汭DE鍔熻兘錛岀湅浠嬬粛浼間箮寰堜笉閿欍?/p>

銆銆JavaBrower
銆銆http://www.vim.org/scripts/script.php?script_id=588
銆銆鎻愪緵鏂囦歡涓璊ava綾葷殑鏍戠姸鍒楄〃銆?/p>

銆銆vimspell
銆銆http://www.vim.org/scripts/script.php?script_id=465
銆銆ispell or aspell based spell checker with fly-spelling銆?/p>

銆銆cream
銆銆http://cream.sourceforge.net/
銆銆涓濂楅厤緗枃浠訛紝鍙互鎶奦IM鐨勭晫闈㈡敼鎴怌UA錛圕ommon User Access錛夋ā鍨嬶紝闄嶄綆VIM鐨勫涔犻毦搴︼紝涓漢涓嶆帹鑽愯繖縐嶅仛娉曪紝涓嶈繃鍏朵腑鏈変簺楂樼駭閰嶇疆鍊煎緱瀛︿範錛堟湁鎰忔濈殑鏄疎macs涔熸湁綾諱技鐨勯」鐩? Easymacs錛孍macsW32錛夈?/p>

銆銆IComplete
銆銆http://icomplete.sf.net
銆銆鎼厤VIM 7.0鐨凮mni Complete錛屽彲浠ュ仛鍒癈/C++鐨勬櫤鑳藉畬鎴愬姛鑳?



T.S Liu 2007-12-29 22:12 鍙戣〃璇勮
]]>
vim+cscope+ctags嫻忚婧愮爜http://www.shnenglu.com/liu1061/articles/38186.htmlT.S LiuT.S LiuMon, 10 Dec 2007 11:16:00 GMThttp://www.shnenglu.com/liu1061/articles/38186.htmlhttp://www.shnenglu.com/liu1061/comments/38186.htmlhttp://www.shnenglu.com/liu1061/articles/38186.html#Feedback0http://www.shnenglu.com/liu1061/comments/commentRss/38186.htmlhttp://www.shnenglu.com/liu1061/services/trackbacks/38186.html
1. cscope 鐢ㄤ簬鐢熸垚绱㈠紩鏂囦歡鐨勯夐」錛?br>-R: 鍦ㄧ敓鎴愮儲寮曟枃浠舵椂錛屾悳绱㈠瓙鐩綍鏍戜腑鐨勪唬鐮?br>-b: 鍙敓鎴愮儲寮曟枃浠訛紝涓嶈繘鍏scope鐨勭晫闈?br>-q: 鐢熸垚cscope.in.out鍜宑scope.po.out鏂囦歡錛屽姞蹇玞scope鐨勭儲寮曢熷害
-k: 鍦ㄧ敓鎴愮儲寮曟枃浠舵椂錛屼笉鎼滅儲/usr/include鐩綍
-i: 濡傛灉淇濆瓨鏂囦歡鍒楄〃鐨勬枃浠跺悕涓嶆槸cscope.files鏃訛紝闇瑕佸姞姝ら夐」鍛婅瘔cscope鍒板摢鍎垮幓鎵炬簮鏂囦歡鍒楄〃銆傚彲浠ヤ嬌鐢?#8220;-”錛岃〃紺虹敱鏍囧噯杈撳叆鑾峰緱鏂囦歡鍒楄〃
-I dir: 鍦?I閫夐」鎸囧嚭鐨勭洰褰曚腑鏌ユ壘澶存枃浠?br>-u: 鎵弿鎵鏈夋枃浠訛紝閲嶆柊鐢熸垚浜ゅ弶绱㈠紩鏂囦歡
-C: 鍦ㄦ悳绱㈡椂蹇界暐澶у皬鍐?br>-P path: 鍦ㄤ互鐩稿璺緞琛ㄧず鐨勬枃浠跺墠鍔犱笂鐨刾ath錛岃繖鏍鳳紝浣犱笉鐢ㄥ垏鎹㈠埌浣犳暟鎹簱鏂囦歡鎵鍦ㄧ殑鐩綍涔熷彲浠ヤ嬌鐢ㄥ畠浜?br>濡傛灉浣犵殑婧愮爜涓彧鍚湁.c,.h鏂囦歡錛屼綘鍙互鐩存帴浣跨敤 cscope -Rbq
涓鑸嬌鐢ㄦ柟娉曪細find ./ -name "*.c" -or -name "*.h" -or -name "*.cpp" -or -name "*.S" | cscope -Rbq
2. 鎺ョ潃浣犲氨鍙互浣跨敤vim鏉ユ墦寮涓涓枃浠舵潵嫻忚緙栬緫浠g爜浜嗐備嬌鐢╟s(cscope鍐?鍛戒護鏉ュ疄鐜板嚱鏁扮殑璋冪敤錛?br>瀹氫箟鏌ユ壘錛?br>f: 鏌ユ壘騫舵墦寮鏂囦歡錛岀被浼紇im鐨刦ind鍔熻兘
s: 鏌ユ壘C璇█絎﹀彿錛屽嵆鏌ユ壘鍑芥暟鍚嶃佸畯銆佹灇涓懼肩瓑鍑虹幇鐨勫湴鏂?br>g: 鏌ユ壘鍑芥暟銆佸畯銆佹灇涓劇瓑瀹氫箟鐨勪綅緗紝綾諱技ctags鎵鎻愪緵鐨勫姛鑳?br>d: 鏌ユ壘鏈嚱鏁拌皟鐢ㄧ殑鍑芥暟
c: 鏌ユ壘璋冪敤鏈嚱鏁扮殑鍑芥暟
t: 鏌ユ壘鎸囧畾鐨勫瓧絎︿覆
e: 鏌ユ壘egrep妯″紡錛岀浉褰撲簬egrep鍔熻兘錛屼絾鏌ユ壘閫熷害蹇浜?br>i: 鏌ユ壘鍖呭惈鏈枃浠剁殑鏂?br>
涓鑸嬌鐢ㄦ柟寮忎負cs f t var_name
浜屻佺敤vim + ctags闃呰婧愪唬鐮?
棣栧厛鎴戜滑蹇呴渶緇欒闃呰鐨勬簮浠g爜寤轟竴涓垨鑰呭涓猼ags鏂囦歡錛屽湪shell涓嬪埄鐢╟tags鍛戒護緇欏崟涓枃浠跺緩绔媡ags濡備笅錛?br>     ctags  filename.c
瑕佺粰鍚屼竴涓洰褰曚笅鐨勬墍鏈夋枃浠跺緩绔媡ags濡備笅錛?br>     ctags -R
榪欐椂鍦╰ags鏂囦歡鎵鍦ㄧ殑鐩綍涓嬫墦寮婧愭枃浠墮槄璇伙紝vim灝變細鑷姩璋冪敤tags鏂囦歡銆?br>濡傛灉tags鏂囦歡涓嶅湪褰撳墠鐩綍涓嬶紝鍙互鍦ㄥ懡浠ゆā寮忎笅鐢ㄤ笅闈㈢殑鍛戒護璁劇疆tag鏂囦歡
     :set tag=tag_file_path

瑕佸湪vim涓嬭煩鍒頒竴涓嚱鏁扮殑瀹氫箟澶勫彲浠ュ湪鍛戒護妯″紡涓嬬敤涓嬮潰鐨勫懡浠わ細
     :tag fuction_name
榪欎釜鍛戒護灝嗘妸浣犲甫鍒癴uction_name鍑芥暟鐨勫畾涔夊銆?br>鍙﹀錛宑trl + ]鍛戒護浼氭妸褰撳墠鍏夋爣涓嬬殑鍗曡瘝浣滀負tag鐨勫悕瀛楋紝騫剁洿鎺ヨ煩杞?br>鐢╟trl + t鍛戒護鍙互鍥炲埌鍓嶄竴涓猼ag錛屼綘鍙互鍦╟trl + t鍓嶉潰鍔犱竴涓暟瀛?br>琛ㄧず寰鍥炶煩鐨勫眰鏁般?br>浣跨敤Ctrl + g鍙互鏄劇ず褰撳墠姝e湪緙栬緫鐨勬枃浠跺悕錛屽強鎵鍦ㄧ殑琛屽彿
鍙﹀錛屽鏋滄簮鏂囦歡鐨勬帓鐗堟瘮杈冧貢鐨勮瘽錛屽彲浠ラ氳繃鍛戒護gg=G鏉ユ牸寮忓寲鏁翠釜婧愭枃浠?br>涓嬮潰榪欏嚑涓緗彲浠ュ府鍔╀綘鏇村ソ鐨勮緗唬鐮佺緝榪?br>      :set cindent
      :set shiftwidth=4
      :set tabstop=4
 Linux鑱旂洘鏀墮泦鏁寸悊 ,杞創璇鋒爣鏄庡師濮嬮摼鎺?a title=Linux鑱旂洘 >Linux鑱旂洘

T.S Liu 2007-12-10 19:16 鍙戣〃璇勮
]]>
the mean of the vim commandhttp://www.shnenglu.com/liu1061/articles/38145.htmlT.S LiuT.S LiuMon, 10 Dec 2007 02:55:00 GMThttp://www.shnenglu.com/liu1061/articles/38145.htmlhttp://www.shnenglu.com/liu1061/comments/38145.htmlhttp://www.shnenglu.com/liu1061/articles/38145.html#Feedback0http://www.shnenglu.com/liu1061/comments/commentRss/38145.htmlhttp://www.shnenglu.com/liu1061/services/trackbacks/38145.html1. Motions and operators    *operator*

The motion commands can be used after an operator command, to have the command
operate on the text that was moved over.  That is the text between the cursor
position before and after the motion.  Operators are generally used to delete
or change text.  The following operators are available:

    |c|        c      change
    |d|        d     delete
    |y|        y     yank into register (does not change the text)
    |~|       ~     swap case (only if 'tildeop' is set)
    |g~|     g~   swap case
    |gu|     gu    make lowercase
    |gU|     gU    make uppercase
    |!|        !      filter through an external program
    |=|       =     filter through 'equalprg' or C-indenting if empty
    |gq|     gq    text formatting
    |g?|     g?    ROT13 encoding
    |>|      >     shift right
    |<|      <     shift left
    |zf|      zf     define a fold
    |g@|    g@      call function set with the 'operatorfunc' option

鍦ㄥ嚱鏁頒腑縐誨姩鍏夋爣
    [[ 杞埌涓婁竴涓綅浜庣涓鍒楃殑“{”
    ]] 杞埌涓嬩竴涓綅浜庣涓鍒楃殑“{”
    { 杞埌涓婁竴涓┖琛?br>    } 杞埌涓嬩竴涓┖琛?br>    gd 杞埌褰撳墠鍏夋爣鎵鎸囩殑灞閮ㄥ彉閲忕殑瀹氫箟
    * 杞埌褰撳墠鍏夋爣鎵鎸囩殑鍗曡瘝涓嬩竴嬈″嚭鐜扮殑鍦版柟
    # 杞埌褰撳墠鍏夋爣鎵鎸囩殑鍗曡瘝涓婁竴嬈″嚭鐜扮殑鍦版柟
鎷彿鐨勫尮閰?br>    % 鐢ㄦ潵榪涜灝忔嫭鍙楓佷腑鎷彿鍜屽ぇ鎷彿鐨勫尮閰?br>

taglist甯姪鏂囦歡

<CR>          璺沖埌鍏夋爣涓媡ag鎵瀹氫箟鐨勪綅緗紝鐢ㄩ紶鏍囧弻鍑繪tag鍔熻兘涔熶竴鏍?br>o             鍦ㄤ竴涓柊鎵撳紑鐨勭獥鍙d腑鏄劇ず鍏夋爣涓媡ag
<Space>       鏄劇ず鍏夋爣涓媡ag鐨勫師鍨嬪畾涔?br>u             鏇存柊taglist紿楀彛涓殑tag
s             鏇存敼鎺掑簭鏂瑰紡錛屽湪鎸夊悕瀛楁帓搴忓拰鎸夊嚭鐜伴『搴忔帓搴忛棿鍒囨崲
x             taglist紿楀彛鏀懼ぇ鍜岀緝灝忥紝鏂逛究鏌ョ湅杈冮暱鐨則ag
+             鎵撳紑涓涓姌鍙狅紝鍚寊o
            灝唗ag鎶樺彔璧鋒潵錛屽悓zc
            鎵撳紑鎵鏈夌殑鎶樺彔錛屽悓zR
            灝嗘墍鏈塼ag鎶樺彔璧鋒潵錛屽悓zM
[[            璺沖埌鍓嶄竴涓枃浠?br>]]            璺沖埌鍚庝竴涓枃浠?br>q             鍏抽棴taglist紿楀彛
<F1>          鏄劇ず甯姪
""""""""""""""""""""""""""""""
   " Tag list (ctags)
   """"""""""""""""""""""""""""""
   if MySys() == "windows"                "璁懼畾windows緋葷粺涓璫tags紼嬪簭鐨勪綅緗?/span>
     let Tlist_Ctags_Cmd = 'ctags'
   elseif MySys() == "linux"              "璁懼畾windows緋葷粺涓璫tags紼嬪簭鐨勪綅緗?/span>
     let Tlist_Ctags_Cmd = '/usr/bin/ctags'
   endif
   let Tlist_Show_One_File = 1            "涓嶅悓鏃舵樉紺哄涓枃浠剁殑tag錛屽彧鏄劇ず褰撳墠鏂囦歡鐨?/span>
   let Tlist_Exit_OnlyWindow = 1          "濡傛灉taglist紿楀彛鏄渶鍚庝竴涓獥鍙o紝鍒欓鍑簐im
   let Tlist_Use_Right_Window = 1         "鍦ㄥ彸渚х獥鍙d腑鏄劇ずtaglist紿?/span>



T.S Liu 2007-12-10 10:55 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            亚洲一区二区三区国产| 亚洲欧美制服另类日韩| 欧美大片免费观看在线观看网站推荐| 亚洲欧美日韩精品久久| 国产精品人人做人人爽人人添| 香蕉久久夜色| 久久精品国产99国产精品澳门| 亚洲第一黄网| 亚洲精品自在在线观看| 国产精品久久久久久av福利软件| 欧美一级专区| 久久久久久一区| av不卡在线看| 午夜精品国产更新| 国内精品久久久久久久影视麻豆 | 国产精品视频午夜| 久久久久国产精品午夜一区| 久久影视三级福利片| 日韩亚洲欧美成人一区| 亚洲欧美日本伦理| 亚洲高清电影| 亚洲香蕉成视频在线观看| 国产亚洲精品久| 亚洲国产视频一区| 国产精品国产a级| 欧美99在线视频观看| 欧美色欧美亚洲另类二区| 久久亚洲私人国产精品va| 欧美精品一区二区三区一线天视频| 亚洲一区久久久| 久久人人97超碰精品888| 亚洲一二三四久久| 久久这里只有精品视频首页| 亚洲欧美卡通另类91av| 毛片av中文字幕一区二区| 亚洲欧美激情一区| 麻豆国产va免费精品高清在线| 亚洲欧美在线高清| 免费永久网站黄欧美| 久久久久久久精| 欧美午夜精品久久久久久久| 欧美国产日韩一二三区| 国产欧美精品一区aⅴ影院| 亚洲精品看片| 亚洲福利一区| 欧美有码在线观看视频| 亚洲女同性videos| 欧美激情在线有限公司| 美日韩精品视频免费看| 国产亚洲精品久| 亚洲性色视频| 亚洲一区久久久| 欧美裸体一区二区三区| 欧美高清一区| 亚洲第一区在线观看| 午夜精品视频在线| 亚洲欧美日韩在线高清直播| 欧美日韩亚洲高清一区二区| 亚洲第一免费播放区| 亚洲大胆av| 久久久一区二区三区| 久久精品在线| 国产亚洲欧美日韩日本| 亚洲欧美日韩久久精品 | 国产精品美女黄网| 日韩亚洲欧美在线观看| 日韩一级大片在线| 欧美极品在线观看| 亚洲日本欧美在线| 亚洲神马久久| 欧美午夜剧场| 午夜精品区一区二区三| 欧美在线观看天堂一区二区三区| 国产精品露脸自拍| 亚洲永久网站| 久久久久久高潮国产精品视| 黄色一区二区三区| 久久久久九九九| 亚洲国产精品久久久久秋霞蜜臀| 亚洲精品乱码| 欧美色一级片| 先锋a资源在线看亚洲| 欧美一区二区三区四区高清| 国产亚洲毛片| 久久先锋影音| 99re66热这里只有精品4| 亚洲欧美日韩在线高清直播| 国产日韩精品久久| 久久午夜激情| 一区二区三区三区在线| 欧美一级视频精品观看| 伊人久久综合| 欧美日韩在线视频观看| 新片速递亚洲合集欧美合集| 欧美成人精品一区二区三区| av成人免费| 国产午夜精品一区二区三区欧美| 久久亚洲精品一区二区| 亚洲精品人人| 久久久91精品| 一区二区三区免费观看| 国产欧美高清| 欧美经典一区二区| 欧美亚洲在线视频| 亚洲欧洲日产国产综合网| 久久av红桃一区二区小说| 亚洲国产国产亚洲一二三| 欧美日本韩国在线| 久久精品一区四区| 99精品免费| 欧美成人一区二区三区| 亚洲欧美一区二区三区在线 | 欧美日韩一区二区三区在线 | 欧美午夜寂寞影院| 久久人体大胆视频| 亚洲一区二区三区乱码aⅴ| 男人的天堂亚洲| 亚洲欧美美女| 日韩网站在线| 亚洲国产精品va在线观看黑人| 国产精品久久久久久户外露出| 欧美xx视频| 欧美影院精品一区| 亚洲永久字幕| 99精品国产在热久久| 亚洲国产精品成人va在线观看| 久久精品一区二区三区中文字幕| 亚洲一区二区三区免费视频 | 国产一区三区三区| 国产精品多人| 欧美日韩免费观看一区二区三区 | 国产偷国产偷亚洲高清97cao| 欧美激情综合色| 久久人人97超碰人人澡爱香蕉| 亚洲摸下面视频| 亚洲天堂免费在线观看视频| 亚洲靠逼com| 亚洲欧洲日本专区| 亚洲国产人成综合网站| 欧美成人精品一区| 麻豆成人在线观看| 久热精品视频在线观看一区| 久久美女性网| 久久伊伊香蕉| 蜜臀av国产精品久久久久| 久久精品国产99国产精品澳门| 欧美亚洲在线| 欧美专区在线观看一区| 欧美影院午夜播放| 久久本道综合色狠狠五月| 欧美在线免费观看| 久久精品一区二区三区不卡牛牛 | 亚洲精品免费看| 亚洲精品三级| 99精品视频免费| 亚洲午夜激情网页| 香蕉国产精品偷在线观看不卡| 午夜视频精品| 久久久91精品国产| 欧美r片在线| 亚洲欧洲一区二区在线观看 | 久久久久se| 欧美成黄导航| 亚洲精品日本| 亚洲欧美日韩国产中文在线| 久久成人亚洲| 免费在线播放第一区高清av| 欧美韩日一区| 国产精品久久久久久久午夜片| 国产午夜精品理论片a级探花| 一区二区三区在线观看欧美| 亚洲精品黄色| 亚洲欧美日韩在线| 免费视频久久| 99国产精品国产精品久久| 亚洲午夜精品一区二区| 久久久精品五月天| 欧美日韩国产麻豆| 国产婷婷色一区二区三区| 亚洲高清视频中文字幕| 亚洲视频网站在线观看| 久久婷婷成人综合色| 亚洲精品欧美专区| 久久av一区二区三区亚洲| 欧美精品一区二区三区蜜臀| 国产视频精品xxxx| 99精品99| 久久在线免费视频| av成人免费在线观看| 久久午夜影视| 国产亚洲一本大道中文在线| 亚洲精品资源| 久久综合中文| 亚洲欧美国产精品桃花| 欧美国产一区二区三区激情无套| 国产日韩亚洲| 亚洲综合色丁香婷婷六月图片| 亚洲电影中文字幕| 欧美在线一级视频| 国产精品久久一卡二卡|