ctags 로 perl 소스분석
Sunday, July 18, 2010 4:53:15 AM
perl -V
하면 젤 밑에 나의 @INC 가 나온다.
@INC:
/home/hshong/perl5/perlbrew/perls/perl-5.12.0/lib/site_perl/5.12.0/i686-linux-thread-multi
/home/hshong/perl5/perlbrew/perls/perl-5.12.0/lib/site_perl/5.12.0
/home/hshong/perl5/perlbrew/perls/perl-5.12.0/lib/5.12.0/i686-linux-thread-multi
/home/hshong/perl5/perlbrew/perls/perl-5.12.0/lib/5.12.0
i686-linux-thread-multi 요거는 뭔지 모르겠고,
site_perl 밑에 있는건 cpan 을 통해 내가 추가로 설치한 모듈저장소이고,
5.12.0 밑에 있는건 5.12.0 의 코어+기본 모듈이다.
vim 에서 'Ctrl + ]' 을 눌러서 tag 로 원하는 tag로 점프하려면, tags 를 맨들어야 한다.
ubuntu 기본 패키지에 들어있는 ctags 는 내가 알던 ctags 랑 좀 달라서, 걍 다시 설치
sudo apt-get install ctags
cd /home/hshong/perl5/perlbrew/perls/perl-5.12.0/lib/5.12.0 ctags -R --languages=Perl cd /home/hshong/perl5/perlbrew/perls/perl-5.12.0/lib/site_perl/5.12.0 ctags -R --languages=Perl
ctags 옵션 조띠 많음. 위처럼 하면 pm, pl 인 파일을 recursive 하게 하위 디렉터리까지 털어서 tags 라는 이름의 파일로 저장한다.
.vimrc 에 기본 tags 위치 지정
set tags=/home/hshong/perl5/perlbrew/perls/perl-5.12.0/lib/5.12.0/tags,/home/hshong/perl5/perlbrew/perls/perl-5.12.0/lib/site_perl/5.12.0/tags
어떻게 하면 cpan 모듈받을때마다 tags 갱신해주고 여차저차 활용할지는 아직 몰겟음.
주위에 tags 활용 잘하는 사람 있으면 보고 주서와야징









How to use Quote function: