ulyssa / modalkit

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

Support dropping selections based on a regular expression #63

Closed ulyssa closed 1 year ago

ulyssa commented 1 year ago

Kakoune supports dropping selections using a regular expression to either indicate what to drop (<A-K>) or what to keep (<A-k>). It's not clear to me whether this should be done as a new SelectionAction, or as a new CursorCloseTarget.

ulyssa commented 1 year ago

I've added a SelectionAction::Filter variant for this. The command bar widget will need to be adapted in some way to allow keybindings to specify what action gets generated when the search bar is submitted, either as part of #32 or before.