VSCodeVim / VSCodeVim/Vim

incorrect indent with `O`

Open
#7,545 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
15.2k
Forks
1.5k
Avg merge
3d 18h
Merged PRs (30d)
6

Description

Describe the bug
O should insert a line above current place and the indent should be the same as other lines. It works well inside a block, but one tab less when O is pressed at the end of the block.

Strangely, there is a flash before the cursor goes to the wrong place.

To Reproduce
Steps to reproduce the behavior:

动画

And the indent is correct using Ctrl + Shift + Enter without vim

动画2

  • Extension (VsCodeVim) version: v1.22.2
  • VSCode version: 1.64.2
  • OS: Windows 10

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

Reproduce the issue in VSCode with VSCodeVim v1.22.2 using the supplied GIF and the O command at the end of an indented block. Compare its indentation and cursor placement with Ctrl + Shift + Enter, then consider the issue done when O inserts a correctly indented line without the reported flash or misplaced cursor.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.