6. ctags
tagging할 루트 디렉토리에서 다음 명령어를 실행합니다.1 | ctags -R | cs |
그리고 vi editor와 연동하기 위해 .vimrc 파일에 다음 설정을 추가합니다.
1 | set tags=/home/ships/project/IrisIrene/trunk/src/tags | cs |
tag database가 생성된 디렉토리 경로를 설정합니다.
7. cscope
ctags와 cscope database 구축을 한번에 하기 위해 ~/mkcscope.sh 파일을 생성한다.
1 2 3 4 5 6 7 8 9 10 11 | vi ~/mkcscope.sh ######################################################### #!/bin/sh rm tags ctags -R rm -rf cscope.files cscope.out find . \( -name '*.c' -o -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.s' -o -name '*.S' -o -name '*.C' \) -print > cscope.files cscope -i cscope.files ######################################################### | cs |
그리고 vi editor와 연동하기 위해 .vimrc 파일에 다음 설정을 추가합니다.
1 2 3 4 5 6 7 8 9 10 | set cscopeprg=/usr/local/bin/cscope set csto=0 set cst set nocsverb if filereadable("./cscope.out") cs add cscope.out else cs add /usr/src/linux/cscope.out endif set csverb | cs |
8. 자동 완성.
첨부된 vim-autocomplpop.zip 파일을 다운로드 받아 구조에 맞게 ./.vim/ 경로
아래에 풀어 놓으면 바로 동작한다.
9. SrcExpl (Source Explorer)
첨부된 SrcExpl.zip 파일을 다운로드 받아 구조에 맞게 ./.vim/ 경로
아래에 풀어 놓는다.
그리고 .vimrc 파일에 다음 설정을 추가합니다.
1 2 | " // The switch of the Source Explorer nmap <F8> :SrcExplToggle<CR> | cs |
F8 단축키를 통해 사용가능하지만 소스 트리 구조에 따라서 잘 보이지 않는 듯 하다.
댓글 없음:
댓글 쓰기