Thursday, March 31, 2011

Re: Tag jumps and colon

On 2011-03-31, Kim Schulz wrote:
> Hi,
> I use tag jumping with ctags a lot but one thing annoys me.
> In C code when I have a switch case like:
> switch (foo)
> {
> case BAR:
> {
> ....
> }
> }
> I cannot ctrl-leftmouse click the BAR word in order to jump to it. It
> thinks that : (colon) is part of the tag name and hence cannot find it.
> I am sure that there is some setting in vim for this, but I have not
> been able to identify it. So how do I fix this?

That's probably because your 'iskeyword' option contains ":". You
can check that with

:set iskeyword?

That's not the default and it's not normal for C, so if 'iskeyword'
does contain ":", you might first try to find out where that is
being set with

:verbose set iskeyword?

then fix your configuration as required so that that doesn't happen.

You can fix the problem in the short term and further verify that
that is the problem by executing

:set iskeyword-=:

HTH,
Gary

--
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

No comments:

Post a Comment