All Projects → tadast → Sublime Rails Snippets

tadast / Sublime Rails Snippets

Sublime Text snippets for the latest Ruby and Rails versions

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Sublime Rails Snippets

Bulma-Snippets-Sublime-Text-Plugin
Bulma Snippets Sublime Text Plugin
Stars: ✭ 13 (-96.8%)
Mutual labels:  snippets, sublime-text
network tech
Cisco config syntax and snippets for Sublime Text
Stars: ✭ 82 (-79.8%)
Mutual labels:  snippets, sublime-text
rocketnative-sublime-snippets
[DEPRECATED] Rocketseat React Native snippets for Sublime Text Editor
Stars: ✭ 16 (-96.06%)
Mutual labels:  snippets, sublime-text
Packagedev
Tools to ease the creation of snippets, syntax definitions, etc. for Sublime Text.
Stars: ✭ 378 (-6.9%)
Mutual labels:  snippets, sublime-text
React Native Snippets
✏️ A collection of React Native snippets for Sublime Text and Atom
Stars: ✭ 257 (-36.7%)
Mutual labels:  snippets, sublime-text
laravel forms boostrap snippets
Handy Sublime Text snippets to create forms inputs for Laravel Collective Forms with Twitter Bootstrap 3.
Stars: ✭ 38 (-90.64%)
Mutual labels:  snippets, sublime-text
github markdown snippets
GitHub flavored Markdown with plain'ol HTML knowledge! Boom!
Stars: ✭ 23 (-94.33%)
Mutual labels:  snippets, sublime-text
elm-syntax-highlighting
Syntax Highlighting for Elm in Sublime Text
Stars: ✭ 27 (-93.35%)
Mutual labels:  sublime-text, editor-plugin
GDL-sublime
📝 A Sublime Text package for the programming language GDL (Geometric Description Language)
Stars: ✭ 25 (-93.84%)
Mutual labels:  snippets, sublime-text
vscode-gleam
📟 Gleam support for VS Code
Stars: ✭ 34 (-91.63%)
Mutual labels:  snippets, editor-plugin
SaneSnippets
Sublime Text snippets optimized for humans, not robots
Stars: ✭ 59 (-85.47%)
Mutual labels:  snippets, sublime-text
Sublimetutor
An interactive in-editor keyboard shortcuts tutorial for Sublime Text 3
Stars: ✭ 336 (-17.24%)
Mutual labels:  productivity, sublime-text
sublime-angular-material-snippets
Angular Material Design snippets plugin for Sublime Text 2/3
Stars: ✭ 25 (-93.84%)
Mutual labels:  snippets, sublime-text
vscode-elixir-snippets
Elixir code snippets for VS Code
Stars: ✭ 17 (-95.81%)
Mutual labels:  snippets, editor-plugin
zephir-sublime
Sublime Text syntax highlighting for for Zephir
Stars: ✭ 41 (-89.9%)
Mutual labels:  sublime-text, editor-plugin
sublime-PICO-8
PICO-8 plugin for the Sublime Text 3 editor.
Stars: ✭ 42 (-89.66%)
Mutual labels:  snippets, sublime-text
zurb-ink-sublime-snippets
ZURB Ink Sublime Snippets
Stars: ✭ 25 (-93.84%)
Mutual labels:  snippets, sublime-text
elm-format-on-save
Sublime Text plugin to run elm-format on save
Stars: ✭ 18 (-95.57%)
Mutual labels:  sublime-text, editor-plugin
opentype-feature-bundle
Syntax highlighting and snippets for OpenType feature development in TextMate/Sublime Text
Stars: ✭ 35 (-91.38%)
Mutual labels:  snippets, sublime-text
Coffeescript Sublime Plugin
Syntax highlighting and checking, commands, shortcuts, snippets, compilation and more.
Stars: ✭ 296 (-27.09%)
Mutual labels:  snippets, sublime-text

Sublime Text Rails snippets

⚠️ I'll be porting these changes to the official Sublime Text Rails snippets. Here's how you can help

This repo provides up-to-date Ruby and Rails snippets for Sublime Text: it's designed to be used with Ruby >= 2.0 and Rails >= 3. All the snippets can be found in this cheatsheet generated by Snipcheat.

class

ActiveRecord

migrations

Installation

If you're using Sublime Text 2, please refer to older installation instructions.

From Package Control

The easiest way to install the snippets is via package control.

However this method has a little downside: it adds new snippets but does not remove the old ones. This means that for some snippet triggers e.g. vp (validates presence) you'll see a drop-down with two options, not one.

Look for "Ruby on Rails snippets" in Package Control. Here's how to install packages

From Git

This method replaces the default outdated snippets, but you have to keep it up to date manually by running git pull every now and again.

To install via git:

  • First, cd into the ST3 Packages directory
# Mac:cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
➜ # Linux:cd ~/.config/sublime-text-3/Packages/
  • Then clone this repo into the folder
➜ ls | grep Rails
➜ # if there is a `Rails` dir, back it up e.g. archive it and remove the original.
➜ git clone https://github.com/tadast/sublime-rails-snippets.git Rails

It is important to clone it into a folder called Rails. Some Sublime plugins have hard-coded dependencies pointing to that path. See troubleshooting.

Troubleshooting

Syntax highlighting doesn't work

You might need to tell Sublime text to use the Ruby on Rails syntax provided by Ruby on Rails Snippets. With an .rb file open and focused navigate to View -> Syntax -> Open all with current extension as... -> Ruby on Rails Snippets -> Ruby on Rails

Sublime picks Ruby (not Rails) syntax

You might need to tell Sublime to prefer Rails over Ruby by navigating to View -> Syntax -> Open all with current extension as... and picking Rails of Ruby on Rails snippets

Can't find *.tmLanguage

If Sublime complains it can't find Ruby on Rails.tmLanguage, chances are you are using this hack.

You'll need to change the path where it looks for that file. Here's the forked version which works with this plug-in.

You may also need to change Packages/(DetectSyntax|User)/DetectSyntax.sublime-settings to replace/include this rule

{
  "name": "Ruby on Rails snippets/Ruby Haml",
  "rules": [
    {"file_name": ".*\\.haml$"}
  ]
},
{
  "name": "Ruby on Rails snippets/Ruby on Rails",
  "rules": [
    {"function": {"name": "is_rails_file"}}
  ]
}

Ruby on Rails snippets is a default installation directory for Package Control. If you installed in a different directory, change the path accordingly

How to contribute

  1. Fork it
  2. Create your feature branch for each group of snippet changes that could be merged individually (git checkout -b my-new-snippet)
  3. Commit your changes (git commit -am 'Add some snippet [tab_trigger]')
  4. Commit messages should start with a verb in present simple tense and have all affected tab triggers in square brackets e.g. "Add a snippets for partial rendering [rpc, rpo]"
  5. Push to the branch (git push origin my-new-snippet)
  6. Create new Pull Request
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].