-1

I saved the file rubocop.vim in ~/.vim/plugin/, and when I run :Rubocop in Vim I get

Configuration file not found: /path/to/rubocop.yml.

I couldn't find the path to rubocop.yml.

I am on MacOS Mojave.

Thank you.

aerijman
  • 2,522
  • 1
  • 22
  • 32
  • 1
    Does it say that literally? Did you customize the path to the `.yml` file? – tadman Apr 03 '19 at 04:08
  • 1
    like @tadman says, there is a rubocop.yml file. Where is it? You need to tell VIM where this yml file is. – BenKoshy Apr 03 '19 at 04:10
  • @tadman where should I find rubocop.yml? – aerijman Apr 03 '19 at 12:52
  • @tadman I see, I learned that I should have a rubocop.yml in the same root path of the files that I am fixing. PLEASE, correct me if I am wrong. Thank you! – aerijman Apr 03 '19 at 18:43
  • 1
    You can have it per-project, or you can have it set for all projects by putting that in your home directory. It's really up to you. Normally having a `~/.rubocop/rubocop.yml` is a sensible default. – tadman Apr 03 '19 at 18:52

1 Answers1

5

Since Vim8 it is more convenient to use the new "package" feature. This topic has been already covered over here: vi.stackexchange.com/questions/9522/what-is-the-vim8-package-feature-and-how-should-i-use-it

.rubocop.yml is included in the Rubocop public repository.

git clone git@github.com:rubocop-hq/rubocop.git
ggorlen
  • 44,755
  • 7
  • 76
  • 106
siery
  • 467
  • 3
  • 20