sponsor Vim development Vim logo Vim Book Ad

vim-auf : Format Your Lines And Be Reminded By Coloring

 script karma  Rating 10/8, Downloaded by 848  Comments, bugs, improvements  Vim wiki

created by
umit kablan
 
script type
utility
 
description
Actively developed at: https://github.com/umitkablan/vim-auf

JIT format code with Auf on the fly and only your changes easily.

Auf not only formats *only* the lines you edited but also will use highlighting to remind you:
  - newly added lines highlighted; those are going to be formatted as you save
  - wrong formatted lines are highlighted; those were already there and Auf won't touch them if you don't explicitly

* Features in a Nutshell
  - Works with basic command line formatters (clang-format, js-beautify etc.)
  - Format only touched lines after a save - JITing.
  - Avoid formatting with a bang :w! - accept as is.
  - Configurable and sufficient highlighting - changed (to be formatted) lines, wrong-format lines.
  - Already defined popular formatters for different filetypes.
  - Pure VimScript.
  - Automatic formatter selection based on formatter dot-files in project directory - use those settings.
  - Vim settings (buffer or global) are respected and defined into formatter parameters.
 
install details
Old school way: Put it under plugins/
Modern way: Use pathogen, vim-plug etc.

As the main logic of finding unsaved lines or filtering is built on diff-file processing, you need to install *diff(.exe), filterdiff(.exe), and patch(.exe)* utilities (some call it diff-utils). Windows users might need to install Cygwin with those diff-utils inside.

Also install command line utilities of the formatters you want. E.g. clang-format, jsbeautify..
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
vim-auf-1.0.tar.gz 1.0 2018-01-31 7.0 umit kablan Initial upload
ip used for rating: 216.73.216.208

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github