Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a section title marker (like XCode's Pragma Mark) in Sublime Text?

The Goto Symbol menu in Sublime text 2/3 lists function and class definitions.

Obviously this would be on a per-language basis, but is there some way to add sections to the "Goto Symbol..." list (apple+r / control+r)

For example, in XCode, using GCC's #pragma directive followed by mark lets you set a title for a group of functions, methods or definitions in its symbol list.

like image 599
stef Avatar asked Nov 12 '22 03:11

stef


1 Answers

You can define custom scopes to be included in the symbol list. So you would effectively have to give #pragma mark a custom scope if it doesn't exist. This would involve editing the language file. Assuming you know what scopes to look for, you can add to the symbol list by following the instructions at Sublime text: Adding symbols to a new language definition (syntax highlighting)

like image 68
skuroda Avatar answered Jan 04 '23 03:01

skuroda