vim7의 omni completion에서 구조체의 멤버변수를 리스팅 해주는건 어떻게 하는건가요?
글쓴이: superkkt / 작성시간: 금, 2006/08/11 - 10:22오전
메뉴얼에 보면 다음과 같이 나와있습니다.
When using CTRL-X CTRL-O after a name without any "." or "->" it is completed
from the tags file directly. This works for any identifier, also function
names. If you want to complete a local variable name, which does not appear
in the tags file, use CTRL-P instead.
When using CTRL-X CTRL-O after something that has "." or "->" Vim will attempt
to recognize the type of the variable and figure out what members it has.
This means only members valid for the variable will be listed.
When a member name already was complete, CTRL-X CTRL-O will add a "." or
"->" for composite types.
아래와 같이 코드를 작성하고 아무리 CTRL-X CTRL-O를 눌러도 멤버 변수 리스팅이 안되네요.. tag 파일은 정상적으로 로드되어서 BKDATA_T 타입을 찾을 수 있습니다.
BKDATA_T *bk; bk->seq = 0; bk->
Forums:
set tags로 태그 파일만 지정해주면 되던데요..
저도 omni complete 기능을 써 본지 얼마 안되어서 잘 모르지만
멤버 리스팅 기능은 ctags로 태그를 생성하고 :set tags 로 태그 지정하기만 하면 잘 되었습니다(/usr/include 아래를 전부 태그로 만들어 시간이 좀 걸리긴 했지만).
변수 이름 다음에 . 또는 -> 쓰고 ctrl+x, ctrl+o 하면 멤버를 보여줍니다..
확인해보니 typedef로
확인해보니 typedef로 정의된 타입은 멤버변수를 못보여주는군요. 뭔가 방법이 있을텐데..
======================
BLOG : http://superkkt.com
======================
BLOG : http://superkkt.com
댓글 달기