Two questions regarding task tags:
What other task tags like TODO, is available in Vim? Is there any way to make custom task tags like in Eclipse IDE?
Jumping to a tag You can use the 'tag' ex command. For example, the command ':tag <tagname>' will jump to the tag named <tagname>. You can position the cursor over a tag name and then press Ctrl-]. You can visually select a text and then press Ctrl-] to jump to the tag matching the selected text.
Just add the following line to your ~/. vimrc : set tags=./tags;,tags; It means "look for a tags file in the directory of the current file, then upward until / and in the working directory, then upward until / ".
For custom tags I use the following in my .vimrc, you should be able to adjust it to your needs.
if has("autocmd")
" Highlight TODO, FIXME, NOTE, etc.
if v:version > 701
autocmd Syntax * call matchadd('Todo', '\W\zs\(TODO\|FIXME\|CHANGED\|XXX\|BUG\|HACK\)')
autocmd Syntax * call matchadd('Debug', '\W\zs\(NOTE\|INFO\|IDEA\)')
endif
endif
This enables highlighting of these keywords in all files. \W\zs
ensures that there is a word break in front of the match, mainly to prevent DEBUG and others from being highlighted partially.
Like all syntax highlighting, TODO
, FIXME
, XXX
, et cetera depend on which type of file you are editing. These keywords are defined in the syntax files for your chosen language.
The examples I quoted are from c.vim
Vim is open source: feel free to browse the repository!
In addition to what others have mentioned, there's also TBD.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With