Thursday, January 8, 2015

Re: Completion with tag files

On Wednesday, January 7, 2015 10:25:23 AM UTC-6, Guyz Zmolotov wrote:
> so within `task T11 "Foobar Task #2"` I can add:
>
> depends test0rburn0r.burn0r.T8.T9
>
> if I do ^] on T9, vim says 'no tag found', but if I visual select
> `burn0r.T8.T9` then it jumps to the line where it's defined.
>
> when I try to do completion, I only have ^N^P working, which
> obviously isn't much help in this context.
>
> [snip]
>
> So here's my questions:
>
> - how can I activate omnicompletion on that file/syntax using the tag file?
> - how can jump to tags respecting the semantics of that language?
>

Both CTRL-] and completion use the 'iskeyword' option to determine what characters count as a single word for looking up. So you simply need to do this in a filetype plugin or autocmd for taskjuggler: "setlocal iskeyword+=."

After that, CTRL-] will find the tag properly.

For completion, try using CTRL-O_CTRL-] to do tag-based completion. This also needs the iskeyword setting as above.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: