C editing with VIM HOWTO

Siddharth Heroor

朏夑桋巎 - 擔杮岅栿

yasufumi.haga@nifty.com

Revision History                                                        
Revision v1.0           2001擭1寧14擔           Revised by: sh          
戞2斉丅娫堘偄傪偄偔偮偐廋惓丅                                           
Revision v0.1           2000擭12寧4擔           Revised by: sh          
弶斉丅僼傿乕僪僶僢僋懸偭偰傑偡丅                                        

偙偺暥彂偼丄C 尵岅傗C++, Java偲偄偭偨峔暥偑帡偨懠偺尵岅偱彂偄偨僼傽僀儖
傪曇廤偡傞嵺偺擖栧曇偲側傞傕偺偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

Table of Contents
1. 偼偠傔偵
2. 摦偒傑傢傞
   
    2.1. w, e, 偍傛傃 b 偺僉乕僗僩儘乕僋
    2.2. {, }, [[ 偲 ]] 偺僉乕僗僩儘乕僋
    2.3. % 僉乕僗僩儘乕僋
   
3. C 偺僼傽僀儖偺拞偺彑庤側埵抲偵僕儍儞僾
   
    3.1. ctags
    3.2. 儅乕僋
    3.3. gd 僉乕僗僩儘乕僋
   
4. 扨岅偺帺摦曗姰
5. 帺摦揑側惍宍
   
    5.1. 寘悢偺惂尷
    5.2. 僐乕僪傪帺摦揑偵僀儞僨儞僩偡傞
    5.3. 拲庍
   
6. 暋悢偺僼傽僀儖傪曇廤偡傞
7. Quickfix
8. 挊嶌尃
9. 嶲峫暥專
10. 擔杮岅斉幱帿

1. 偼偠傔偵

偙偺暥彂偺栚揑偼 C 尵岅偱彂偄偰偁傞僼傽僀儖傪VIM偱曇廤偡傞帪偵棙梡偱偒
傞丄曇廤僆僾僔儑儞傪VIM偺弶怱幰儐乕僓乕偵徯夘偡傞偙偲偱偡丅偙偺暥彂偱偼
僐儅儞僪傗僉乕僗僩儘乕僋傪偄偔偮偐徯夘偟傑偡偑丄偙偆偄偭偨傕偺傪巊偊偽
丄VIM偱 C 尵岅偺僼傽僀儖傪曇廤偡傞嵺偺丄僾儘僌儔儅偺惗嶻惈傪忋偘傞偺偵
栶棫偮偙偲偱偟傚偆丅

偙偺暥彂偺撪梕偼丄VIM傪偳偆巊偊偽 C 尵岅偺僼傽僀儖偑曇廤偱偒傞偺偐傪夝
愢偡傞偙偲偱偡丅偱傕偦偺撪梕偺戝敿偼 vi 偵傕揔梡偱偒傞傕偺偩偟丄偝傜偵
丄偙偙偱 C 尵岅偺僼傽僀儖曇廤偵娭偟偰怗傟偰偄傞傕偺偼 C++ 傗 Java, 偦偟
偰懠偺帡偨尵岅偵傕戝側傝彫側傝揔梡偱偒傞傕偺偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

2. 摦偒傑傢傞

2.1. w, e, 偍傛傃 b 偺僉乕僗僩儘乕僋

僼傽僀儖偺拞傪摦偒傑傢傞偵偼w, e 偦偟偰 b 偲偄偭偨僉乕偑巊偊傑偡丅VIM偱
偼 C 尵岅偺僾儘僌儔儉偵偁傞條乆側僩乕僋儞偑幆暿偱偒傑偡丅

埲壓偺傛偆側 C 偺僐乕僪傪峫偊偰傒傑偡丅

Figure 1. C 僾儘僌儔儉偺堦晹

[moving1]

僇乕僜儖偑 if 暥偺愭摢偺埵抲偵偁傞偲偟傑偡丅 w 傪堦夞墴偡偲僇乕僜儖偑嵟
弶偺 (偵僕儍儞僾偟傑偡丅傕偆堦搙 w 傪僞僀僾偡傞偲丄偦偺僇乕僜儖偼 NULL
偵堏傝傑偡丅偦偺師偼僇乕僜儖偑 == 僩乕僋儞偵堏摦偡傞偱偟傚偆丅偦傟埲崀
偺僉乕僗僩儘乕僋偱偼丄師偺傛偆偵堏摦偟傑偡丅 x... )... &&... y... >... 
z... 偦偟偰嵟屻偵 )... 偱偡丅

e 偼 w 偲帡偰偄傑偡偑丄尰嵼僇乕僜儖偑偁傞応強偺尵梩偺嵟屻偵堏傞偺偱偁偭
偰丄偦偺師偺尵梩偺嵟弶偵偼堏傜側偄揰偩偗偑堘偄傑偡丅

b 偼w偲偼惓斀懳偱丄僇乕僜儖偼媡曽岦偵摦偒傑偡丅偩偐傜 b 偺僉乕僗僩儘乕
僋傪巊偊偽屻傠岦偒偵堏摦偱偒傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

2.2. {, }, [[ 偲 ]] 偺僉乕僗僩儘乕僋

{ 偲 } 偼抜棊偐傜抜棊傊偲堏摦偡傞偺偵巊偄傑偡丅 C 尵岅傪曇廤偟偰偄傞帪
偵偼丄偙傟傜偺僉乕偼堄枴偑庒姳堘偭偰偒傑偡丅 C 尵岅偱偼抜棊偲偄偆偺傪嬻
峴偱暘偗傜傟偨峴偺夠偩偲尒側偡偺偱偡丅

椺

Figure 2. 傕偆堦偮偺 C 僾儘僌儔儉偺堦晹

[moving2]

忋偺椺偱偼抜棊偑擇偮尰傟偰偄傑偡丅偁傞抜棊偐傜暿偺抜棊傊偼娙扨偵堏摦偱
偒傑偡丅{ 偲 } 偲偄偆僉乕傪巊偊偽偄偄偺偱偡丅{ 偼僇乕僜儖偑抜棊傪捛偭偰
忋偺曽偵堏摦偟偰偄偒丄}偼僇乕僜儖偑抜棊傪捛偭偰壓偺曽偵堏摦偟偰偄偒傑偡
丅

恖偵偼偦傟偧傟僐乕僨傿儞僌僗僞僀儖偑偁傝丄僗僥乕僩儊儞僩偺榑棟揑側廤傑
傝傪丄堦偮埲忋偺嬻峴偱暘偗偰暘椶偟偰偄傑偡丅

椺

Figure 3. 暿偺 C 僾儘僌儔儉偺堦晹

[moving3]

{ 偲 } 僉乕偼偙偆偄偭偨忬嫷偱偼旕忢偵栶棫偮傕偺偱偡丅偁傞乽抜棊乿偐傜暿
偺抜棊傊偲偲偰傕娙扨偵堏摦偱偒傞偺偱偡丅

栶偵棫偮傕偆堦偮暿偺僉乕偺慻偑[[ 偲 ]] 偺僉乕偱偡丅偙傟傜偺僉乕傪巊偆偲
嵟弶偺寘偵偁傞捈慜偺 { 傗偁傞偄偼師偺 { 偵僕儍儞僾偱偒傑偡丅

椺

Figure 4. C 偺僐乕僪偺師偺堦晹

[moving4]

foo() 傪曇廤偟偰偄偨偲偟偰丄崱搙偼 bar() 傪曇廤偟偨偄偲偟傑偟傚偆丅偙偙
偱扨偵 ]] 偲僞僀僾偟偰偔偩偝偄丅偡傞偲僇乕僜儖偼 bar() 娭悢偺嵍妵屖 "{"
偵堏傞偼偢偱偡丅媡曽岦偼庒姳堘偭偰偒傑偡丅bar() 偺拞傎偳偵偄偨偲偟偰丄
[[ 偲僞僀僾偡傞偲丄僇乕僜儖偼嵟弶偺 "{" 丄偮傑傝 bar() 帺恎偺嵟弶丄偵堏
摦偡傞偺偱偡丅 foo() 偺嵟弶偵堏傞偵偼傕偆堦搙 [[ 偲僞僀僾偟側偗傟偽側傝
傑偣傫丅偱傕壗夞傕僉乕傪懪偮戙傢傝偵丄 2[[ 偲僞僀僾偡傟偽丄嵟彮偺僉乕僗
僩儘乕僋偱僇乕僜儖傪捈慜偺娭悢偺嵟弶偵傕偭偰偄偗傞偺偱偡丅

摨偠傛偆側僉乕僗僩儘乕僋偺丄傕偆堦偮暿偺慻偑 ][ 偲 [] 偱偡丅][ 偩偲僇乕
僜儖偼嵟弶偺寘偵偁傞丄師偺 } 偵堏傝傑偡丅 foo() 傪曇廤偟偰偄偨偲偟偰
foo() 偺嵟屻偵峴偒偨偄偲偟傑偡丅偦偺応崌偼 ][ 偱偦偙偵峴偗傑偡丅摨條偵
丄bar() 偺曇廤拞偵 foo() 偺嵟屻偵峴偒偨偄応崌偼丄[] 偑僇乕僜儖傪偦偙偵
傕偭偰偄偒傑偡丅

僉乕僗僩儘乕僋偺妎偊曽偱偡偑丄暘偗偰峫偊傟偽偄偄偺偱偡丅嵟弶偺僉乕僗僩
儘乕僋偼忋偑傞偐壓偑傞偐傪帵偟偰偄傑偡丅 [偑忋偑傝偱丄 ] 偑壓偑傝偱偡丅
師偺僉乕僗僩儘乕僋偼堦抳偡傞妵屖偺僞僀僾傪帵偟偰偄傑偡丅捈慜偺僉乕僗僩
儘乕僋偲摨偠側傜僇乕僜儖偼 { 偵堏摦偡傞偼偢偱偟傚偆偟丄僉乕僗僩儘乕僋偑
堘偊偽丄僇乕僜儖偼 } 偵堏摦偡傞偱偟傚偆丅

]], ][, [[ 偍傛傃 [] 偺僉乕僗僩儘乕僋偱拲堄偡傞偙偲偼丄偙傟傜偑嵟弶偺寘
偵偁傞妵屖偲堦抳偡傞偲偄偆偙偲偱偡丅傕偟嵟弶偺寘偵偁傞偐偳偆偐偵娭學側
偔丄忋曽岦傗壓曽岦偵偁傞妵屖偡傋偰傪尒偮偗偨偄偲偟偰傕丄偦傟偼偱偒傑偣
傫丅偱傕VIM偺僪僉儏儊儞僩偵偼夞旔嶔偑彂偐傟偰偄傑偡丅慡偰偺妵屖傪尒偮偗
傞偵偼僉乕僗僩儘乕僋傪儅僢僾偟側偗傟偽側傝傑偣傫丅儅僢僺儞僌偺帪娫傪愡
栺偡傞丄偍彠傔偺儅僢僺儞僌偼師偺偲偍傝偱偡丅

:map [[ ?{<CTRL-VCTRL-M>w99[{

:map ][ /}<CTRL-VCTRL-M>b99]}

:map ]] j0[[%/{<CTRL-VCTRL-M>

:map [] k$][%?}<CTRL-VCTRL-M>

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

2.3. % 僉乕僗僩儘乕僋

% 偼僇乕僜儖偺偲偙傠偵偁傞傕偺偵堦抳偡傞傕偺傪尒偮偗傞偺偵巊偄傑偡丅僇
乕僜儖偺偲偙傠偵偁傞傕偺偼丄彫妵屖偱傕丄拞妵屖丄戝妵屖偱傕偐傑偄傑偣傫
丅% 僉乕傪墴偣偽丄僇乕僜儖偼懳墳偡傞堦抳偟偨妵屖傊僕儍儞僾偡傞偱偟傚偆
丅

悢偁傞拞偱傕丄% 僉乕僗僩儘乕僋偼 #if, #ifdef, #else #elif 偍傛傃 #endif
偲堦抳偡傞傕偺傪尒偮偗傞偺偵巊偊傑偡丅

偙偺僉乕僗僩儘乕僋偼懠恖偑彂偄偨僐乕僪傪妋擣偡傞嵺偵旕忢偵栶棫偮傕偺偱
偡丅

Figure 5. 師偺 C 偺僐乕僪偺堦晹

[moving5]

忋婰偺僐乕僪傪僠僃僢僋偡傞応崌偵偼妵屖偑惓偟偄偙偲傕僠僃僢僋偟傑偡丅%
偼偁傞妵屖偐傜乮懳墳偡傞妵屖傑偱乯僕儍儞僾偡傞偺偵巊偊傑偡丅偦偺媡傕摨
偠偱偡丅偙偺傛偆偵丄偳偺嵍妵屖偑偳偺塃妵屖偵懳墳偡傞偺偐傪尒偮偗偨傝丄
偦偺忣曬傪巊偭偰僐乕僪傪妋擣偡傞偺偵巊偆偺偱偡丅

摨偠傛偆偵丄% 偼偁傞 { 偐傜懳墳偡傞 } 偵僕儍儞僾偡傞偺偵傕巊偊傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

3. C 偺僼傽僀儖偺拞偺彑庤側埵抲偵僕儍儞僾

3.1. ctags

僞僌偲偄偆偺偼丄応強偺忣曬傪曐帩偡傞椶偺傕偺偱偡丅偙傟偼 C 尵岅傪棟夝偟
偨傝偦偺僼傽僀儖傪曇廤偟偨傝偡傞応崌偵旕忢偵栶棫偮傕偺偱偡丅傑偨偁傞娭
悢偑屇偽傟偰偄傞応強偐傜偦偺掕媊応強偵僕儍儞僾偟偨傝丄偦偙偐傜栠偭偨傝
偡傞応崌偵傕偲偰傕栶棫偪傑偡丅

埲壓傪椺偵偲傝傑偡丅

Figure 6. 僞僌偺椺

[tags]

崱 foo() 傪曇廤拞偵娭悢 bar() 傑偱峴偔偲偟傑偟傚偆丅偝偰丄bar() 偑壗傪
偟偰偄傞偺偐傪抦傞偵偼僞僌傪棙梡偟傑偡丅偙偺娭悢偺掕媊偵僕儍儞僾偟偰丄
偦傟偐傜屻偱栠偭偰偒傑偡丅昁梫側傜 bar() 偺拞偱屇傫偱偄傞暿偺娭悢偵僕儍
儞僾偟偰丄栠偭偰偔傞偙偲傕偱偒傑偡丅

僞僌傪巊偆偵偼丄嵟弶偵偡傋偰偺僜乕僗僼傽僀儖偱 ctags 僾儘僌儔儉傪幚峴偟
側偗傟偽側傝傑偣傫丅偙偺僾儘僌儔儉偼 tags 偲偄偆僼傽僀儖傪惗惉偟傑偡丅
偙偺 tags 偲偄偆僼傽僀儖偵偼偡傋偰偺娭悢掕媊傪巜偟偰偄傞億僀儞僞乕偑擖
偭偰偍傝丄VIM偼偦偺娭悢掕媊偺応強偵峴偔偺偵偙偺僼傽僀儖傪巊偄傑偡丅

僕儍儞僾偟偰峴偒棃偡傞偺偵巊偆幚嵺偺僉乕僗僩儘乕僋偼丄 CTRL-] 偲 CTRL-T
偵側傝傑偡丅 foo() 偺拞偺 bar() 傪僐乕儖偟偰偄傞応強偱 CTRL-] 傪懪偮偲
丄僇乕僜儖傪 bar() 偺嵟弶偵傕偭偰偄偒傑偡丅 hitting CTRL-T 傪懪偰偽丄
bar() 偐傜foo() 傊僕儍儞僾偟偰栠傟傑偡丅

ctags 偼師偺傛偆偵偟偰屇傃弌偟傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆            $ ctags options file(s)                                 劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

尰嵼偺僨傿儗僋僩儕偵偁傞 *.c 僼傽僀儖慡晹偐傜 tags 僼傽僀儖傪嶌傞応崌丄
偡傞昁梫偑偁傞偺偼埲壓偺偙偲偩偗偱偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆            $ ctags *.c                                             劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

暿乆偺僒僽僨傿儗僋僩儕偵 C 偺僼傽僀儖偑偁傞傛偆側僜乕僗僣儕乕偺応崌偵偼
丄偦偺僜乕僗僣儕乕偺堦斣忋偱 -R 僆僾僔儑儞傪晅偗偰 ctags 傪屇傃傑偡丅偡
傞偲偦偺僜乕僗僣儕乕偵偁傞偡傋偰偺娭悢偺僞僌偑擖偭偨 tags 僼傽僀儖偑偱
偒傑偡丅椺偊偽埲壓偺傛偆偵偟傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆            $ ctags -R *.c                                          劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

ctags 偵偼懠偵傕偨偔偝傫偺僆僾僔儑儞偑巊偊傑偡丅偙傟傜偺僆僾僔儑儞偺愢
柧偼 ctags 偺 man 僼傽僀儖偵偁傝傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

3.2. 儅乕僋

儅乕僋偲偄偆偺偼僞僌偲摨偠傛偆側丄応強偺忣曬傪曐帩偡傞傕偺偱偡偑丄儅乕
僋偼僼傽僀儖拞偺偳偺応強偵偱傕愝掕偱偒傞偟丄娭悢傗 enum 乮楍嫇宆乯偵尷
掕偝傟傞傕偺偱傕偁傝傑偣傫丅偝傜偵丄儅乕僋偼儐乕僓乕偑庤摦偱愝掕偟側偗
傟偽側傝傑偣傫丅

儅乕僋傪愝掕偟偰傕丄摨偠傕偺偑栚偵尒偊傞宍偱尰傟傞傢偗偱偼偁傝傑偣傫丅
儅乕僋偲偄偆偺偼VIM偑妎偊偰偄傞僼傽僀儖偺拞偺応強偲偄偆偩偗側偺偱偡丅師
偺僐乕僪傪峫偊偰傒傑偡丅

Figure 7. 儅乕僋偺椺

[marks]

崱 x++; 偺峴傪曇廤拞偵懠偺峴傪曇廤偟丄偦偺偁偲傑偨偙偺峴偵栠偭偰偒偨偄
偲偟傑偟傚偆丅偙偺応崌丄m' 偲偄偆僉乕僗僩儘乕僋偱偙偺 x++; 偺峴偵儅乕僋
傪愝掕偱偒傞偟丄 '' 傪懪偰偽丄屻偱偙偺摨偠峴偵栠偭偰偙傟傑偡丅

VIM偱偼儅乕僋偼暋悢愝掕偱偒傑偡丅偙傟傜偺儅乕僋偼 a-z 傗 A-Z 偦傟偵 1-0
偲偄偭偨儗僕僗僞偵奿擺偝傟傑偡丅儅乕僋傪愝掕偟偰丄偦偺摨偠傕偺傪偁傞儗
僕僗僞丄椺偊偽 j 偵奿擺偡傞偵偼 mj 偲懪偰偽嵪傒傑偡丅偙偺儅乕僋偵栠偭偰
偔傞偵偼丄 'j 偲懪偰偽嵪傒傑偡丅

暋悢偺儅乕僋傪巊偆偲丄傑偲傑偭偨僐乕僪偺拞偱峴偭偨傝棃偨傝偡傞嵺偵杮摉
偵栶棫偪傑偡丅摨偠忋婰偺椺傪巊偄傑偟傚偆丅 x++; 偱堦偮儅乕僋偟偰丄 y=x;
偱傕偆堦偮丄偦偟偰偦傟傜偺娫傪僕儍儞僾偟偨傝丄偁傞偄偼懠偺応強偵僕儍儞
僾偟偰丄偦傟偐傜僕儍儞僾偟偰栠傝偨偄偙偲偑偁傞偐傕偟傟傑偣傫丅

儅乕僋偼暋悢偺僼傽僀儖偵傑偨偑偭偰傕偐傑偄傑偣傫丅偦偆偄偭偨儅乕僋傪巊
偆偵偼戝暥帤偺儗僕僗僞丄偮傑傝 A-Z 偺儗僕僗僞傪巊傢側偗傟偽側傝傑偣傫丅
彫暥帤偺儗僕僗僞偼僼傽僀儖偺拞偩偗偱巊偆傕偺偱丄僼傽僀儖傪傑偨偑傞偙偲
偼偁傝傑偣傫丅尵偄姺偊傟偽丄偁傞 foo.c 偲偄偆僼傽僀儖偺拞偱儅乕僋傪儗僕
僗僞 "a" 偵愝掕偟丄偦傟偐傜暿偺僼傽僀儖偵堏摦偟偰 'a 偲懪偭偰傕丄僇乕僜
儖偼捈慜偺応強偵偼栠傜側偄偺偱偡丅暿偺僼傽僀儖偵僇乕僜儖傪傕偭偰偄偔傛
偆側儅乕僋偑偟偨偗傟偽丄戝暥帤偺儗僕僗僞傪巊偆昁梫偑偁傞偱偟傚偆丅椺偊
偽丄 ma 偺戙傢傝偵 mA 傪巊偆傫偱偡丅暋悢偺僼傽僀儖傪曇廤偡傞偵偮偄偰偼
丄屻偺僙僋僔儑儞偱榑偠傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

3.3. gd 僉乕僗僩儘乕僋

師偺僐乕僪偺傂偲傑偲傑傝傪峫偊傑偡丅

Figure 8. 嶰斣栚偺椺

[gd]

y 偲 z 偑側傫偩偭偨偐傪丄側偤偩偐朰傟偰偟傑偄丄戝帄媫偦傟傜偑掕媊偟偰偁
傞応強偵峴偒偨偄偲偟傑偡丅堦偮偺曽朄偼 y 偲偐 z 傪屻曽専嶕偡傞偙偲偱偡
丅偱傕VIM偵偼傕偭偲娙扨偱慺憗偄夝寛曽朄偑偁傝傑偡丅gd 偲偄偆僉乕僗僩儘
乕僋偼 "Goto Declaration 乮愰尵傊峴偔乯" 偺棯偵側偭偰傑偡丅僇乕僜儖傪
"y" 偵偍偄偰 gd 偲懪偮偲丄僇乕僜儖傪偦偺愰尵丄偮傑傝 struct Y y; 偵傕偭
偰偄偔傫偱偡丅

gD傕帡偨傛偆側僉乕僗僩儘乕僋偱偡丅偙傟偼僇乕僜儖偺埵抲偵偁傞曄悢傪僌儘
乕僶儖愰尵偟偰偁傞応強傑偱丄僇乕僜儖傪傕偭偰偄偒傑偡丅偩偐傜丄 x 偺愰尵
偵峴偒偨偗傟偽丄昁梫側偙偲偼 gD 偲懪偮偩偗偱丄偙傟偱僇乕僜儖偼 x 偺愰尵
偵堏摦偡傞偱偟傚偆丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

4. 扨岅偺帺摦曗姰

師偺僐乕僪傪峫偊傑偡丅

Figure 9. 帺摦曗姰偺椺

[auto]

A_Very_Long_Function_Name() 偲偄偆娭悢偼丄壗搙傕壗搙傕僞僀僾偡傞偺偱丄
傑偭偨偔釠偺庬偵側傞偙偲偑偁傝傑偡丅偱傕傑偩憓擖儌乕僪偵偄傞娫偱傕丄偦
偺慜屻偵偁傞扨岅傪扵偟偰丄扨岅傪帺摦曗姰偱偒傞偺偱偡丅Another_Function
() 偲偄偆娭悢偺拞偱 A_Very... 偲僞僀僾偟丄CTRL-P 偲懪偭偰傕偄偄偱偟傚偆
丅嵟弶偵堦抳偟偨扨岅偑嵟弶偵昞帵偝傟傑偡丅偙偺応崌偼
A_Very_Long_Variable_Name 偐傕偟傟傑偣傫丅惓偟偔曗姰偡傞偨傔偵傕偆堦搙 
CTRL-P 偲懪偪丄師偵堦抳偡傞扨岅傑偱専嶕偑懕偒傑偡丅偦偺扨岅偑
A_Very_Long_Function_Name 偱偡丅惓偟偄扨岅偑尒偮偐偭偨傜丄偨偩偪偵僞僀
僾傪懕偗傜傟傑偡丅偙偺夁掱偺娫偼偢偭偲VIM偑憓擖儌乕僪偺傑傑偱偄傑偡丅

CTRL-P 偲帡偨傕偺偵 CTRL-N 偲偄偆僉乕僗僩儘乕僋偑偁傝傑偡丅偙傟偼屻曽専
嶕偺戙傢傝偵慜曽専嶕傪峴側偆傕偺偱偡丅偙傟傜偺僉乕僗僩儘乕僋偼椉曽偲傕
丄僼傽僀儖偺愭摢偐僼傽僀儖偺嵟屻偵峴偒摉偨傞傑偱専嶕傪懕偗傑偡丅

CTRL-P 傗 CTRL-N 偼 CTRL-X 儌乕僪偲偄偆儌乕僪偺堦晹偵側偭偰偄傑偡丅
CTRL-X 儌乕僪偼憓擖儌乕僪偺僒僽儌乕僪偱偡丅偩偐傜憓擖儌乕僪偵偄傞偲偒偼
丄偙偺儌乕僪偵擖傟傞傢偗偱偡丅 CTRL-X 儌乕僪傪敳偗傞偵偼 CTRL-X, CTRL-P
偍傛傃 CTRL-N 埲奜偺僉乕僗僩儘乕僋傪壗偐懪偰偽偄偄偱偡丅偄偭偨傫CRTL-X
儌乕僪傪敳偗偨傜丄憓擖儌乕僪偵栠傝傑偡丅

CRTL-X 儌乕僪傪巊偊偽丄偝傑偞傑側曽朄偱帺摦曗姰偑偱偒傞傛偆偵側傝傑偡丅
僼傽僀儖柤傪帺摦曗姰偡傞偙偲偝偊偱偒傑偡丅僿僢僟乕僼傽僀儖傪僀儞僋儖乕
僪偟側偗傟偽側傜側偄帪偵丄偙傟偼摿偵栶棫偪傑偡丅 CTRL-X 儌乕僪傪巊偊偽
丄師偺傛偆側傗傝曽偱 foo.h 偲偄偆僼傽僀儖偑僀儞僋儖乕僪偱偒傑偡丅

         #include "f CTRL-X CTRL-F"                                    
                                                                       

偦偆丄CTRL-X CTRL-F偱偡丅傢偐偭偰傞丄傢偐偭偰傞偭偰丅emacs傒偨偄偩偭偰
偄偆傫偱偟傚 ;-) CTRL-X儌乕僪偱偼偱偒傞偙偲偑懠偵傕偁傝傑偡丅偦傫側傕偺
偺堦偮偑帿彂曗姰偱偡丅偙傟傪巊偆偲扨岅偺堦棗偑擖偭偨僼傽僀儖傪巜掕偟偰
丄偦傟傪巊偭偰曗姰偡傞傛偆偵偱偒傞傫偱偡丅僨傿僼僅儖僩偩偲偙偺帿彂僆僾
僔儑儞偼愝掕偝傟偰偄傑偣傫丅愝掕偡傞偵偼 :set dictionary=file 偲偄偆僐
儅儞僪傪巊偄傑偡丅戝掞偼 C 尵岅偺僉乕儚乕僪傗 typedef 偦偟偰 #define 側
傫偐傪偙偺帿彂僼傽僀儖偵抲偄偰偍偗傑偡丅摨偠傛偆偵丄 C++ 傗 Java 偺僾儘
僌儔儅側傜丄僋儔僗柤傪壛偊傞偺偵庝偐傟傞偐傕偟傟傑偣傫丅

帿彂僼傽僀儖偺僼僅乕儅僢僩偼扨弮偱偡丅 1 峴偵堦偮曗姰偟偨偄扨岅傪彂偄偰
偍偔偩偗偱偡丅偩偐傜丄 C 尵岅偺帿彂僼傽僀儖偲偄偆偺偼偨傇傫偙傫側傛偆側
傕偺偵側傞傫偱偟傚偆丅

Figure 10. 帿彂僼傽僀儖偺僒儞僾儖

[dict]

帿彂曗姰傪巊偆偵偼丄 CTRL-X CTRL-K 偲懪偮昁梫偑偁傝傑偡丅曗姰偼 CTRL-P
傗 CTRL-N 偺僉乕僗僩儘乕僋偵帡偰偄傑偡丅偩偐傜丄偊乕偭偲丄 "typedef" 偲
僞僀僾偡傞側傜丄 CTRL-X CTRL-K 偲懪偮偩偗偱傛偔偰丄偡傞偲丄僷僢偲弌偰偒
偰丄柤慜偺曗姰偑姰椆偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

5. 帺摦揑側惍宍

5.1. 寘悢偺惂尷

寘悢傪80寘偲偐75寘偲偐丄壗偱偁傟丄惂尷偟側偗傟偽側傜側偄偙偲偑傛偔偁傝
傑偡丅師偺僐儅儞僪傪巊偊偽丄偒傢傔偰梕堈偵偙偺愝掕偑偱偒偰偟傑偄傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆            :set textwidth=80                                       劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偙傟傪帺摦揑偵偡傞偵偼丄偨傫偵帺暘偺 .vimrc 偵偙偺僐儅儞僪傪抲偄偰偔偩
偝偄丅

僥僉僗僩暆傪惂尷偡傞懠偵丄偁傞寘偱僥僉僗僩傪愜傝曉偟偨偄偙偲傕偁傞偱偟
傚偆丅偦傟偼帺暘偑巊偭偰偄傞抂枛偑偦偆婯掕偟偰偄傞偐傜偦偆側偭偰偄偨傝
丄偁傞偄偼偨傫偵偦偆偄偆傛偆偵帺暘偱慖傫偩偐傜偐傕偟傟傑偣傫丅偙傫側応
崌偵巊偆僐儅儞僪偑師偺僐儅儞僪偱偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆            :set wrapwidth=60                                       劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

忋婰偺僐儅儞僪偼60寘偱僥僉僗僩傪愜傝曉偡傛偆偵偟傑偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

5.2. 僐乕僪傪帺摦揑偵僀儞僨儞僩偡傞

C 偱僐乕僨傿儞僌偟偰偄傞娫偼丄撪懁偺僐乕僪偺夠傪僀儞僨儞僩偡傞偙偲偑傛
偔偁傝傑偡丅僐乕僨傿儞僌拞偵偙傟傪帺摦壔偡傞偨傔偵丄VIM偵偼 cindent 偲
偄偆僆僾僔儑儞偑偁傝傑偡丅偙傟傪愝掕偡傞偵偼丄師偺僐儅儞僪傪巊偆偩偗偱
偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆            :set cindent                                            劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

cindent 傪愝掕偡傟偽丄僐乕僪偼帺摦揑偵偒傟偄偵側傝傑偡丅偙偺僐儅儞僪傪
帺摦揑偵幚峴偡傞応崌偼丄帺暘偺 .vimrc 偵壛偊傞偩偗偱偄偄偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

5.3. 拲庍

VIM偱偼拲庍傪帺摦惍宍偱偒傞傛偆偵傕側偭偰偄傑偡丅拲庍偼嶰偮偺晹暘偵暘偗
傞偙偲偑偱偒傑偡丅偮傑傝嵟弶偺晹暘丄恀拞偺晹暘丄偦偟偰嵟屻偺晹暘偱偡丅
椺偊偽丄帺暘偺僐乕僨傿儞僌僗僞僀儖偵昁梫側忦審偩偐傜偲偄偆偙偲偱丄拲庍
傪師偺僗僞僀儖偵偡傞昁梫偑偁傞偐傕偟傟傑偣傫丅

                                                                       
            /*                                                         
            * 偙傟偼拲庍偱偡                                           
            */                                                         
                                                                       

偙偺傛偆側応崌偼師偺僐儅儞僪偑巊偊傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆            :set comments=sl:/*,mb:*,elx:*/                         劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

撉幰偺偨傔偵丄偙偺僐儅儞僪傪夝撉偟偰傒傑偟傚偆丅偙偺僐儅儞僪偵偼嶰偮偺
晹暘偑偁傝傑偡丅嵟弶偼 sl:/* 偲偄偆晹暘偱偡丅偙傟偼嶰偮偵傢偐傟偨拲庍偑
/* 偱巒傑傞偙偲傪 VIM 偵嫵偊偰偄傑偡丅師偼拲庍偺恀拞偺晹暘偑 * 偩偲 VIM
偵崘偘偰偄傑偡丅拲庍偺嵟屻偺晹暘偼丄擇偮偺偙偲傪 VIM 偵嫵偊偰偄傑偡丅堦
偮偼偙偺僐儅儞僪偑 */ 偱廔傜偹偽側傜側偄偙偲丄偦偟偰傕偆堦偮偼 / 傪懪偮
偲帺摦揑偵拲庍傪姰惉偝偣偹偽側傜側偄偙偲偱偡丅

傕偆堦偮暿偺椺傪偁偘偰傒傑偟傚偆丅帺暘偺僐乕僨傿儞僌巜恓偑師偺傛偆偩偲
偟傑偟傚偆丅

                                                                       
            /*                                                         
            ** 偙傟偼拲庍偱偡                                          
            */                                                         
                                                                       

偙偺傛偆側忬嫷偱偼丄拲庍傪偮偗傞偺偵師偺僐儅儞僪偑巊偊傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆            :set comments=sl:/*,mb:**,elx:*                         劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

拲庍傪憓擖偡傞偵偼丄 /* 偲僞僀僾偟 enter 僉乕傪懪偮偩偗偱偡丅師偺峴偵偼
帺摦揑偵 ** 偑擖偭偰偄傞偼偢偱偡丅拲庍傪彂偒廔偭偨傜傕偆堦搙 enter 僉乕
傪懪偮偩偗偱丄傕偆堦偮暿偺 ** 偑憓擖偝傟傑偡丅偱傕拲庍傪廔偊傞偵偼 **/
偠傖側偔偰 */ 偑梸偟偄偱偡偹丅VIM偼偙偙偱傕傑偙偲偵尗偄傫偱偡丅嵟屻偺 *
傪嶍彍偟偰 / 偵抲偒姺偊傞昁梫偑側偄傫偱偡丅戙傢傝偵 / 偲偩偗懪偭偰壓偝
偄丅偦偆偡傟偽 VIM偼偦傟偑拲庍偺廔傝偩偲擣幆偟丄帺摦揑偵偦偺峴傪 ** 偐
傜 */ 傊曄偊傞偼偢偱偡丅

傕偭偲抦傝偨偄偙偲偑偁傟偽丄師偺僐儅儞僪傪懪偭偰壓偝偄丅 :h comments

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

6. 暋悢偺僼傽僀儖傪曇廤偡傞

堦搙偵擇偮埲忋偺僼傽僀儖傪曇廤偡傞昁梫偑偁傞偲偄偆偺偼傛偔偁傞偙偲偱偡
丅椺偊偽丄僿僢僟乕僼傽僀儖傪曇廤偟偰偄偰丄摨帪偵僜乕僗僼傽僀儖傕曇廤偡
傞偙偲偑偁傞偐傕偟傟傑偣傫丅堦搙偵擇偮埲忋偺僼傽僀儖傪曇廤偡傞偵偼丄師
偺僐儅儞僪傪巊偭偰 VIM 傪婲摦偟傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆         $ vim file1 file2 ...                                      劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

偙傟偱嵟弶偺僼傽僀儖偑曇廤偱偒丄埲壓偺僐儅儞僪傪巊偊偽師偺僼傽僀儖偵堏
傞偙偲偑偱偒傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆         :n                                                         劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

栠傞応崌偼師偺僐儅儞僪傪巊偊偽偱偒傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆         :e#                                                        劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

擇偮偺僼傽僀儖傪摨帪偵尒傞偙偲偑偱偒偰丄偝傜偵偦偺擇偮傪愗懼偊傞偙偲偑
偱偒傟偽丄僐乕僨傿儞僌拞栶棫偮偐傕偟傟傑偣傫丅尵偄姺偊傟偽丄夋柺傪暘妱
偟偰忋偺曽偵僿僢僟乕僼傽僀儖偑尒偊偰壓偺夋柺偱偼僜乕僗僼傽僀儖偑尒偊傟
偽丄栶棫偮偩傠偆偲偄偆偙偲偱偡丅VIM偵偼偦傫側夋柺傪暘妱偡傞僐儅儞僪偑偁
傞傫偱偡丅偙傟傪婲摦偡傞偵偼偨傫偵師偺傛偆偵偟傑偡丅 :split

摨偠僼傽僀儖偑椉曽偺僂傿儞僪僂偵昞帵偝傟傞偲巚偄傑偡丅偙偙偱偳傫側僐儅
儞僪傪幚峴偟偰傕丄偦傟偑塭嬁偡傞偺偼偦偺帪偵巊偭偰偄傞僂傿儞僪僂偩偗偱
偡丅偩偐傜丄師偺僐儅儞僪傪巊偊偽丄暿偺僂傿儞僪僂偵偁傞暿偺僼傽僀儖偑曇
廤偱偒傞傫偱偡丅 :e file2

偙偺僐儅儞僪傪幚峴偟偨屻偼丄擇偮偺僼傽僀儖偑尒偊傞傛偆偵側偭偰偄傞偺偑
傢偐傞偱偟傚偆丅堦偮偺僂傿儞僪僂偵偼嵟弶偺僼傽僀儖偑昞帵偝傟偰偄偰丄懠
偺僂傿儞僪僂偵偼擇斣栚偺僼傽僀儖偑昞帵偝傟偰偄傑偡丅偙偺擇偮偺僼傽僀儖
傪愗傝懼偊偰巊偆偵偼丄 CTRL-W CTRL-W 偲偄偆僉乕僗僩儘乕僋傪巊傢側偗傟偽
側傝傑偣傫丅僂傿儞僪僂偺暘妱偵偮偄偰傕偭偲抦傝偨偗傟偽丄偦偙偱 help 僐
儅儞僪傪幚峴偡傟偽偄偄偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

7. Quickfix

C 尵岅偱僐乕僨傿儞僌偟偰偄傞応崌丄曇廤 - 僐儞僷僀儖 - 曇廤偲偄偆僒僀僋
儖偑傛偔偁傝傑偡丅乮偙偺暥彂傪撉傫偱偄傞乯撉幰側傜丄偙傟傑偱偵愢柧偟偨
僐儅儞僪側偳傪巊偭偰丄C 尵岅偺僼傽僀儖傪曇廤偟丄僼傽僀儖傪曐懚偟丄偦偺
僐乕僪傪僐儞僷僀儖偟丄偦偟偰僄儔乕偺売強偵峴偒丄傑偨曇廤傪巒傔傞偺偑晛
捠偱偟傚偆丅偙傫側偲偒偵丄Quickfix偲偄偆儌乕僪傪巊偊偽丄 VIM偼偙偺僒僀
僋儖帪娫傪庒姳愡栺偡傞偺傪彆偗偰偔傟傑偡丅婎杮揑偵偼丄僐儞僷僀儔偺僄儔
乕傪僼傽僀儖偵曐懚偟偰偍偄偰丄師偺僐儅儞僪傪巊偭偰VIM偱偙偺僼傽僀儖傪僆
乕僾儞偡傞昁梫偑偁傝傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆                                                                    劆
劆         $ vim -q 僐儞僷僀儔偺僄儔乕傪曐懚偟偨僼傽僀儖              劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

VIM偼帺摦揑偵僄儔乕偺忣曬偑擖偭偰偄傞偙偺僼傽僀儖傪僆乕僾儞偟偰丄僇乕僜
儖傪嵟弶偺僄儔乕偺埵抲偵傕偭偰偄偒傑偡丅

偙偺傗傝曽偵偼嬤摴偑偁傝傑偡丅 "make" 偲偄偆僐儅儞僪傪巊偊偽丄帺摦揑偵
僐乕僪傪僐儞僷僀儖偟偰丄嵟弶偵敪惗偟偨僄儔乕偺埵抲偵峴偭偰偔傟傑偡丅
make 僐儅儞僪傪婲摦偡傞偵偼師偺傛偆偵僞僀僾偟傑偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆         :make                                                      劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

幚偼丄偙偺僐儅儞僪偼僔僃儖偱 make 傪僐乕儖偟偰丄嵟弶偺僄儔乕売強偵峴偔
傫偱偡丅偱傕僐儞僷僀儖偵 make 偱偼側偔 cc 偺傛偆側僐儅儞僪傪巊偭偰偄傞
応崌偼丄偙偺 make 僐儅儞僪傪巊偆帪偵幚峴偟偨偄僐儅儞僪傪 makeprg 偲偄偆
曄悢偵愝掕偟側偗傟偽側傝傑偣傫丅椺偊偽師偺傛偆偵偱偡丅 :set makeprg=cc\
foo.c

makeprg 傪愝掕偟偰偍偗偽丄幚嵺偵 make 僐儅儞僪傪屇傃弌偣傞偟丄 Quickfix
儌乕僪偑摦偒弌偡偙偲偱偟傚偆丅

嵟弶偺僄儔乕傪廋惓偟偨傜丄師偵傗傞偙偲偼偦偺師偺僄儔乕偺売強偵峴偭偰偦
傟傪廋惓偡傞偙偲偱偟傚偆丅師偺僄儔乕偺売強偵峴偔偵偼埲壓偺僐儅儞僪傪巊
偄傑偡丅 :cn

偦偙偐傜栠傞偵偼丄師偺僐儅儞僪傪巊偄傑偡丅 :cN

椺傪巊偭偰幚嵺偵傗偭偰傒傞偙偲偵偟傑偟傚偆丅埲壓偺僐乕僪傪峫偊偰偔偩偝
偄丅

Figure 11. 懄岠僼傽僀儖僾儘僌儔儉偺儕僗僩

[quickfix_prog]

尒傟偽傢偐傝傑偡偑丄5峴栚偵僄儔乕偑偁傝傑偡丅偙偺僼傽僀儖偼 test.c 偲偄
偆柤慜偱曐懚偝傟偰偄偰丄makeprg 偼埲壓偺僐儅儞僪傪巊偭偰愝掕偟偰偁傝傑
偡丅

劇劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劉
劆         :set makeprg=gcc\ test.c                                   劆
劆                                                                    劆
劋劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劅劊

師偵丄 make 僐儅儞僪偼 :make 偲偄偆僐儅儞僪傪巊偭偰婲摦偟傑偡丅偡傞偲
gcc 偑僄儔乕傪弌偟丄 make 僐儅儞僪偺弌椡偑埲壓偺傛偆側傕偺偵側傝傑偡丅

Figure 12. :make 僐儅儞僪偱弌偨僄儔乕

[make_error]

RETURN 傪墴偡偲丄僇乕僜儖偼6峴栚偵堏摦偟傑偡丅

崱搙偼 :cn 僐儅儞僪偑僇乕僜儖傪4峴栚偵傕偭偰偄偒傑偡丅

捈慜偺僄儔乕売強偵栠傞偵偼丄 :cN 僐儅儞僪偑巊偊傑偡丅偙傟偱僇乕僜儖偼6
峴栚偵栠傞偙偲偱偟傚偆丅

5峴栚偺僄儔乕傪廋惓偟偰 "return 1;" 傪捛壛偟偨傜丄傕偆堦搙 :make 傪幚峴
偟傑偡丅偡傞偲偦偺弌椡偼師偺傛偆偵側傝傑偡丅

Figure 13. 僄儔乕柍偟

[make_no_error]

偙傟偼傎傫偺傢偢偐側堦椺偱偡丅偱傕偙偺Quickfix傪巊偭偰僐儞僷僀儖帪娫偵
娭偡傞栤戣偑夝寛偱偒傞偟丄偆傑偔偄偗偽曇廤 - 僐儞僷僀儖 - 曇廤偺僒僀僋
儖傕嶍尭偱偒傞偺偱偡丅

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

8. 挊嶌尃

Copyright (c) 2000,2001 Siddharth Heroor.

杮暥彂偺暋惢丄攝晍丄側偄偟偼曄峏偼丄 Free Software Foundation 敪峴偺僶
乕僕儑儞 1.1 側偄偟偦傟埲崀偺偡傋偰偺僶乕僕儑儞偺僼儕乕暥彂棙梡嫋戻宊栺
彂乮GNU Free Documentation License乯偺忦審壓偱嫋壜偡傞丅偨偩偟丄曄峏晄
壜擻晹暘偑柍偄偙偲丄昞昞巻偑柍偄偙偲丄偍傛傃棤昞巻偑柍偄偙偲丅僼儕乕暥
彂棙梡嫋戻宊栺彂偺暋惢偼埲壓偺僒僀僩偱庢摼偱偒傞丅 http://www.gnu.org/
copyleft/fdl.html <http://www.gnu.org/copyleft/fdl.html>

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

9. 嶲峫暥專

VIM 偵娭偡傞傛傝懡偔偺忣曬偼埲壓偺僒僀僩偐傜庢摼偱偒傞偟丄 VIM 傕偦偙偐
傜僟僂儞儘乕僪偱偒傞丅 http://www.vim.org <http://www.vim.org>

劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒劒

10. 擔杮岅斉幱帿

峑惓傪偟偰偄偨偩偄偨嵅栰偝傫丄崅忛偝傫偵偼丄偙偺応傪庁傝偰屼楃怽偟忋偘
傑偡丅傑偨丄弶嶲壛偺巹偺嵄嵶側幙栤偵傕丄挌擩偵偍摎偊壓偝偭偨拞栰偝傫丄
崅嫶偝傫丄傾僪僶僀僗傪偄偨偩偄偨拞扟偝傫偵傕屼楃怽偟忋偘傑偡丅

