Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

maybe scala.xpt.vim should be under a directory named scala #28

Closed
scil opened this issue Jun 22, 2013 · 8 comments
Closed

maybe scala.xpt.vim should be under a directory named scala #28

scil opened this issue Jun 22, 2013 · 8 comments

Comments

@scil
Copy link

scil commented Jun 22, 2013

i use Vundle install vim-scala and xptemplate , and something wrong

error ocure file : ftplugin\xpt\xpt.xpt.vim

let s:xpt_snip = split( globpath( &rtp, "ftplugin/**/*.xpt.vim" ), "\n" )
call map( s:xpt_snip, 'substitute(v:val, ''\V\'', ''/'', ''g'')' )
call map( s:xpt_snip, 'matchstr(v:val, ''\Vftplugin/\zs\.\*\ze.xpt.vim'')' )

for v in s:xpt_snip
    echoerr v  " debug 
    let [ ft, snip ] = split( v, '/' )
    ...
endfor

debug output:

_comment/c.like
...
java/java/
javascript/javascript
...
scala

when "scala" output, err occur, because 'scala' can't be splited by '/'.

so i think scala.xpt.vim should placed under a new dir named scala.

@derekwyatt
Copy link
Owner

I can't reproduce this. What version of XPTemplate are you using? Is there something specific to Vundle that causes this?

@scil
Copy link
Author

scil commented Jul 4, 2013

i use spf13 install XPTemplate and update .

        Bundle  'drmingdrmer/xptemplate'

anyway, there is a line in ftplugin\xpt\xpt.xpt.vim

let [ ft, snip ] = split( v, '/' )

so this is ok

let [ft,snip] = split('scala/scala','/')

and this is not

let [ft,snip] = split('scala','/')

@derekwyatt
Copy link
Owner

Fixed in dcb3344

derekwyatt added a commit that referenced this issue Nov 25, 2013
- scala.xpt.vim has been moved to its own subdirectory
@char101
Copy link

char101 commented Nov 27, 2013

Moving it into a scala subdirectory causes it to be sourced whether the user has xptemplate or not.

@ehamberg
Copy link

This seems to break stuff for those of us who don't use xptemplate, as vim will attempt to source ftplugin/scala/scala.xpt.vim and throw lots of errors since that file is full of non-existing commands.

derekwyatt added a commit that referenced this issue Dec 1, 2013
@derekwyatt
Copy link
Owner

OK. Put it back the way it was.

ornicar added a commit to ornicar/vim-scala that referenced this issue Dec 18, 2013
* 'master' of git://github.com/derekwyatt/vim-scala: (24 commits)
  Added annotations and dots to case matches
  Some syntax fixes
  val,var and def names are now Statements
  Update README.md
  Enhanced calls to constructors
  Added backtick literals and digraphs for 'specials'
  I forgot comments (?!)
  Refactoring the syntax file
  Reverting 'fix' for issue derekwyatt#28
  Fixed issue derekwyatt#37
  Fixed issue derekwyatt#34
  Fixed issue derekwyatt#31
  Fixed issue derekwyatt#28
  Simple fix to keep it to 80 columns
  Enhanced syntax to handle string interpolation
  Add spec for multiple newlines
  Convert readme to markdown
  Add more specs
  Adjust travis emails
  Add more fixtures
  ...

Conflicts:
	ftplugin/scala.vim
	syntax/scala.vim
@alkersan
Copy link

alkersan commented Aug 8, 2014

I also faced with this issue recently with all latest versions of vim and it's plugins. Solved with moving ftplugin/scala.xpt.vim to ftplugin/scala/scala.xpt.vim, but this is not an option for those who don't use xptemplate, as noted Charles.
I think that sensible solution would be to push scala.xpt.vim to xptemplate. XPT is bundled with lots of language snippets, but not with scala.

@derekwyatt
Copy link
Owner

Alright, I'll stick this on the TODO list with a new ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants