GNOME Bugzilla – Bug 737912
vim: Generalize support for {visual}commands
Last modified: 2014-10-05 21:23:59 UTC
See patches.
Created attachment 287739 [details] [review] vim: Factor out apply_motion() method This saves a couple of lines and fixes count being ignored in yank.
Created attachment 287740 [details] [review] vim: Change 'requires_modifier' bool to a flag type Whether a command requires a modifier or not is not the only way vim commands may differ. To avoid parameter creep as support for those is added, make the parameter a flag.
Created attachment 287741 [details] [review] vim: Generalize support for {visual}commands Replace the current workaround for yank with a VISUAL flag to mark commands that can be used with an existing selection. This is still quite different from the handling in vim, where selections constitute a separate mode with its own command set - so 'y' in normal mode is a different command than '{visual}y' (a.k.a. 'v_y') in visual mode. Usually {visual} commands correspond closely to a normal mode command using the same key though, so this approach should work just fine for the most common cases.
Attachment 287739 [details] pushed as d94c421 - vim: Factor out apply_motion() method Attachment 287740 [details] pushed as 9304edd - vim: Change 'requires_modifier' bool to a flag type Attachment 287741 [details] pushed as 8938b5b - vim: Generalize support for {visual}commands