Skip to content

deepredsky/vim-rubocop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Vim RuboCop

VIM plugin to run RuboCop and displays the results in a quickfix window. Most of this is same as Vim Rubocop plugin. I just wanted to add additional features while learning vimscript

Usage

:RuboCop " Runs rubocop on the current buffer
:RuboCopAll " Runs rubocop on the whole project
:RuboCopAll --display-cop-names" Run rubocop with custom options
:RuboCopFix " Fix rubocop issues for current file. This will not be async.

By default it will look at Gemfile and use bundle exec rubocop --format emacs if rubocop is specified in the Gemfile, otherwise it will fallback to using rubocop --format emacs. This can be overridden

let g:rubocop_cmd = "bundle exec rubocop --rails --display-cop-names"

NOTE that emacs formatter is required for this plugin to populate quickfix list

TODO

  • Run rubocop on whole project
  • Handle bundled rubcop
  • Pass custom args to rubocop
  • Run rubocop async
  • Support for vim < 8 ( given up on this, sorry :( )

Releases

No releases published

Packages

No packages published