Loading ...
Sorry, an error occurred while loading the content.

55725Re: Split open the tag under cursor

Expand Messages
  • Tim Chase
    Jan 4, 2005
    • 0 Attachment
      >> I could find :sts <word>
      >> There is no hot key for this.
      >> If not how do I map it?
      > nmap <silent> <F9> :exe 'sta '.expand("<cword>")<cr>

      To get the behavior of the ":sta" with the current <cword>, my
      understanding is that this is about the same as doing ^W]

      :help CTRL-W_]

      I might be totally off here, but that's my humble understanding :)

      The ":sts" command, OTOH, offers a potential list of candidate
      tags, allowing the user to pick from among them, and then split
      to that tag. So, I think while Dr. Chip's macro is a redundancy
      of ^W] as it stands, if changed to "sts", it should do what the
      OP asked.

      However, IIUC, there's already a command that does this too...

      :help CTRL-W_g]

      Just as g] describes ("like CTRL-], but use ':tselect' instead of
      ':tag'"), this does it splitting first.

      Both are pretty easy to remember, as the ^W prefix is the general
      "do something window-y with the following commands" (in this
      case, "split"), and the "]" is used for various tag jumping
      actions, with "g" modifying the "]" as a "tag-select" behavior.


      PS: the strangest thing happened while composing this...my office
      chair just decided to spontaneously separate the seat from the
      column/wheels, leaving me in a heap on the floor. It's gonna be
      an interesting week...or year.
    • Show all 4 messages in this topic