Indentation -sometimes- changes after exiting insert mode
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Bug report
What happened:
I'm on a line in normal mode:
def something():|
If I press o the next line will be indented, like this:
def something():
|
If I...
- Press
<esc>, the indentation will be lost after returning to normal mode (this used to not be the case, but is now!):
def something():
|
- Press e.g.
<c-f><esc>, the indentation will not be lost after returning to normal mode:
def something():
|
What did you expect to happen:
Consistent behaviour. Preferably the second one, pressing esc should take me out of insert mode, not modify text!
Environment:
- Extension (VsCodeVim) version: v0.12.0
- VSCode version: April 2018 (version 1.23)
- OS version: MacOS High Sierra
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported sequence in VSCodeVim with the stated VSCode Vim extension and editor versions: press o, then <esc>, and compare it with <c-f><esc>. Trace the insert-mode handling for these key sequences and verify that exiting insert mode preserves the indentation consistently without changing the text.
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
- 35/100