ultisnips or rails syntax

Bug #946549 reported by regedarek
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
UltiSnips
Fix Released
Undecided
Unassigned

Bug Description

Im using ultisnips and my rails snippets works only when i have ruby.rails filetype.

:set filetype=ruby.rails

But then i dont have rails syntax.

Because syntax works on :set filetype=ruby

How to setup filetype or recognize syntax correctly?

Revision history for this message
SirVer (sirver) wrote : Re: [Bug 946549] [NEW] ultisnips or rails syntax

This is not really an UltiSnips issue is it? How about switching the
order of filetypes around? ft=rails.ruby

Otherwise, you should ask this question to the rails community. It has
nothing to do with ultisnips per se.

  status invalid

Changed in ultisnips:
status: New → Invalid
Revision history for this message
regedarek (darek-finster) wrote :

Ok, but I must integrate to vim and set filetype to ruby.rails becose by default is ruby. I spent a lot of time to solve this.

Changed in ultisnips:
status: Invalid → Opinion
Revision history for this message
regedarek (darek-finster) wrote :
Changed in ultisnips:
status: Opinion → Incomplete
Revision history for this message
SirVer (sirver) wrote :

I have some trouble understanding the problem. If you want rails snippet in ruby file type, why don't you just create a file `~/.vim/UltiSnips/ruby.snippets` and add a line

    extends rails

What is the trouble with that?

Revision history for this message
SirVer (sirver) wrote :

Or is your trouble setting the filetype to ruby.rails? If so, make a new file ~/.vim/ftdetect/rails.vim (name doesn't matter).

autocmd BufNewFile,BufRead *.rails set ft=ruby.rails

Revision history for this message
regedarek (darek-finster) wrote :
Revision history for this message
regedarek (darek-finster) wrote :

Thx SirVer #4 i the best solution ;) Sory for bother you.

Revision history for this message
SirVer (sirver) wrote :

I just pushed the implementation of UltiSnipsAddFiletypes. You can add in ~/.vim/ftplugin/rails.vim

UltiSnipsAddFiletypes rails.ruby

without having to change your &ft variable.

Changed in ultisnips:
status: Incomplete → Fix Committed
Revision history for this message
SirVer (sirver) wrote :

Released in 2.2.

Changed in ultisnips:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.