Code Monkey home page Code Monkey logo

Comments (11)

honza avatar honza commented on May 9, 2024

Fixed. Thanks for taking the time to report this.

from vim-snippets.

taq avatar taq commented on May 9, 2024

Hey, maybe will be a good idea to split the Ruby snippets on Ruby and Rails ones?

from vim-snippets.

honza avatar honza commented on May 9, 2024

@tag - Good idea. Same as Python/Django. Go for it!

from vim-snippets.

taq avatar taq commented on May 9, 2024

Ok! I'll split they tomorrow! :-)

from vim-snippets.

taq avatar taq commented on May 9, 2024

Hey @honza is it possible to load two snippets files for a file type? How is this made for Python and Django?

from vim-snippets.

thenoseman avatar thenoseman commented on May 9, 2024

Perhaps extract those for rspec also?

from vim-snippets.

honza avatar honza commented on May 9, 2024

@taq - thoughts on the rspec stuff? I'm not even sure what the syntax looks like.

from vim-snippets.

taq avatar taq commented on May 9, 2024

@honza, @thenoseman, yes, could be a good choice to split the rspec also. When using Ruby we don't need the Rails snippets, when using Rails we do need the Ruby snippets, but when using Rails we don't necessarily need the rspec snippets. :-)

from vim-snippets.

taq avatar taq commented on May 9, 2024

@honza, @thenoseman, seems that the Rails snippets are already there on the eruby.snippets file. So I think we can move, for example, this cfor snippet there. I'll do this and check the rSpec snippets file, maybe we need to ask vim-snipmate to load the rspec snippets together with the ruby one when the filetype is ruby or eruby.

from vim-snippets.

honza avatar honza commented on May 9, 2024

I don't think there is a way to import snippets from a snippets file to another snippets file - which would be awesome. There is a hacky way this can be accomplished though. There's a global variable in snipmate that will allow you to override the context per file extension. For example: you open a .rb file and both Ruby and Ruby on Rails snippets are loaded. Unfortunately, I can't remember the right syntax for this - it shouldn't be too hard to find. Have a look in the issues for snipmate.

from vim-snippets.

taq avatar taq commented on May 9, 2024

Hey @honza. I found that vim-snipmate allows loading another snippets based on the filetypes, check the scope_aliases on
https://github.com/garbas/vim-snipmate/blob/master/autoload/snipMate.vim
If there is really a need to split the Ruby with the rSpec snippets (btw, I'm not the correct person to keep rSpec, because I just use regular TDD), I'll ask to change the scope_aliases var to allow 'ruby','rspec'. :-)

from vim-snippets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.