ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Auto​Fold​Code

by RIDE-2DAY ST3 Missing

A Sublime Text package that saves/restores folded code regions in files automatically.

Details

Installs

  • Total 3K
  • Win 2K
  • OS X 588
  • Linux 449
Jan 17 Jan 16 Jan 15 Jan 14 Jan 13 Jan 12 Jan 11 Jan 10 Jan 9 Jan 8 Jan 7 Jan 6 Jan 5 Jan 4 Jan 3 Jan 2 Jan 1 Dec 31 Dec 30 Dec 29 Dec 28 Dec 27 Dec 26 Dec 25 Dec 24 Dec 23 Dec 22 Dec 21 Dec 20 Dec 19 Dec 18 Dec 17 Dec 16 Dec 15 Dec 14 Dec 13 Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3
Windows 3 5 7 6 2 0 0 4 2 3 5 3 4 3 1 2 2 5 6 1 2 3 4 1 5 2 2 3 4 3 4 4 4 5 2 6 3 1 2 2 5 5 2 4 8 4
OS X 0 1 1 1 0 0 0 6 1 2 0 0 0 0 0 1 1 3 0 0 1 0 0 0 1 1 0 1 0 0 1 0 0 0 2 3 0 2 1 0 1 0 4 1 1 2
Linux 1 0 1 2 0 0 0 1 0 1 1 1 0 0 1 2 0 1 0 0 0 1 2 0 0 0 1 1 2 1 0 0 0 1 0 1 0 1 1 1 0 0 1 0 2 1

Readme

Source
raw.​githubusercontent.​com

AutoFoldCode

A Sublime Text package that saves/restores folded code regions in files automatically.

This plugin makes folded code regions persist - whether you're just opening/closing a file, starting/quitting Sublime Text or rebooting your computer, AutoFoldCode will restore your folded code with no hassle.

Thank you for checking this out, if you want to support what I do you might buy me a coffee!

Installation

Automatic (preferred)

  1. Open the Command Palette, and find Package Control: Install Package.
  2. 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/RIDE-2DAY/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.

FAQ

  • “When I start Sublime Text, my code folds aren't restored immediately”
    • This is because AutoFoldCode hasn't loaded yet. Once Sublime Text initialises AutoFoldCode, then your folds 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.

Credits

Many thanks to the contributors!
And of course, thanks to the great developers at Sublime Text.

License

MIT