Before

After

then I want auto-complete the reset of newer_micropost. So I press TAB, oops! nothing completed.

That’s because the punctuation character : had been declared to be a part of a word. It means that the :newer_micropost and the newer_micropost are two independent words. Yes, they are. But what I want is they should be completed by the auto-complete. This can be accomplished by a little hacky fragment:

123

(add-hook'ruby-mode-hood(lambda()(modify-syntax-entry?:"."))

BeforeAfter

Fold/unfold code

I use hs-minor-mode to fold/unfold blocks, add following snippet to support ruby block syntax.