Open PatrickNH opened 2 years ago
Last I checked, this was expected behavior in Vim, but neovim does handle it this way (which is almost unarguably more consistent and intuitive), so it probably would be good to implement.
I have it implemented for the targets plugin (not yet released), but only by typing cin(
(n
stands for "next").
~It's here: https://github.com/elazarcoh/Vim/tree/last-next-object. I intend to make a PR out of it, after version 1.23 will be released.~ PR had been submitted: #7558
Also, it's not exactly the same behavior, because if you're inside prens objects then it'll jump to the next one instead of editing the current one.
@J-Fields I think I can refactor this logic out of the targets plugin, if you think it's something we want.
with ci(
I expect it to jump to the prens object only if it starts in the current line, is that right?
Describe the bug In normal mode when pressing the key sequence ci( or ci[ of ci{, the cursor does not jump to after the opening parenthesis, bracket or brace and does not remove the word in the parenthesis, bracket or brace pair and change to insert mode. In the Vim editor, the key sequence works. Note: when the cursor is on the opening or closing parenthesis, bracket or brace, or when inside the parenthesis, bracket or brace pair then the ci( key sequence does work but this should work anywhere before a parenthesis, bracket or brace pair.
To Reproduce Steps to reproduce the behavior:
Expected behavior In normal mode, when pressing the key sequence ci{ or ci[ or CI{ at the beginning of the sentence, the cursor should jump into the nearest parentheses, curly braces or bracket pair, empty the pairs and change to insert mode.
Screenshots If applicable, add screenshots to help explain your problem. If remapping-related, please attach log output: https://github.com/VSCodeVim/Vim#debugging-remappings.
Environment (please complete the following information):
Additional context Add any other context about the problem here.