derekwyatt / vim-scala

My work on integration of Scala into Vim - not a ton here, but useful for me.
http://derekwyatt.org
Apache License 2.0
1.09k stars 144 forks source link

Abort scala.xpt.vim if xptemplates isn't installed #123

Closed jvstein closed 2 years ago

jvstein commented 8 years ago

This fixes issue #28 for users of bundle managers like NeoBundle, Pathogen, or Vundle. Temporary fix until issue #74 is closed.

jvstein commented 8 years ago

I tested locally both with and without the xptemplates plugin installed. No errors opening .xpt.vim files or .scala files.

ches commented 8 years ago

Never noticed a problem with this myself, and I don't have xptemplates installed so I'm not sure why. But this looks like the typical way to handle this sort of thing with an include guard. Seems okay to me.

jvstein commented 8 years ago

I have both xptemplates and vim-scala installed using pathogen.

With the current location of scala.xpt.vim, I get this error when I try to edit any xptemplate file with vim.

"bundle/xptemplate/ftplugin/java/java.xpt.vim" 40L, 770C
Error detected while processing /home/user/.vim/bundle/xptemplate/ftplugin/xpt/xpt.xpt.vim:
line   31:
E688: More targets than List items
Press ENTER or type command to continue

Moving the scala.xpt.vim file into the ftplugin/scala/ folder of vim-scala fixes the problem, but as stated on #28, that caused problems for non-users of xptemplates. This is a compromise.