AutoFoldCode
A Sublime Text package that saves/restores folded code regions in files automatically.
Details
Installs
- Total 10K
- Win 6K
- Mac 2K
- Linux 2K
Jul 24 | Jul 23 | Jul 22 | Jul 21 | Jul 20 | Jul 19 | Jul 18 | Jul 17 | Jul 16 | Jul 15 | Jul 14 | Jul 13 | Jul 12 | Jul 11 | Jul 10 | Jul 9 | Jul 8 | Jul 7 | Jul 6 | Jul 5 | Jul 4 | Jul 3 | Jul 2 | Jul 1 | Jun 30 | Jun 29 | Jun 28 | Jun 27 | Jun 26 | Jun 25 | Jun 24 | Jun 23 | Jun 22 | Jun 21 | Jun 20 | Jun 19 | Jun 18 | Jun 17 | Jun 16 | Jun 15 | Jun 14 | Jun 13 | Jun 12 | Jun 11 | Jun 10 | Jun 9 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 1 | 0 | 0 | 2 | 1 | 0 | 2 | 0 | 1 | 4 | 2 | 3 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 1 | 0 | 2 | 2 | 1 | 1 | 0 | 0 | 2 | 0 | 5 | 0 | 1 | 0 | 0 | 0 | 0 | 3 | 2 | 0 | 0 | 1 | 3 | 2 |
Mac | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 | 1 |
Linux | 0 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 0 | 0 | 3 | 1 | 0 | 0 | 0 | 2 | 0 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
AutoFoldCode 
A Sublime Text package that:
- saves/restores folded code regions in files automatically
- saves/restores selections in files automatically
This plugin makes folded code regions and selections persist - whether you're just opening/closing a file, starting/quitting Sublime Text or rebooting your computer, AutoFoldCode will restore your code folds and selections with no hassle.
Installation
Automatic (preferred)
- Open the Command Palette, and find
Package Control: Install Package
. - Search for
AutoFoldCode
and install.
Manual
# To install, clone this repository into you Sublime Packages directory:
cd /path/to/packages/directory
git clone https://github.com/Vasily-X/AutoFoldCode.git
# To update to the latest:
git pull origin master
Usage
Once installed, AutoFoldCode will automatically begin persisting code folds.
This package includes some useful commands:
AutoFoldCode: Clear All
- This command will clear AutoFoldCode's cache, and unfold any folded regions in open views.
AutoFoldCode: Clear Current File
- This command will remove the current file's folded regions from the cache, and unfold all folded regions in the file.
AutoFoldCode: Unfold All Open Files
- This unfolds all open files in all open windows.
- If you want to just unfold just the current file, Sublime Text already includes the
"unfold_all"
command for this.
Configuration
max_buffer_size
- By default, AutoFoldCode will not save folds in any view whose length exceeds
MAX_BUFFER_SIZE_DEFAULT
characters. You can override this value by supplying a"max_buffer_size": <int>
value in yourAutoFoldCode.sublime-settings
file.
- By default, AutoFoldCode will not save folds in any view whose length exceeds
save_selections
- You can also disable the feature which saves/restores selections by setting
"save_selections": false
in yourAutoFoldCode.sublime-settings
file.
- You can also disable the feature which saves/restores selections by setting
FAQ
- “When I start Sublime Text, my code folds/selections aren't restored immediately”
- This is because AutoFoldCode hasn't loaded yet. Once Sublime Text initialises AutoFoldCode, then your folds/selections will be restored.
- “Sometimes AutoFoldCode folds my code in the wrong places”
This will occur if you have closed Sublime Text, edit the file with another editor, then re-open Sublime Text.This used to occur in older versions of this plugin, but shouldn't anymore since it now uses a hash to verify the contents of the file.
Credits
Many thanks to the contributors! And of course, thanks to the great developers at Sublime Text.