Skip to content

Commit

Permalink
Update document Vim automatic formatting on save
Browse files Browse the repository at this point in the history
that `standard % --format` was move to `standard-format` but document about Vim automatic formatting on save not updated.
  • Loading branch information
ibotdotout committed Mar 3, 2016
1 parent 6d3d200 commit 08c8d6f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,16 @@ Install **[Syntastic][vim-1]** and add this line to `.vimrc`:
let g:syntastic_javascript_checkers = ['standard']
```

For automatic formatting on save, add these two lines to `.vimrc`:
For automatic formatting on save, install [standard-format](https://github.com/maxogden/standard-format)

```bash
npm install -g standard-format
```

and add these two lines to `.vimrc`:

```vim
autocmd bufwritepost *.js silent !standard % --format
autocmd bufwritepost *.js silent !standard-format -w %
set autoread
```

Expand Down

0 comments on commit 08c8d6f

Please sign in to comment.