ElmCast / elm-vim

Elm plugin for Vim
BSD 3-Clause "New" or "Revised" License
572 stars 102 forks source link

Error detected while processing /Users/me/.janus/elm-vim/ftplugin/elm.vim (using Janus) #136

Open AdamT opened 6 years ago

AdamT commented 6 years ago

Hi there 👋 ,

When I write an Elm file I get this error:

Error detected while processing /Users/me/.janus/elm-vim/ftplugin/elm.vim:
line   44:
E174: Command already exists: add ! to replace it
line   45:
E174: Command already exists: add ! to replace it
line   46:
E174: Command already exists: add ! to replace it
line   47:
E174: Command already exists: add ! to replace it
line   48:
E174: Command already exists: add ! to replace it
line   49:
E174: Command already exists: add ! to replace it
line   50:
E174: Command already exists: add ! to replace it 

Do I have to fix it locally or is it within elm-vim?

Thank you

Update: So I modified it locally with

" Commands
command! -buffer -nargs=? -complete=file ElmMake call elm#Make(<f-args>)
command! -buffer ElmMakeMain call elm#Make("Main.elm")
command! -buffer -nargs=? -complete=file ElmTest call elm#Test(<f-args>)
command! -buffer ElmRepl call elm#Repl()
command! -buffer ElmErrorDetail call elm#ErrorDetail()
command! -buffer ElmShowDocs call elm#ShowDocs()
command! -buffer ElmBrowseDocs call elm#BrowseDocs()
command! -buffer ElmFormat call elm#Format()

But that just doesn't sound right 😄

Janus instructs us to place/clone all plugins in to ~/.janus/ but is installing it like this conflicting with your recommended mode of installation?

EverybodyKurts commented 6 years ago

I started getting this same error as well. I'll give a status update if I can fix it.

EverybodyKurts commented 6 years ago

I believe this issue is related to issue #123

mdxprograms commented 6 years ago

@KurtRMueller @AdamT if it is related to #123 then my current fork has the fix if you want to use it.

AdamT commented 6 years ago

@mdxprograms your commit looks like it'll work 😄 (https://github.com/mdxprograms/elm-vim/commit/4a712f09797315c4424a4513ba447fe983c62698) Any thoughts on PR-ing it back into here?

mdxprograms commented 6 years ago

@AdamT I might have already sent one in, but here is a new PR for this fix: #144