akalongman/sublimetext-codeformatter

Add ability to replace chunks of code

Open

#12 opened on Jun 26, 2013

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Python (133 forks)batch import
Hacktoberfestenhancement

Repository metrics

Stars
 (775 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

There is a good proverb that I like:

Why write a program that throws lint errors when it can correct the code?

Last night, this idea rattled out of my head and it goes like this; combine the awareness of SublimeLinter with the formatters of CodeFormatter

  1. on_post_save, format code into memory or temporary file
  2. Diff original code against formatted code
  3. Show gutter warnings and highlight lines that vary based on diff
  4. Allow user to take action and apply diff to that section of code

Here is a mocked prototype I wrote:

selection_014

Contributor guide