I use viws" (visual select word surround with double quote) quite a lot then move up and hit . to repeat is there a way to modify dot so it does the exact command again.

currently if i do the above to surround a 4 character word it works i move up a line then hit dot on a 6 character word however it inserts the " as if its a 4 character word instead of surrounding the whole word.

Is this a limitation of using dot or something you can configure ?

also open to other options of surrounding strings like this quickly.

  • The dot-command does not seem to be easily modifiable. Another option would be to define this as a macro (using q to do it the evil-way, or using F3 and F4 to do it the Emacs-way), and call the macro on every word you want to surround. – Arnot Oct 10 '17 at 12:46
  • 1
    okay thanks, something i have not looked into much macros yet i will give it a try – Oly Oct 10 '17 at 14:19
  • This sounds more like a problem with evil-surround (wouldn't be the first time its repetition functionality broke). If I do a change involving M-f, repeating it works correctly with words of varying width. – wasamasa Oct 10 '17 at 15:47
  • I reported it as an error, turns out i should be using ysiw" (you surround inner word ") then repeat works. – Oly Oct 12 '17 at 7:34
  • discussion on github github.com/emacs-evil/evil-surround/issues/124 – Oly Oct 12 '17 at 7:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.