Skip to main content

convert_selection

Function convert_selection 

Source
fn convert_selection(_: ())
Expand description

Converts the current visual selection to a user-chosen case variant.

Prompts the user (via ytil_noxi::vim_ui_select::open) to select a case conversion option, then applies the conversion to all selected lines in place.

Returns early if:

  • No active Visual selection is detected.
  • The user cancels the prompt.
  • Writing the converted text back to the buffer fails (an error is reported via ytil_noxi::notify::error).

§Errors

Errors from ytil_noxi::vim_ui_select::open are reported via ytil_noxi::notify::error using the direct display representation of [rootcause::Report].

§Notes

Blockwise selections are treated as a contiguous span (not a rectangle).