vim-subversive icon indicating copy to clipboard operation
vim-subversive copied to clipboard

[Feature Request] Default to group on `g:subversivePromptWithActualCommand`

Open luiz00martins opened this issue 2 years ago • 0 comments

With g:subversivePromptWithActualCommand set, substituting my_text leaves you with :'[,']s/\V\Cmy_text/|/gI (| being the cursor):

My suggestion, is to instead use :'[,']s/\V\C\(my_text\)/|/gI, automatically capturing my_text in a group.

This would allow users to more quickly complete with the current text with \1, for example:

:'[,']s/\V\C\(my_text\)/\1_is_amesome/gI
:'[,']s/\V\C\(my_text\)/this_is_\1/gI
:'[,']s/\V\C\(my_text\)/this_is_\1_and_now_way_longer/gI

Which will result in

my_text_is_amesome
this_is_my_text
this_is_my_text_and_now_way_longer

luiz00martins avatar May 10 '22 06:05 luiz00martins