VSCodeVim / VSCodeVim/Vim

Option to use "Reindent selected lines" for ={motion} operator

Open
#8,027 0 comments 3 reactions 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

Is your feature request related to a problem? Please describe.
I work in a project that uses ESLint for formatting. Unfortunately ESLint doesn't support selection formatting which means the ={motion} command doesn't work for me. I added keybindings to remap "=" in visual mode to "Reindent selected lines", but there doesn't appear to be a way to emulate the ={motion} command via the keybindings settings.

Describe the solution you'd like
I would like an option to always use "Reindent selected lines" for any formatting-related commands.

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

Start by tracing the ={motion} operator, visual-mode =, the "Reindent selected lines" command, and the keybindings settings. Define the option's behavior for formatting-related commands, then verify that selected-line reindent is used consistently when it is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 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.