editorconfig / editorconfig-vim

EditorConfig plugin for Vim
http://editorconfig.org
Other
3.13k stars 137 forks source link

Unable to use command :E #176

Closed HiImJulien closed 3 years ago

HiImJulien commented 3 years ago

Hey there!

I just installed this plugin manually; installed for VIM 8.2.2891.

The first thing I encountered that I cannot simply type ':E' to open the file explorer. Sadly, I didn't find anything in the docs regarding this.

How can this be fixed?

xuhdev commented 3 years ago

Is :E from another plugin?

HiImJulien commented 3 years ago

No, it is the default :E i.e. the shorthand for :Explore as provided by VIm. I also noticed, that this problem occurs when I used nVim earlier.

Currently I have no plugins BUT your editorconfig-vim.

HiImJulien commented 3 years ago

Oh, I totally forgot to post the actual error I am encountering:

Ambiguous use of user-defined command

xuhdev commented 3 years ago

What if you run :Explore?

HiImJulien commented 3 years ago

Running :Explore works.

xuhdev commented 3 years ago

I don't think :E is the shorthand for :Explore only. Before you installed EditorConfig, when you type :E, Vim detects :Explore because that's the only command starting with E. After installing EditorConfig, there are a few new commands starting with :E (e.g., :EditorConfigDisable), and therefore :E becomes ambiguous. If you try :Ex, :Explore should still be invoked. If you would like to keep using :E, you probably should add command E :Explore to your vimrc file.

Reference: :h E183

HiImJulien commented 3 years ago

I did not know that vim automatically matches commands.

Adding command E :Explore fixed this. Thanks!