Friday, September 3, 2010

Re: Vim for code navigation

On Sep 3, 11:35 am, vtadipatri <vtadipa...@gmail.com> wrote:
>   I really want to learn to use vi for navigating through code files.
> But I'm running into a couple of issues:
>     To jump to a tag I think I should use ctrl+], but if I've changed
> the file it keeps prompting me that I need to use ! to override. I
> know
> I can use '!' for one of the colon commands. How do I do it for ctrl
> +]?
> Also, I don't want it to blindly jump to the code - if there are
> multiple
>  matches i want to choose where to go.
>      I tried using :ts and :ta but it seems like that's not what I
> want
> either since it jumps to what's already on the stack.

If you give either of these commands an argument, it will jump to that
tag instead of the current top of the stack.

You can make a mapping or just press CTRL-R followed by CTRL-W to
automatically get the word under the cursor.

Actually, you probably want the :tjump command. Or even better, just
set the 'cscopetag' option (a little counter-intuitive) and CTRL-]
will act like :tjump instead of like :tag.

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