VSCodeVim / VSCodeVim/Vim

Formatting and undo (`u`) not behaving correctly

Open
#1,737 9 comments 5 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

  • Click thumbs-up 👍 on this issue if you want it!
  • Click confused 😕 on this issue if not having it makes VSCodeVim unusable.

The VSCodeVim team prioritizes issues based on reaction count.


BUG REPORT:

Environment:

  • VSCode Version: Version 1.12.2 (1.12.2)
  • VsCodeVim Version: 0.7.1
  • OS: Mac OSX 10.11.6 (15G1421)

What happened:

  1. git clone -b gh-pages https://github.com/dhg/Skeleton
  2. Open index.html
  3. shift+alt+f/editor.action.formatDocument
  4. u

Actual:
Nothing happens/code doesn't 'un-format'

Expected:
Code should 'un-format'/go back to original format

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 with index.html by running editor.action.formatDocument and then pressing u, using the listed VS Code and VSCodeVim versions as context. Trace how formatting and the u command interact, then verify that undo restores the original formatting rather than doing nothing.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
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.