Search code examples
vimyoucompleteme

Open a command in a new window


Im trying to execute :YcmComplete GoToDefinition in a new window, but I can't figure out how to execute a vim command in a new window, any pointers?

When I use split that doesn't work because that is for splitting a window and opening a document, not executing the output of a jump command etc. to a new window.

essentially im binding it to a key so that when i do it, it opens in a new window, so i dont have to jump back and forth, then when i see it and get it, i can just c and be exactly where i was.


Solution

  • I'm not sure to understand what you mean because you discarded the possibility of using :split... I would simply do like this:

    :split|YcmComplete GoToDefinition
    

    Then you can type Ctrl-WCtrl-W to go back to the window where you were (or Ctrl-WC to close the new window).