The :tab command in Vim allows running another command and, if it opens a window, it will do so in a new tab. For example, :tab help :q will open the help window for :q in a new tab.
In order to make it easy to implement this behaviour and other prefix commands like :aboveleft or :vertical, I'm going to add a CommandContext::window method that handles creating the appropriate Action when given an OpenTarget.
The
:tab
command in Vim allows running another command and, if it opens a window, it will do so in a new tab. For example,:tab help :q
will open the help window for:q
in a new tab.In order to make it easy to implement this behaviour and other prefix commands like
:aboveleft
or:vertical
, I'm going to add aCommandContext::window
method that handles creating the appropriateAction
when given anOpenTarget
.