After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 737912 - vim: Generalize support for {visual}commands
vim: Generalize support for {visual}commands
Status: RESOLVED FIXED
Product: gnome-builder
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: GNOME Builder Maintainers
GNOME Builder Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-10-05 00:38 UTC by Florian Müllner
Modified: 2014-10-05 21:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vim: Factor out apply_motion() method (2.27 KB, patch)
2014-10-05 00:38 UTC, Florian Müllner
committed Details | Review
vim: Change 'requires_modifier' bool to a flag type (14.31 KB, patch)
2014-10-05 00:39 UTC, Florian Müllner
committed Details | Review
vim: Generalize support for {visual}commands (5.94 KB, patch)
2014-10-05 00:39 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2014-10-05 00:38:54 UTC
See patches.
Comment 1 Florian Müllner 2014-10-05 00:38:57 UTC
Created attachment 287739 [details] [review]
vim: Factor out apply_motion() method

This saves a couple of lines and fixes count being ignored in yank.
Comment 2 Florian Müllner 2014-10-05 00:39:02 UTC
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.
Comment 3 Florian Müllner 2014-10-05 00:39:07 UTC
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.
Comment 4 Florian Müllner 2014-10-05 21:23:34 UTC
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