jeffreytse / zsh-vi-mode

💻 A better and friendly vi(vim) mode plugin for ZSH.
MIT License
3.31k stars 113 forks source link

Text-object surround #281

Open musjj opened 6 months ago

musjj commented 6 months ago

General information

Basic examination

Problem description

Many implementations of surround plugins in vim/neovim allows you to use surround commands directly with a text object. For example, ysiw" will add quotes to the current word. Currently, you need to use visual mode first, like: viwS". It's not any less efficient, but muscle memory is a hell of a drug :)

cpakkala commented 1 month ago

Agreed; this is the one reason why I'm not using this plugin yet. "ysiw" is the most basic surround sequence, and it's not just a matter of muscle memory; it's a matter of how you think about editing. The power of vim is in the verb->object paradigm; it's how we speak and thus how I think while editing. The select-first approach is the Kakoune method, not the vim way.

jeffreytse commented 1 month ago

Hi @musjj, thanks for your issue about text-object surround, I will try to dive into this ASAP, currently I'm a bit busy.