VSCodeVim / VSCodeVim/Vim

Pressing Key sequence ci( or ci[ of ci{ at beginning of sentence does not jump cursor into parenthesis, bracket or brace pair

Open
#7,346 2 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/not-vim-core kind/discussion kind/enhancement
Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

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:

  1. Install / enable extension: Vim emulation for Visual Studio Code v1.21.10
  2. Install / enable extension: Python v2021.12.1559732655
  3. Create a python file: test.py
  4. Enter a sample line in the file: This is a test sentence with a (sample) word in parentheses.
  5. Save the file
  6. In Vim normal mode press the 0 key to go to the beginning of the sentence
  7. In Vim normal mode press the key sequence: ci(

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):

  • Extension (VsCodeVim) version: v1.21.10
  • VSCode version: 1.63.2
  • OS: NT x64 10.0.19041

Additional context
Add any other context about the problem here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the ci(, ci[ and ci{ sequences in a VSCodeVim normal-mode buffer using the sentence from the report, then trace the text-object handling for a cursor before the delimiter pair. Done means matching Vim behavior: the nearest pair is selected, its contents are cleared, and insert mode begins.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.