emacs/var/elfeed/db/data/36/36f4b8f0bfa189b20f01b71a6d47b1eeaa8f1c21
2022-01-03 12:49:32 -06:00

1 line
2.3 KiB
Plaintext

<!-- SC_OFF --><div class="md"><p>Using <a href="https://github.com/tpope/vim-surround">vim-surround</a>, if you have the text</p> <pre><code>you say hello world and i say it back ^ </code></pre> <p>...with your cursor on the character the carat indicates, then enter <code>ys2aw&quot;</code>, you end up with the line</p> <pre><code>you say &quot;hello world&quot; and i say it back </code></pre> <p>However, in Emacs, when <a href="https://github.com/emacs-evil/evil-surround">evil-surround</a> is enabled, if you take the same initial line and perform the same keystrokes, you instead end up with</p> <pre><code>you say &quot;hello world &quot;and i say it back </code></pre> <p>Is this a known issue, or expected behavior in some way?</p> <p>I stripped down my init.el so that the only lines in it require and enable <code>evil</code> and <code>evil-surround</code>, so I can&#39;t see how my configuration would be the problem. I wasn&#39;t able to find any reference to any similar issues on the Github though, which is surprising to me if other people are experiencing it; it seems like a pretty common command to run.</p> <p>If anyone else can reproduce this behavior, let me know so I know I&#39;m not crazy!</p> <p>Edit: </p> <p>A different means of achieving the same effect as desired is referenced in this issue: <a href="https://github.com/emacs-evil/evil-surround/issues/25">#25</a></p> <p>Also, after reading <a href="https://vimhelp.org/motion.txt.html#iw">TFM</a> and understanding how the <code>aw</code> and <code>iw</code> motions work, I agree with <a href="/u/bugamn">/u/bugamn</a> that <code>evil-surround</code> has the most consistent behavior; since I like homogeneity (I always enable <code>evil-want-Y-yank-to-eol</code>), I don&#39;t really feel the need to raise an issue. If anyone else finds this irksome though, feel free to copy the text of this post to your heart&#39;s content if you <em>do</em> want to raise one.</p> </div><!-- SC_ON --> &#32; submitted by &#32; <a href="https://www.reddit.com/user/summetria"> /u/summetria </a> <br/> <span><a href="https://www.reddit.com/r/emacs/comments/q7lsfd/inconsistency_between_evilsurround_and_vimsurround/">[link]</a></span> &#32; <span><a href="https://www.reddit.com/r/emacs/comments/q7lsfd/inconsistency_between_evilsurround_and_vimsurround/">[comments]</a></span>