Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 532 Bytes

Readme.md

File metadata and controls

35 lines (26 loc) · 532 Bytes

vim-eslint-fix

Installing using Vim Plugin Manager

  1. Add this line to your .vimrc:
Plug 'josudoey/vim-eslint-fix'
  1. Call PlugInstall() inside vim:
:PlugInstall

Usage

".vimrc
function! PrettyFile()
  if &filetype=="javascript"
    if exists('g:loaded_Beautifier')
      call JsBeautify()
    endif
    if exists('g:loaded_ESLintFix')
      call ESLintFix()
    endif
  end
endfunction

"pretty the file before saving.
autocmd BufWritePre * execute 'call PrettyFile()'