Skip to content

A Padrino and Ember.js Dev collection of Live Templates for Rubymine(IntelliJ IDEA)

License

Notifications You must be signed in to change notification settings

ror/rubymine-live-templates

Repository files navigation

Rubymine live templates

A collection of useful live templates that you can use within your Rubymine or IntelliJ IDEA installation when you develop your websites with Padrino and Ember.js.

##Install Simply clone the repository to your Rubymine's config/templates folder which can be found here.

Live templates are stored in the following location:

  • Windows: <your home directory>\.<product name><version number>\config\templates

  • Linux: ~/.<product name><version number>/config/templates

  • OS X: ~/Library/Preferences/<product name><version number>/templates

Once you found it, cd into it, then (in Ubuntu)

 
    $ git clone https://github.com/onecoinim/rubymine-live-templates ~/yourpath/ 
    
    $ cd ~/yourpath/rubymine-live-templates
    
    $ cp *.xml ~/.<product name><version number>/config/templates
    
    $ restart Rubymine

##Currently included live templates The follow doc is generated by ./allCurrentTemplates.sh

Ejs.xml

  • __: "<%= __('key') %>"
  • re: "<%= var %>"
  • r: "<%- var %>"

EmberJs.xml

  • a: "Inserts actions:{} expression"
  • c: "Inserts case expression"
  • :f: "Inserts property name: function(){}.property() expression"
  • g: "Inserts this.get() method"
  • ife: "Inserts if else expression"
  • if: "Inserts if(){} expression"
  • :: "Inserts property name: '' expression"

Erb.xml

  • if: "<% if %> <% end %>"
  • re: "<%= %>"
  • r: "<% %>"

HtmlBars.xml/Handlebars.xml

  • b: "Inserts button view"
  • e: "Inserts each expressions"
  • if: "Inserts if() expression"
  • i: "Inserts {{input}} view"
  • {: "Inserts {{}}"
  • lti: "Inserts {{link-to}} inline block"
  • lt: "{{#link-to}} {{/link-to}}"
  • sc: "Inserts setupController() method in route"
  • s: "Inserts view 'select'"

NodeJs.xml

  • a:: "action: function(req, res){}"

Ruby.xml

  • :: ":key => value"
  • l: "=>"
  • utf: "Inserts encoding utf-8"
  • ...

##Contribution

  1. Fork
  2. Add your own live templates
  3. Update the documentation by using the ./allCurrentTemplates.sh template
  4. Send me a pull request
  5. Wait
  6. Profit

License

The MIT License (MIT)

About

A Padrino and Ember.js Dev collection of Live Templates for Rubymine(IntelliJ IDEA)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages