Skip to content

mikaa123/atom-jsfmt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atom-jsfmt

David

atom-jsfmt is a jsfmt plugin for the Atom text editor. jsfmt is really good at formatting, searching, and rewriting javascript. It's pretty nifty.

atom-jsfmt in action

What does it do?

  • Format your code: Run the Jsfmt: Format command to keep your code well-styled.
  • Format on save: atom-jsfmt will auto-format your javascript every time you save, so you don't have to think about it.

How do I get it?

Installation can be done from Atom's package browser (just search for atom-jsfmt). You can also use the apm command line installer:

apm install atom-jsfmt

How do I tweak the formatting?

Although the default style guide is pretty good, you may find yourself wanting to tweak the formatting. atom-jsfmt looks for the closest .jsfmtrc file before formatting (you can read more about them here). It checks the directory of the current file, and keeps moving up directories until it finds something.

For example, if you like your code indented four spaces, your .jsfmtrc might look like this:

{
    "indent": {
        "value": "    "
    }
}

Options

  • Show Errors: Whether or not you want to see error messages. You probably do. This is set to true by default.
  • Format On Save: Whether or not you automatically want to format your javascript files when you save. Defaults to true.

To do

  • Look for .jsfmtrc files in all the places that the command line tool looks (like /etc/.jsfmtrc or ~/.jsfmtrc).
  • Add searching / rewriting functionality
  • Flag lines with errors

Credit

  • jsfmt is written and maintained by the good folks at rdio.

Changelog

The changelog can be viewed here.

License

Atom-jsfmt is licensed under the MIT license, which can be viewed here.

About

jsfmt integration with Atom

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 100.0%