Sublime Forum

Need handle for Sublime's Gutter and Fold-arrow

#1

Hi there guys and girls,

I’m busy building a Regions Folding plugin, similar to Visual Studio’s
#region
//some code
#endregion


My problem at the moment is I need to create, manipulate, delete
the code-folding arrow in the gutter but I cannot find handles for the arrow or the gutter in the API documentation.

There is a reference to the file below, which I think will help, but I can’t find it:
Packages/Default/mark.py

Can anyone please point me in the right direction,
I’m kind of stuck without this handle.

Your time is greatly appreciated, thank you!

0 Likes

#2

There is no dedicated API for folding arrows. The closest you will get are hover or click events on the gutter (or the #region token). See the following thread for details, as well as the on_hover hook in the api docs.

2 Likes

#3

and don’t forget to add a custom icon to the gutter in the relevant locations as per the mark.py in the Default package :slight_smile:
you can get to this by installing PackageResourceViewer from Package Control, then from the Command Palette: PackageResourceViewer: Open Resource -> Default -> mark.py.

1 Like