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

Auto​Fold​Code

by RIDE-2DAY ST3

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

Details

Installs

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

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