ulyssa / modalkit

A Rust library for building modal editing applications
Apache License 2.0
49 stars 5 forks source link

Add :tab command for opening commands in a new tab #77

Closed ulyssa closed 1 year ago

ulyssa commented 1 year ago

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.