From 97183947a5d0dbef7507afaea6f764b250fc5bc2 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sat, 19 May 2018 14:01:19 +0100 Subject: [PATCH] Update readme for use without external rubocopfmt command --- README.md | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index e1783eb..46d6552 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,12 @@ # rubocopfmt-mode -Emacs minor-mode to format Ruby code with [rubocopfmt][] on save. - -Core parts of `rubocopfmt-mode` are borrowed from [`go-mode`][go-mode] and it's -invocation of `gofmt`. +Emacs minor-mode to format Ruby code with [RuboCop][] on save via it's +`--auto-correct` option. ## Installing -Install [rubocopfmt][]: - -``` -gem install rubocopfmt --pre -``` - -Drop `rubocopfmt.el` somewhere into you `load-path`. I favour the folder -`~/.emacs.d/vendor`: +Drop `rubocopfmt.el` somewhere into you `load-path` and require it. Personally I +favour the folder `~/.emacs.d/vendor`: ```lisp (add-to-list 'load-path "~/.emacs.d/vendor") @@ -23,8 +15,8 @@ Drop `rubocopfmt.el` somewhere into you `load-path`. I favour the folder ## Usage -To enable formatting `ruby-mode` buffers with rubocopfmt on save, simply enable -`rubocop-mode` within `ruby-mode` with something like this in your config: +To enable formatting `ruby-mode` buffers on save with rubocopfmt, simply enable +`rubocopfmt-mode` within `ruby-mode` with something like this in your config: ```lisp (add-hook 'ruby-mode-hook #'rubocopfmt-mode) @@ -32,9 +24,8 @@ To enable formatting `ruby-mode` buffers with rubocopfmt on save, simply enable ## Commands -- `rubocopfmt` - Format current buffer with rubocopfmt. +- `rubocopfmt` - Format current buffer with RuboCop. - `rubocopfmt-mode` - Toggle formatting on save on/off. - -[rubocopfmt]: https://github.com/jimeh/rubocopfmt +[rubocop]: https://github.com/bbatsov/rubocop [go-mode]: https://github.com/dominikh/go-mode.el