Skip to content

Instantly share code, notes, and snippets.

@madox2
Created October 12, 2016 16:22
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madox2/235f23d6dbe052b60bef658095a1c2d9 to your computer and use it in GitHub Desktop.
Save madox2/235f23d6dbe052b60bef658095a1c2d9 to your computer and use it in GitHub Desktop.
Function which runs eslint --fix and saves the buffer. It is mapped to :W command
function ESLintFix()
write
silent execute "!./node_modules/.bin/eslint --fix %"
edit! %
redraw!
endfunction
command W call ESLintFix()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment