Cov txheej txheem:

Kuv yuav siv Ctags hauv Linux li cas?
Kuv yuav siv Ctags hauv Linux li cas?

Video: Kuv yuav siv Ctags hauv Linux li cas?

Video: Kuv yuav siv Ctags hauv Linux li cas?
Video: Siv Yis Neeb Leej Cawm Seej Music Video Short 2024, Hlis ntuj nqeg
Anonim

ctags txib in Linux system yog siv rau cov classic editors. Nws tso cai rau kev nkag mus sai thoob plaws cov ntaub ntawv (piv txwv li sai pom lub ntsiab lus ntawm kev ua haujlwm). Ib tug neeg siv tau khiav tag los yog ctags hauv ib phau ntawv los tsim ib qho yooj yim Performance index ntawm cov ntaub ntawv qhov chaw thaum ua hauj lwm rau.

Hais txog qhov no, koj siv Ctags li cas?

Ctags Vim

  1. cd rau hauv paus directory ntawm koj Linux ntsiav code: cd /cse451/user/project1/linux-2.6.13.2/
  2. Khiav Ctags recursively hla tag nrho cov kernel los tsim cov ntawv cim npe.
  3. Txhawm rau tshawb nrhiav ib qho cim tshwj xeeb thiab qhib Vim rau nws lub ntsiab lus, khiav cov lus txib hauv qab no hauv koj lub plhaub: vim -t

Ib yam li ntawd, kuv yuav rov qab mus rau Ctags li cas? 15 Teb. Ctrl + T - dhia rov qab los ntawm kev txhais. Qhov no yuav saib hauv phau ntawv teev npe tam sim no rau "tags", thiab ua haujlwm nce tsob ntoo mus rau hauv paus kom txog thaum pom ib qho. IOW, koj tuaj yeem nyob qhov twg hauv koj qhov chaw tsob ntoo tsis yog lub hauv paus ntawm nws.

Ib yam li ntawd, kuv yuav teeb tsa Ctags li cas?

CTags Vim, Quick Version

  1. sudo apt-tau nruab ctags (Debian / Ubuntu Linux), lossis brew nruab ctags (OS X).
  2. Hauv ~/.vimrc, ntxiv teeb tags=tags.
  3. Mus rau koj qhov project directory, thiab khiav ctags -R.
  4. Thaum kho, muab koj tus cursor tso rau ntawm qhov sib txawv, txoj kev lossis chav kawm thiab ntaus Ctrl-] kom dhia mus rau nws lub ntsiab lus.

Dab tsi yog exuberant ctags?

Exuberant - Ctags ⇒ lub ntsiab. Ctags yog siv los tsim ib qho kev ntsuas ntawm cov khoom hauv qhov chaws kom lawv tuaj yeem rov qab tau sai.

Pom zoo: