Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ngmy/vim-rubocop
The Vim RuboCop plugin runs RuboCop and displays the results in Vim
https://github.com/ngmy/vim-rubocop
rubocop ruby vim vim-plugin vim-rubocop
Last synced: 4 days ago
JSON representation
The Vim RuboCop plugin runs RuboCop and displays the results in Vim
- Host: GitHub
- URL: https://github.com/ngmy/vim-rubocop
- Owner: ngmy
- License: mit
- Created: 2013-04-11T14:00:42.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2023-11-01T18:28:37.000Z (about 1 year ago)
- Last Synced: 2025-01-16T08:09:42.012Z (11 days ago)
- Topics: rubocop, ruby, vim, vim-plugin, vim-rubocop
- Language: VimL
- Homepage:
- Size: 217 KB
- Stars: 273
- Watchers: 6
- Forks: 45
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Vim RuboCop
The **Vim RuboCop** plugin runs [RuboCop](https://github.com/bbatsov/rubocop) and displays the results in Vim.
## Requirements
Please note that the current version of the Vim RuboCop plugin requires RuboCop 0.12.0 or later.
## Installation
Obtain a copy of this plugin and place `rubocop.vim` in your Vim plugin directory.
## Usage
You can use the `:RuboCop` command to run RuboCop and display the results.
You can also use the `:RuboCop` command together with options. For example, `:RuboCop -l`, `:RuboCop -a` and so on.
### Configuration File
To run with the specified configuration file, add the following line to your `.vimrc` file:
```viml
let g:vimrubocop_config = '/path/to/rubocop.yml'
```### Keyboard Shortcuts
Credit for Shortcuts: [Ack.vim](https://github.com/mileszs/ack.vim)
In the quickfix window, you can use:
o to open (same as enter)
go to preview file (open but maintain focus on ack.vim results)
t to open in new tab
T to open in new tab silently
h to open in horizontal split
H to open in horizontal split silently
v to open in vertical split
gv to open in vertical split silently
q to close the quickfix windowAdditionally, the plugin registers `ru` in normal mode
for triggering it easily. You can disable these default mappings by setting
`g:vimrubocop_keymap` in your `.vimrc` file, and then remap them differently.For instance, to trigger RuboCop by pressing `r` you can put the following in
your `.vimrc`:```viml
let g:vimrubocop_keymap = 0
nmap r :RuboCop
```## License
The Vim RuboCop plugin is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).