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 3K
  • Win 2K
  • OS X 690
  • Linux 547
May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11
Windows 3 2 4 6 3 4 2 7 2 5 0 3 4 1 5 3 3 6 0 1 3 1 2 6 1 6 3 2 5 5 2 1 2 6 4 4 1 5 6 4 6 6 2 5 2 3
OS X 1 1 1 0 0 2 2 3 1 1 1 0 2 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 1 1 0 2 1 0 0 2 1 0 0 0 1 0 0 0 1
Linux 1 1 0 0 0 1 1 0 0 1 2 1 0 0 1 0 0 0 2 1 0 1 0 2 1 1 1 0 1 0 0 1 0 0 1 1 3 2 1 2 1 0 0 1 0 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