h-youhei/kakoune-surround

Repeat surround

Opened this issue · 1 comments

This is more of a feature request, but it would be nice to be able to . surround commands. Right now a repeat would just insert one surrounding character.

vim-repeat provides a nice way to repeat surrounds but i guess the kanoune equivalent would just be to repeat the previous surround on the current selection.

It's nice to have.

. repeat previous insert in kakoune. So I tried insert both sides of surrounder at once.

When using <a-;>a instead of <esc>:
Leaved in insert mode, so I put extra <esc> on last, . insert only left hand side.

When using <a-;><a-;> instead of <esc>:
The command surround only first character of selection like (s)election
. insert both side of surrounder but not surround selection like ()selection

edited: before I tried after I will try
I will try below method when I have a time.
var to save whether other insert commands is used. How to catch?
var to save surrounder that is used previous surround command.
if other commands is used then exec . else surround.