vim-rubocop icon indicating copy to clipboard operation
vim-rubocop copied to clipboard

:RuboCop makes code window blank

Open tomaszwojcik opened this issue 11 years ago • 2 comments

Hey,

I have a strange issue with the new version of the vim-rubocop plugin. Now when I run the :RuboCop command the code window gets cleared (code is not deleted, window is just blank).

My test code:

class TestRubocop
  def method
  end
end

Sometimes I get proper warnings, but most of the time I get something like this (notice the error in the column & row):

/Users/twojcik/playground/1.9.3/test_rubocop.rb:1|1 error| C: Missing top-level class documentation comment.
/Users/twojcik/playground/1.9.3/test_rubocop.rb:1|1 error| C: Missing utf-8 encoding comment.

What I use:

  • MacVim 7.4.52 (reproduced the issue in "normal" Vim)
  • ruby 1.9.3p484
  • rubocop gem (0.21.0, 0.12.0)

Before I've updated the vim-rubocop everything was fine - that's why I assume it can be the plugin's fault.

tomaszwojcik avatar May 13 '14 07:05 tomaszwojcik

Hi.

I was not able to reproduce the problem.

I always got proper warnings following:

test_rubocop.rb|1 col 1| C: Missing top-level class documentation comment.
test_rubocop.rb|1 col 1| C: Missing utf-8 encoding comment.

What I use:

  • MacVim 7.4.52
  • ruby 1.9.3p484 (use RVM)
  • rubocop gem (0.21.0, 0.12.0)
  • vim-rubocop plugin (latest version d3caa5d4271d4e07bc981d5e7b36988b6d423e5f)

What I did:

  1. Open the test_rubocop.rb using MacVim.

    $ mvim test_rubocop.rb
    
  2. Run the :RuboCop command.

ngmy avatar May 24 '14 18:05 ngmy

Hmm it now works fine for me (reinstalled everything). However do you think that this augroup could be the issue?

  autocmd FileType ruby
        \ if expand("%") =~# '_spec\.rb$' |
        \   compiler rspec | setl makeprg=rspec\ $*|
        \ else |
        \   compiler ruby | setl makeprg=ruby\ -wc\ \"%:p\" |
        \ endif

tomaszwojcik avatar May 26 '14 19:05 tomaszwojcik