내가 있기 때문에 (그래서 우리는 두 번째 숫자를 무시할 수 31를 줄 수있는 라인 (31)에서 31:31 수단을 생각을 quickfix에는 범위가 없습니다).
여기에 해당 메이크 (- 그래서 레이아웃 경로가 유효 프로젝트 루트에 넣고가)의
~/.vim/after/ftplugin/android-layout.vim
" Set the error format. Output is on multiple lines, so we use %P to push the
" filename onto the stack and %Q to pop it off. There are two kinds of errors
" I've seen: regular ones (begin with \t) and fatal ones.
"
" efm=Read the filename
" ,regular errors
" ,fatal errors
" ,forget the filename
setlocal efm=%-P%f
\,\ %l:%*[0-9]\ %m
\,[Fatal\ Error]\ :%l:%*[0-9]:\ %m
\,%-Q
" For some reason, I can't set layoutopt as the makeprg -- it never outputs
" anything when run from vim, but it works fine from a terminal or from vim's
" :!
setlocal makeprg=make\ layoutopt
에 다음을 넣습니다.
LAYOUTOPT = $(HOME)/data/code/android/android-sdk-linux_86/tools/layoutopt
LAYOUTS = res/layout/*.xml
layoutopt: $(LAYOUTS)
$(LAYOUTOPT) $(LAYOUTS)
.PHONY: layoutopt
(!) 참고 : 당신은 (대신 XML 파일 유형의 하위 유형을 만드는) 귀하의 ftplugin을-호출 자동이를 사용할 수 있습니다
au BufRead,BufNewFile *.xml if match(expand('%:p'), '/res/layout/', 0) >= 0 | runtime ftplugin/android-layout.vim | endif