Question

Is there a Sublime Text plugin for Ruby that, after I type class/def something + Enter, will automatically insert end and place the curser in the class/method?

For example, typing def initialize(args) + Enter would result in:

def initialize(args)
  #cursor here
end
Was it helpful?

Solution

In Textmate if you type def + Tab, it sets things up for you like that. I believe Sublime does the same.

OTHER TIPS

I haven't used sublime, but here is what i found.

  1. you could create snippets using Ruby on Rails Snippet package

  2. You could use the solution given in 'How to automatically add "end" to code blocks?'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top