google / google/vim-codefmt

Add option to touch only changed lines

Open
#9 4 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
Vim Script
Stars
1.1k
Forks
102
PR merge metrics
No merged PRs in 30d

Description

It would be nice to have a mode to detect which lines you had touched in this editing session and only format those ranges.

We'd need a way to decide between this behavior and formatting the whole buffer. One option would be a new `:FormatChangedLines` and `:AutoFormatChangedLines` command that would work as variants of `:FormatCode` and `:AutoFormatBuffer`.

Contributor guide

Open the contributing guide

Research direction

Start by reading the existing :FormatCode and :AutoFormatBuffer commands and how the plugin tracks buffer changes. Define how a session's changed line ranges are detected, then verify that the proposed :FormatChangedLines and :AutoFormatChangedLines variants format only those ranges while the existing commands retain whole-buffer behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
vim
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.