Make a group of lines remain compressed when opening and closing Sublime

Asked

Viewed 186 times

3

I have a small problem in Sublime Text 2, it has an option on the left side in which I can compress an entire DIV in just 2 lines

Seta na esquerda recolhe todo conteúdo da DIV

Making it easier when you have many lines, the problem that when I close the program and open again it does not come back with this configuration, it comes back with all Divs open.

Is there any configuration I can do so that when I close the program and come back , it comes back with the compressed Divs as I left when closing ?

Taking advantage of the topic, every time I open the program it already comes checked the Word Wrap option, there is some way to configure for every time I open the program it opens with some options already edited , type a Preset settings ?

2 answers

2


Pedro Reis already replied that the Sublime Text 2 does not store compressed portions of text (this is called Folding) between sessions and that this can be done using plugins. Particularly I don’t like to save the use session and simply disable this feature. So note that I don’t use the plugins I’m going to suggest, okay? I know them "by name" (they were here in my bookmarks, for who knows one day use in some need...). If you can successfully use, let us know here (in comment or in your own reply) for future reference. :)

The first plugin is called RegReplace. It is a rule-making tool for matching text (i.e., makes a "search" and executes an "action" in the found text). With this tool you may, for example, create a search for content between clauses <div> and <\div> and use a override action (see how in the project Readme) type fold to compress the text block found. Plugins start up a few seconds after the editor, so it might be easy to run your rule automatically at the beginning (honestly, I’m not sure).

This other, called BufferScroll, seems more appropriate for what you want and simpler to use, because it records different usage settings, such as the scrolling position of the text, the markups (bookmarks) and also the compacts (foldings).

  • 1

    Luiz, I tested and worked everything correctly here with Buffrer Scroll, I can close the program and get back that it stores this minor information without any problem, thank you.

  • @Jeanbragantin For nothing! :)

0

Unfortunately in the standard version Sublime Text 2 does not record this, even because it would take up more memory space. However there are plugins like autocomplete that can help. But I don’t know one that stores it.

Since you are working with a project it might be interesting to use some other IDE. Netbeans is a good option although it is a bit heavy.

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.