내 노트의 구문 정의를 만들려고합니다.파일의 첫 줄에 Vim 구문 영역이 있습니다
=Title of the note (it's the very first line)
@context (mandatory)
!action (mandatory)
#tag-1 (optional)
#tag-2 (optional)
#tag-n (optional)
>attached-files (optional)
My note come after the first blank line
and continue until the end of the file...
No matter any additional empty line
그때 강조 구문을 만들고 싶습니다가 differents의 경기를 논제 : 다음
은 예입니다. 필자는 제목 (= this way)이나 태그 (this-way)처럼 보이는 줄을 쓸 수 있으며 강조 표시 할 필요가 없다. 첫 번째 줄부터 첫 번째 빈 줄까지 노트 메타 데이터를위한 영역을 만들려고합니다. 나는이 시도하지만 난 문제 (강조는 좋은 것 같지만있어 나는 빈 줄 결국 라인 (빈 라인 포함) 후 더 이상 작동하지 않습니다 ...augroup gtd
autocmd!
autocmd BufRead,BufNewFile *.gtd set filetype=gtd
autocmd FileType gtd syntax region gtdTags start="\%1l" end="^\s*$" fold transparent contains=gtdTitle,gtdContext,gtdStatus,gtdHashtags,gtdAttachedFiles
autocmd FileType gtd syntax match gtdTitle '^=.*' contained
autocmd FileType gtd syntax match gtdContext '^@\S\+$' contained
autocmd FileType gtd syntax match gtdStatus '^!\S\+$' contained
autocmd FileType gtd syntax match gtdHashtags '^#\S\+$' contained
autocmd FileType gtd syntax match gtdAttachedFiles '^>attached-files$' contained
autocmd FileType gtd syntax match gtdSubtitle '^\s*\*\* .*'
autocmd FileType gtd syntax keyword gtdTodo TODO WAITING SOMEDAY SCHEDULED
autocmd FileType gtd highlight gtdTitle guifg=white guibg=NONE gui=bold
autocmd FileType gtd highlight gtdContext guifg=yellow
autocmd FileType gtd highlight gtdStatus guifg=red gui=NONE
autocmd FileType gtd highlight gtdHashtags guifg=grey gui=italic
autocmd FileType gtd highlight gtdAttachedFiles guifg=red guibg=white gui=bold
autocmd FileType gtd highlight gtdSubtitle guifg=black guibg=lightgrey gui=bold
autocmd FileType gtd highlight gtdTodo guifg=white guibg=red gui=NONE
augroup END
을 삭제하는 경우 첫 번째 빈/빈 줄 또는 파일 끝 부분에서 영역을 중지하는 방법