From 046480408831b13d386c264d2855f3b00ce0da5e Mon Sep 17 00:00:00 2001 From: Jiajia Wang Date: Mon, 15 Jun 2015 22:36:10 +1000 Subject: [PATCH] Use location list instead of quickfix list And remove those quickfix window shortcuts. --- README.md | 16 +--------------- plugin/rubocop.vim | 14 ++------------ 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/README.md b/README.md index b51328a..8e81a99 100644 --- a/README.md +++ b/README.md @@ -26,21 +26,7 @@ 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 window - -Additionally, the plugin registers `ru` in normal mode +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. diff --git a/plugin/rubocop.vim b/plugin/rubocop.vim index 2d98d4e..3f052e3 100644 --- a/plugin/rubocop.vim +++ b/plugin/rubocop.vim @@ -54,18 +54,8 @@ function! s:RuboCop(current_args) endif let l:rubocop_output = substitute(l:rubocop_output, '\\"', "'", 'g') let l:rubocop_results = split(l:rubocop_output, "\n") - cexpr l:rubocop_results - copen - " Shortcuts taken from Ack.vim - git://github.com/mileszs/ack.vim.git - exec "nnoremap q :ccl" - exec "nnoremap t T" - exec "nnoremap T TgT" - exec "nnoremap o " - exec "nnoremap go " - exec "nnoremap h K" - exec "nnoremap H Kb" - exec "nnoremap v HbJt" - exec "nnoremap gv HbJ" + lexpr l:rubocop_results + lopen endfunction command! -complete=custom,s:RuboCopSwitches -nargs=? RuboCop :call RuboCop()