質問

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
役に立ちましたか?

解決

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

他のヒント

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?'.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top