Vim: Final cursor position after surround is wrong

Created on 6 Feb 2019  路  2Comments  路  Source: VSCodeVim/Vim

Describe the bug
The final cursor position after surround is wrong: in neovim (tpope/vim-surround) it is on the bracket, not after.

To Reproduce
Steps to reproduce the behavior:

  1. Write toto tata titi
  2. in visual mode, select tata
  3. surround with braces using S }
  4. the final state is: toto {>t<ata} titi where the cursor is on the t.

Expected behavior
The cursor should be on the {.

Environment (please complete the following information):

  • Extension (VsCodeVim) version: 1.0.7
  • VSCode version: Code - Insiders 1.31.0-insider
  • OS: Ubuntu 18.10

Additional context
The behavior I'm advocating for is useful when the part that is being surrounded is meant to be an argument for a function.

Most helpful comment

This should be a quick fix; I'll take a look when I get a chance.

All 2 comments

I would love to see this issue resolved. The nice thing about the cursor placement in vim-surround is that after surrounding text with brackets, you can hit i to insert text _before_ the bracket, or hit a to insert text _after_ the bracket. With the cursor placement in the vscode-vim plugin, you can insert text after the bracket with i, but to insert text before the bracket requires two keystrokes: hi. Not a huge problem, but it is slightly less efficient and works against my muscle memory.

This should be a quick fix; I'll take a look when I get a chance.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jaredly picture jaredly  路  3Comments

lucastheisen picture lucastheisen  路  3Comments

triztian picture triztian  路  3Comments

gerardmrk picture gerardmrk  路  3Comments

stefanoio picture stefanoio  路  3Comments