Open blfgomes opened 8 years ago
Thanks for the suggestion. I'll tentatively file this for 10.1.
I've spent some time looking into this and concluded this would not at all be easy with our current Vi implementation. (Perhaps this is because the requested commands are not in Vi, while our implementation appears to be centered around Vi, not Vim.) The workaround for at least {Visual}U/u is to use ~
(swap case).
Developer notes:
u
maps to "Undo", and there is no way to apply another meaning exclusively to visual mode. Attempting to define v u
ends up overwriting v
as an entry into Visual mode.gU{motion}
without mapping key bindings for every motion (e.g. binding vim_cmd_upperCase_right g U l
, binding vim_cmd_upperCase_wordRight g U w
, etc.). Ideally we would create a way to wrap every motion in one function. For now, the user can create userscripts and bind them to the appropriate keys.TODO: figure out if we're targeting Vi keys only or both Vi and Vim keys.
@twhiteman could you share any insights? iirc this was your baby, and you still use it :)
For gU/u I would probably create a keybinding for those, that put the vi keybinding controller into a special 'uppercase/lowercase' operation mode (similar to how the delete operation works with a motion, e.g. 'dw' keybind).
It looks like most of the g* keybindings could be done as a separate keybinds (there a lot of g* keybinds that do various and seemingly unrelated things :)
For the visual mode case, one could change the vim controller lookup table, so that "cmd_vim_undo" maps to a custom function which first checks if the mode is visual mode and does the uppercase/lowercase, else does the regular cmd_undo operation.
Hi!
Look at that stuff, I like it so much, I guess you're gonna like it too. Look at it http://tryvospunte.failedchartpatterns.com/e4hdhlf
Best regards, tony.attwood
Short Summary
{Visual}U/u, gU{motion} and gu{motion} are the ones that I use regularly in Vim and it would be nice to have them implemented in Komodo.