Search code examples
rubyrubymine

Manual markers for code folding in RubyMine


In RubyMine, is it possible to insert manual fold markers (like vim or emacs)?

I want to automatically fold a very large hash whenever I open a file. It's available in IntelliJ.


Solution

  • Yes. Rubymine has the same function like IntelliJ.

    Select any code region you like, press option+command+T on a mac or some other similar keys binding on windows (I haven't a win install right now). Also you can do this from menu: Code -> Surround With....

    To go to any custom folding, press option+command+. on mac, or from menu: Navigate -> Custom Folding....