Taking notes with Vim
User requirement:
1. I want to be able to emphasize specific point in the original text. Also I want to jot down my own two cents as comments and summery.
2. The whole text file must be structured so I can have titles, subtitles, etc.
System Requirement:
1. highlight note, comments and summery
2. fold wherever i want
1. I want to be able to emphasize specific point in the original text. Also I want to jot down my own two cents as comments and summery.
2. The whole text file must be structured so I can have titles, subtitles, etc.
System Requirement:
1. highlight note, comments and summery
2. fold wherever i want
Implementation:
put the following as gu.vim in $VIMRUNTIME/syntax (yeah I know it is kinda dirty, but it's just a quick hack)
------------code begins-------------
setlocal iskeyword+=:
setlocal numberwidth=10
syntax keyword gTodo TODO: contained
syntax keyword gTodo2 TODO:
syntax keyword gNote NOTE: contained
syntax keyword gNote2 NOTE:
syntax keyword gSum SUMMERY: contained
syntax region gString start=/"""/ end=/"""/ contains=gNote,gTodo
syntax region gSummery start=/<SUMMERY: / end=/>/ contains=gSum
syn match zhead "^*{3}.*"
"syn match zhead "^*.+"
"syn match zhead2 "^d(.d)=s+.*"
highlight link gTodo Error
highlight link gTodo2 Error
highlight link gNote Todo
highlight link gNote2 Todo
highlight link gString String
highlight link gSum Error
highlight link gSummery Special
hi zhead guifg=green gui=bold
set foldmethod=marker
------------code ends-------------
Result:
1. showing notes and comments

2.showing summery

3. folds

No Comments Yet