Home Download Buy Blog Forum Support

function list in the sidebar

function list in the sidebar

Postby panamajack on Sun May 01, 2011 9:58 pm

how about adding a quick select function list in the side bar

seems like that'd be easy to do. or at least an API interface to add other items to the sidebar
panamajack
 
Posts: 13
Joined: Wed Apr 13, 2011 3:38 am

Re: function list in the sidebar

Postby Montlebalm on Fri Jul 01, 2011 2:54 pm

Seconded. Just to show there's more desire out there for this kind of functionality. I've only been using Sublime for a couple days now, but I've found it refreshingly polished compared to some of the other tools on Windows.
Montlebalm
 
Posts: 1
Joined: Fri Jul 01, 2011 2:49 pm

Re: function list in the sidebar

Postby guillermooo on Fri Jul 01, 2011 2:58 pm

For what it's worth, Ctrl+R will present you with a list of functions in the current file.

EDIT: But it won't work for all languages out of the box.
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: function list in the sidebar

Postby panamajack on Sun Jul 03, 2011 2:21 am

oh that is nice.. has that always worked properly?

anyway, it works for my javascript files. My C# files.. no such luck. Is there a way to configure this?

thanks very much.

Still would like the function list in the side bar.. there's plenty of extra room at the bottom for it and would be really handy.
panamajack
 
Posts: 13
Joined: Wed Apr 13, 2011 3:38 am

Re: function list in the sidebar

Postby guillermooo on Sun Jul 03, 2011 5:24 am

You use .tmLanguage files to specify scopes to extract function names from, and how to format them.

Here's one for Python (from Packages\Python):

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>name</key>
   <string>Symbol List</string>
   <key>scope</key>
   <string>source.python meta.function.python, source.python meta.class.python</string>
   <key>settings</key>
   <dict>
      <key>showInSymbolList</key>
      <integer>1</integer>
      <key>symbolTransformation</key>
      <string>
      s/class\s+([A-Za-z_][A-Za-z0-9_]*.+?\)?)(\:|$)/$1/g;
      s/def\s+([A-Za-z_][A-Za-z0-9_]*\()(?:(.{0,40}?\))|((.{40}).+?\)))(\:)/$1(?2:$2)(?3:$4…\))/g;
   </string>
   </dict>
   <key>uuid</key>
   <string>005BE156-8D74-4036-AF38-283708645115</string>
</dict>
</plist>
guillermooo
 
Posts: 729
Joined: Thu Jul 23, 2009 9:06 am

Re: function list in the sidebar

Postby panamajack on Sun Jul 03, 2011 1:19 pm

thanks!

edit: this is anything but easy trying to decipher all this xml.. nobody's done a little app yet to edit these configuration files?
panamajack
 
Posts: 13
Joined: Wed Apr 13, 2011 3:38 am


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: Yahoo [Bot] and 6 guests