Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
/ vim-jsfmt Public archive

Vim plugin for jsfmt. Auto format js code on save.

Notifications You must be signed in to change notification settings

djcas9/vim-jsfmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 

Repository files navigation

vim-jsfmt

vim-jsfmt is a vim plugin for the formatiting tool jsfmt. vim-jsfmt is based on the go-fmt vimscript that ships with the vim-go plugin.

Installation

** Note: You have to have jsfmt install for this to work. npm install -g jsfmt >= version 0.5.3

Download zip file:

To install using Vundle:

" add this line to your .vimrc file
Plugin 'mephux/vim-jsfmt'

To install using pathogen.vim:

cd ~/.vim/bundle
git clone https://github.com/mephux/vim-jsfmt.git

To checkout the source from repository:

cd ~/.vim/bundle
git clone https://github.com/mephux/vim-jsfmt.git

Settings

By default vim-jsfmt shows errors for the jsfmt command, to disable it:

let g:js_fmt_fail_silently = 1

Enable auto fmt on save:

let g:js_fmt_autosave = 1

Set the command to use for formating.

let g:js_fmt_command = "jsfmt"

Configure jsfmt cli options.

let g:js_fmt_options = '--no-format'

Self-Promotion

Like vim-jsfmt.vim? Follow the repository on GitHub and if you would like to stalk me, follow mephux on Twitter and GitHub.

About

Vim plugin for jsfmt. Auto format js code on save.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published