Skip to content

toreriklinnerud/atom-rubyfmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sublime-rubyfmt

Atom plugin to autoformat Ruby code with Rubyfmt

ezgif-1-efe14eccc5e4

Dependencies

ruby and rubyfmt must already be installed and in your path:

$ which {ruby,rubyfmt}
/Users/tel/.rbenv/shims/ruby
/Users/tel/bin/rubyfmt

Plugin installation

Through Atom packages (once released):

Settings/Preferences ->
   Install ->
     Search Packages: rubyfmt (enter)

Formatting code

On Windows/Linux: Alt + ;
On MacOS: Cmd + ;

With a file open and identified as Ruby or Ruby on Rails, hit the above combination to apply auto format.

If your file contains syntax errors it won't be formatted.

Format on Save / Other settings

Format on save is disabled by default but can be enabled from the Package Settings.

Syntax errors

If the Ruby code contains a syntax error it cannot be formatted. The syntax error will be displayed in a notification window.

Screen Shot 2019-07-30 at 16 50 01