Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[vi-mode] widgets for case manipulation: `gU` and `U` in visual mode



Hi good people,

I reckon there's already a widget for the `g~` action in zle.

I'm using zsh 5.0.8.

I read the zshzle manual and did not find a widget that would give me the
behaviour of `gU` (capitalize action)

for example: for the word "path_variable", with the cursor on the `v`, gUiW
would change the world to "PATH_VARIABLE", and so on and so forth.

the widget `capitalize-word` does not seem to work like that.

I also found that the key `U` in visual mode does not capitalize the
visually selected text/region. I did not find a widget in the manual that
would give me the desired behaviour either.

Is this a matter of writing a custom widget, or would one have to submit a
patch upstream with c code changes? I'm asking this because 5.0.8
introduced text objects and that was done via c code changes and not via
widgets. And writing custom widgets seems to be less difficult.

Thanks in advance.

Filipe.


Messages sorted by: Reverse Date, Date, Thread, Author