Gedit Symbol Browser Plugin

November 14, 2007
I have written a symbol browser (function browser, class browser, etc.) plugin for Gedit, the default GNOME text editor. The plugin is based on Exuberant Ctags (ctags.sourceforge.net) which must be installed to use the plugin.
Function Browser for Gedit

Features

View Screen Shots
  • Supports 34 programming languages (based on ctags)
  • Symbols displayed in a tree grouped by symbol type
  • Icons for symbols can be added for any symbol type ctags can parse
  • Works with local and remote files (SSH, FTP, etc.)
  • View symbols from active tab or from all opened documents
  • Optionally show line number, programming language, and source file in the tree
  • Double-click a symbol to jump to it in the source code

Installation

The plugin is written in C and thus needs to be compiled with the Gedit sources for your distribution if a binary package isn't available. You can check which binary packages are available on the Gedit Symbol Browser Plugin SourceForge project page. Binary Installation
cp gedit-symbol-browser-plugin*.tar.gz ~/.gnome2/gedit/
tar -xzf gedit-symbol-browser-plugin*.tar.gz
Source Installation If a binary package isn't available, you have to compile the plugin yourself. If you do so, please email the plugin files to me at email (at) micahcarrick.com so that I can provide a binary package. To compile the plugin, you must do so within the gedit source tree. Then, you can either install it with that build of gedit or copy the files yourself without compiling or installing gedit. Download and extract the gedit sources to a folder. Download Gedit Symbol Browser Plugin sources and extract to the gedit sources plugins folder (ex: gedit-2.20.3/plugins/). Edit configure.ac, adding 2 lines to AC_CONFIG_FILES
plugins/symbolbrowser/Makefile
plugins/symbolbrowser/symbols/Makefile
Edit plugins/Makefile.am, adding to 'symbolbrowser' to DIST_SUBDIRS and SUBDIRS. Run autoconf and automake, and ./configure in the gedit source dir and then make in the symbolbrowser plugin dir:
autoconf
automake
./configure
cd plugins/symbolbrowser
make
Now if you were to run 'make install' here, it might not install the plugin to the right location. This is because many distributions, by default, install binary (rpm's, dep's, etc.) into a different location that files built from source (/usr/ vs. /usr/local/). So, the easiest way to install the plugin is to simply copy plugin files to your home dir:
cp symbolbrowser.gedit-plugin .libs/libsymbolbrowser.so ~/.gnome2/gedit/plugins/
cp -r symbols ~/.gnome2/gedit/
If you want to install it for all users using 'make install', you'll have to pass the target during the ./configure step. You can find out where the other gedit plugins are already installed by doing:
updatedb
locate gedit-2/plugins
And look for them in something like /usr/lib. Then, you can rerun the configure as shown above passing in the lib dir:
./configure --libdir=/usr/lib
Assuming you're okay with the simpler method (installing the plugin in your home dir), the entire process might look something like this:
# DOWNLOAD AND EXTRACT SOURCES
cd ~
wget ftp://ftp.acc.umu.se/pub/GNOME/sources/gedit/2.20/gedit-2.20.3.tar.gz
tar -xzf gedit-2.20.3.tar.gz
cd gedit-2.20.3
cd plugins
wget http://superb-west.dl.sourceforge.net/sourceforge/symbol-browser/gedit-symbol-browser-plugin-0.1.tar.gz
tar -xzf gedit-symbol-browser-plugin-0.1.tar.gz

# EDIT MAKE AND CONFIGURE FILES
sed -i 's/SUBDIRS =/SUBDIRS = \t\\\n\tsymbolbrowser\t/g' Makefile.am
sed -i 's/DIST_SUBDIRS =/DIST_SUBDIRS =\t\\\n\tsymbolbrowser\t/g' Makefile.am
cd ..
sed -i 's/AC_CONFIG_FILES(\[/AC_CONFIG_FILES(\[\nplugins\/symbolbrowser\/Makefile/g' configure.ac

# BUILD THE PLUGIN
autoconf
automake
./configure
cd plugins/symbolbrowser
make

# COPY TO HOME FOLDER 
# Note: if you ran ./configure --libdir=/usr/lib then make install may work
cp symbolbrowser.gedit-plugin .libs/libsymbolbrowser.so ~/.gnome2/gedit/plugins/
cp -r symbols ~/.gnome2/gedit/

Adding Symbols

If ctags finds a type of symbol, then Gedit Symbol Browser Plugin adds it to the tree view. If it doesn't find the icon for that symbol you can add it yourself if you wish (send them to me too!). All symbol icons are simply named "symbol-<type>.png" and live in the '~./gnome2/gedit/symbols' directory where <type> is the type as determined by ctags. For example, ctags finds symbols of type 'function' and therefore, there is a png file called 'symbol-function.png'.

Download

Download Paypal IPN Script Download From SourceForge.net

User Contributions

Categories: GTK+ Programming, Linux

86 Comments about "Gedit Symbol Browser Plugin"

Roro
July 8, 2010 at 03:35 AM
Same problem as heepie !
Symbol Browser in gedit it automatically gets grayed out...
John
June 23, 2010 at 02:56 PM
Omg... I found out what was wrong... it's the space in a directory of my file!!

Is there a way to fix this? I can't use this plugin because of this stupid bug. Haha :(
John
June 23, 2010 at 02:46 PM
haxd
June 15, 2010 at 07:00 AM
Hi, this is what I had to do to get this working in ubuntu 10.04:

<code>
sudo apt-get install exuberant-ctags libgconf2-dev libgtksourceviewmm-2.0-dev intltool autoconf automake
</code>

Then followed the build instructions here :)
April 13, 2010 at 12:42 AM
@ Arthur

You can use the binary package for Ubuntu (which is available on sourceforge.net). It works for me on OpenSUSE 11.0, no need to compile from source (make sure you use the right architecture, 32- or 64-bit).

Other thing to do is to install ctags which is done easily through OpenSUSE Install Software package manager.
heepie
April 4, 2010 at 06:30 PM
Just installed exuberant-ctags on Ubuntu Lucid, and downloaded the gedit symbol browser bin i386 archive

http://downloads.sourceforge.net/symbol-browser/gedit-symbol-browser-plugin-bin-ubuntu-i386-0.1.tar.gz?modtime=1195036992&amp;big_mirror=0

Unpack this in ~/.gnome2/gedit

But when I try to enable Symbol Browser in gedit it automatically gets grayed out...
Vik
March 31, 2010 at 01:20 PM
This is certainly the most valuable plugin for developers. Thanks Micah.

FYI, If you are installing it on freshly installed Ubuntu, it may not work because of missing 'libgnomeprintui'. Thanks to VR for posting this tip in his blog - http://oracology.net/2010/01/gedits-symbol-browser-caveat/

Run this to install both the dependencies for this plugin:
sudo apt-get install exuberant-ctags libgnomeprintui2.2-0

-Vik
kuwa
February 19, 2010 at 06:35 AM
robin,

Thank you so much for the 9.10 info!
Eric
February 10, 2010 at 08:10 PM
I can't get this to work (or rather compile src) on Mac OS X for use with gedit binary on Mac (not MacPorts build version). Any advice? Has anyone else been able to get symbolbrowser implemented and working for Mac (10.5)?
Vikas
February 3, 2010 at 11:17 AM
Thanks for this great plugin.

I am having trouble in using this extension on 64 bit Ubuntu 9.10.

Installed the 'gedit-symbol-browser-plugin-bin-ubuntu-AMD64-0.1.tar.gz' binary from SourceForge. The extension shows up in the gEdit-&gt;Prefrences-&gt;plugins. But when I click on the check box, it just gets grayed out.

Has anyone else seen this problem?

Thanks.
Arun
January 5, 2010 at 11:25 AM
i am having problem with the installation of the plugin.First issue is that I am using Gedit 2.28.0
and where to get the ftp link.It could be solved but the other issue is that my autoconf version is 2.64 and your plugin needs 2.61. how can this be fixed
Arthur
December 30, 2009 at 04:54 AM
I could compile symbol browser in OpenSUSE. How can I do to make a binary package ?
Tito
December 8, 2009 at 12:08 AM
Muy bueno el plugin, it's a very good plugin, sorry for my english. I have a recomendation, when turn on the number line option the top level labels (class, functions and members) have the 0 line number, i think its better if this labels dont have this (just nothing).
Thanks man
December 4, 2009 at 03:39 AM
Figured it out for Ubuntu 9.10

needed to install a package:
sudo apt-get install sudo apt-get install libgnomeprintui2.2-0
Kip
December 3, 2009 at 01:32 AM
Found a bug. Segfaults when I open Nate Robbin's OpenGL sample file texture.c.

$ gedit ../Nate\ Robbin\'s\ Tutorials/texture.c

** (gedit:15572): CRITICAL **: Could not execute ctags: Text ended before matching quote was found for '. (The text was 'ctags -n --fields=-k-f-s-t+K+l+n -f - /home/kip/Projects/Learn/OpenGL/Nate Robbin's Tutorials/texture.c')

Segmentation fault
Bill
November 20, 2009 at 04:32 PM
This is very nice!

In my .c and .cpp files the Symbol Browser seems to only show external variabes. It does not seem to show local variables defined inside functions. Is this normal?

Regards,
Bill
Mubarak Alrashidi
November 5, 2009 at 04:24 AM
Thanks a lot for this plugin...

OPEN SOURCE ALWAYS WIN ;)

for all guys who couldn't get this plugin to work

be sure that you have this package "exuberant-ctags"

for debian &amp; *ubuntu:
sudo apt-get install exuberant-ctags

Good luck
BASTA!
November 4, 2009 at 10:26 PM
Too bad source installation is so hellishly complicated...
Derek
November 2, 2009 at 01:26 PM
Thanks to Micah for the general plugin, and thanks to Greg for the Python version.
Calin
July 20, 2009 at 02:36 AM
I have installed ctags but stil not working :(
Jesper Christiansen
July 6, 2009 at 06:13 AM
Thanks!! Great plugin!

I used the previous entry (Jesus, who installed it via Synaptic - ctags) to install the plugin.

Works great for me :-)
Ulrich
July 2, 2009 at 10:28 AM
Thanks for this plugin. I am currently developing some PHP code where some of the filenames end with ".php.inc" instead of ".php", so they are not recognized by ctags. I do not know much about ctags, so I've tried a different workaround...
I've modified the
static gchar * exec_ctags (gchar *filename)
function in your code, so that it detects the "php.inc" extension and forces the ctags binary to use the PHP language for these files.
While it works perfectly for my case, this is probably not the best way to do it ;-) Is there a better way to add additional file extensions?
Jesus
June 13, 2009 at 04:09 AM
Oooops!

Disregard my previous comment. Installed ctags from synaptic and now runs flawesly.
Jesus
June 13, 2009 at 04:04 AM
"Can't get this to work under jaunty."

Me too, but I'm using i386.

Attached a screenshot:

http://img13.imageshack.us/img13/9624/symbolbrowser.png
Augusto Rodrigues de Souza
June 10, 2009 at 12:47 PM
Hello Micah,

Really nice plugin! I liked a lot.... It is very usefull...
Just to help you debuging it, I will report a bug, ok:
-Open a .c file in Gedit from a location with spaces on it, for example: "~/code/my test code"
Actual result: Symbol Browser plugin can't work with paths with spaces...

I don't know if you already know about this bug, if so, sorry :)

Congratulations again for the nice plugin!!
Best Regards,
Augusto
jfca
May 8, 2009 at 12:07 AM
Are there any precompiled binaries for ubuntu available for download or is it just the source?
April
May 6, 2009 at 10:24 AM
Will this solution work on ubuntu 9.04 ?
Lasse
April 25, 2009 at 06:43 AM
Can't get this to work under jaunty.

- Downloaded the amd64-bins.
- Activated the plugin.
- The "Symbol Browser" field is empty.

Yes, I do actually run 64bit.

The symbol browser plugin's icon shows up though, but there are no listings.
Tyler
April 7, 2009 at 06:12 PM
Thank you so much. Gedit can be tweaked to be a great web development IDE but this takes it up a whole other level. Don't know how I lived with out this.

Also much thanks to the User contributed bins.
April 5, 2009 at 02:28 AM
@peter and other Drupal developers: to get this browser to show symbols on .module and .install files, run this command: echo '--langmap=php:+.module.install' &gt;&gt; ~/.ctags

More tips here: http://mavimo.org/drupal/autocompletamento_drupal_gedit
Arthur
March 24, 2009 at 04:50 PM
I want to contribute with the build of a binary distribution of symbol browser for Fedora. I already installed it (it was very hardy for me!) in my Fedora system. I don't remember where, but I read to send you the files generated by the instalation. I don't know which files are you looking for, but you can send a message to help me (and help you too).

Sya!
Paulo
March 12, 2009 at 07:11 PM
Hi,

When I extract the binary to /usr/lib/gedit-2/plugins as suggested in one of the posts above (since ./gnome/gedit doesn't exist), I do see the plugin "symbol browser" in the plugin list under preferences. However, it doesn't get active (it remains like an unclickable button). Does anybody have any idea? I am using Ubuntu 8.10.

Thanks!

Paulo
Sebastian
February 12, 2009 at 07:39 AM
I use Ubuntu 8.10 and gedit 2.24.2. After one hour i could succesfull compile the plugin. But no ".so" file is created, just the ".la" and ".lai". Are these files the same and can i just copy them? WIth this, it should be possible to use Symbol Browser
January 24, 2009 at 07:18 AM
Just wanted to add my thanks and experiences.

As I'm somewhat of a newbie to the install from source thing, getting this to work wasn't smooth sailing. A few pointers that might help others like me:
- although you may have fixed the dependencies before compiling gedit, you might need to fix up the paths right. Compiling Gedit I got missing files for gtksourceview although I had just installed it. Symlinking /usr/local/include/gtksourceview-2.0 to /usr/include/gtksourceview-2.0/ did the trick
- I also had the empty sidebar/nothing displayed trick after opening gedit and getting symbol browser enabled. Fixing the permissions for the symbolbrowser plugin files fixed that.

Thanks for the great work on this, much appreciated :)
Regards
Fake
Jim
January 18, 2009 at 09:40 AM
Has there been any progress on this plugin? It sounds like an awesome addition but I cannot get it to build on my Ubuntu 8.10 system.
jpfle
January 9, 2009 at 12:48 PM
I would like to report another bug:

Crash on opening files containing an apostrophe in the name

Steps to reproduce:
1. Create an empty text file named:

Monter l'iso

2. Click on the file and choose "Open with gedit".

If gedit is already open, it automatically closes, otherwise it doesn't open.

Thanks again.
jpfle
January 9, 2009 at 12:46 PM
Hi Micah,

First, thanks a lot for the useful Gedit Symbol Browser Plugin.

I found a bug: if the path to the file (including the file name) contains a space, Symbol Browser Plugin doesn't work and stays empty. Here's the way to always reproduce this bug:

echo "int main (void) {return 0;}" &gt; "example 1.c"

Open "example 1.c" with gedit and see the empty Symbol Browser panel. The main function isn't recognized. However, if we remove the space in the file name:

echo "int main (void) {return 0;}" &gt; example1.c

and we open example1.c with gedit, the Symbol Browser Plugin recognizes this time the main function.

Thanks.
jpfle
January 9, 2009 at 12:44 PM
Gabriel
December 15, 2008 at 06:43 PM
I am trying to install symbol browser on RHEL 5.2 and I am having some issues. I compile and install all the dependencies (including gtksourceview). When I open up gedit from the command line, and click the symbol browser box in the plugins menu, the box always stays unchecked and this is written to the terminal:

** (gedit:29810): WARNING **: /opt/gtksourceview/lib/libgtksourceview-2.0.so.0: undefined symbol: gtk_text_buffer_add_mark

** (gedit:29810): WARNING **: Could not load plugin file at /home/gh258/.gnome2/gedit/plugins/libsymbolbrowser.so

** (gedit:29810): WARNING **: Error, impossible to activate plugin 'Symbol Browser'

I have recompiled gtksourceview and reinstalled it with some different options, but nothing works. Do you know what is wrong? Thanks in advance
austin
December 9, 2008 at 02:29 PM
Hi Micah,

Please I need ur help in writing a gedit plugin in C in the form of a tutorial. Or is there any site available for learning how to write a gedit plugin in C [or Python]. I'd really appreciate a reply from you. I'm actually planning to write an auto-completion or "intellisense" gedit plugin. Thanks.
November 3, 2008 at 08:30 AM
"good post"
Develo
October 24, 2008 at 12:38 AM
Just installed it, seems nice so far, thank you =)

Thought I'd share the following. In a .cpp file, I have the habit of putting a //--------------- line between function implementations to keep the code more orderly. As it turns out, the symbol table only shows the symbol for the first function prior to that comment line. If I remove all the // comments, it will show all symbols. If I change the comment lines to, say: /*------*/, it shows all symbols too.

I haven't looked too deeply into this, and I'm far from an expert here, but from what I've read so far I gather the files are passed to ctags, and I'm guessing the problem lies there /shrug

For me, I think I'll just change my comment lines. Kinda sucks, but it's something I'll do only once, after which it'll be smooth sailing.

Find this kinda nice when used together with a project manager plugin, makes it feel like an IDE.
October 9, 2008 at 01:17 AM
Awesome plugin! I'd really like to see this plugin as a standard plugin in Gedit someday!
dmg
October 3, 2008 at 07:45 AM
good,perfect plugin.
September 5, 2008 at 08:22 AM
Greg:

I did not know that. One of these days I'll get around to dinking with that.
greg
September 5, 2008 at 08:13 AM
Micah:
I use ctags for parsing too, its output carries the information needed for class grouping. However, fully parsing the exuberant ctags output format in itself isn't so easy; it might be a much better solution to write specialized parsers for the most used languages.

In the current state the plugin is sufficient for me though.
Nicko
September 3, 2008 at 10:06 PM
Micah,

Thanks heaps for this! A feature request (unless it's already implemented and I can't find it):

It would be good to be able to point to the TAGS file so if I have a tree of code in a heap of different directories, I can just run "etags -R" in the base directory, and then point the plugin to that TAGS file and get the listing for functions that may be in a header in an include directory, that is below the current source directory.

Nick
August 27, 2008 at 06:47 AM
Macro:

Yeah, I'll keep that in mind for future versions. I don't prefer working like that but I know some people do. I could have it be one of the preferences. Not too tricky.
August 27, 2008 at 06:46 AM
greg:

I agree, grouping members into the classes would be ideal. Currently, I'm not actually parsing the code (as I don't know all of those 45 languages) as I'm relying on ctags to do that part. It's also missing proper HTML and CSS parsing. However, ctags is under constant development and I know some CVS versions were allowing for some of these things. Perhaps it is much simpler to use ctags with some hacks.

As for python, I originally planned on using Python but went with C since there are some times in my work where I might have as many as 25 open files, some of which are close to 10000 lines of code. I don't want any delay while that treeview loads and didn't want to mess with asychronous code at this point. That was my though process anyway....
Marco
August 25, 2008 at 01:52 AM
Great plugin.
Is there a chance, that you make a popup-window available
that could be used instead of the side pane. This would make
the workflow even better in my opinion. It could work
like the switcher or the snap-open plugin.

Best,
Marco
August 15, 2008 at 07:06 AM
http://greg.geekmind.org/tagbrowser/

That's my first shot at a Python implementation. Several things are different:
- It groups by class/struct/etc instead of by tag type, which makes a lot more sense with OO code
- It strictly only works on a single file per tab
- It is capable of tracking line changes of tags
- No complicated compiling within the GEdit source tree needed, just extract the files to ~/.gnome2/gedit :)

I used the icons provided by your plugin. I hope that's okay.
greg
August 14, 2008 at 11:55 AM
The plugin is neat, but there's major problem with it: it doesn't group classes and the methods/attributes belonging to it together. I'm thinking of either extending the plugin or completely rewriting it in Python. This would make it a lot more easy to install.
August 12, 2008 at 02:48 AM
Aha this is neat. Just what I needed to make Gedit into the ultimate programmers Swiss Army Knife! Would love to see this bundled by default with the other common Gedit plugins on Ubuntu and other distros. Cheers.
Ian
August 7, 2008 at 03:37 PM
Hi,

Thanks for the plugin. There was a problem with the installation instructions for the binary package. ~/.gnome/gedit does not exist and I could not create the directory because a file called gedit did exist.

I did a system wide install by extracting the tar.gz to /usr/lib/gedit-2/plugins.

This put a plugins directory inside the already existing plugins directory so I copied the contents of the symbol-browser plugins directory into the main plugins directory and left the new symbols directory alone.

It works now.

Thanks
July 11, 2008 at 03:59 AM
Would be nice to get symbols out of files with extensions like .module or .install (for Drupal CMS)

regards peter
June 17, 2008 at 09:24 AM
[...] Symbol Browser Shows a list of classes, functions, enums and class [...]
June 14, 2008 at 01:49 PM
Hi Micah,

sorry for disturbance but after ctags, the plugin worked :).
sudo apt-get install exuberant-ctags
June 14, 2008 at 01:24 PM
Hi Micah,
Thank you very much for this nice idea, i tried the binary package but it does not work with me i hope if you make a debian package, i'm using Hardy heron.
I can find the plugin in the list of plugins available, i enabled it but when i open any file i did not get any symbols displayed :(
Best Regards
April 30, 2008 at 07:05 AM
Seriously, I love you for this one. Makes my gedit SO MUCH MORE. Plan to use gedit only now for PHP :P
Simon
April 17, 2008 at 08:00 AM
Hi,

I'm trying to install gedit plugins but everything in the ~/.gnome2/gedit/plugins are ignored. All tutorials explain this installation directory but it doesn't work here on my out-of-the-box Red Hat installation. Anyone knows why?
April 9, 2008 at 04:43 AM
Thank you man!
Here we work with a particular scripting language called "chilli" for which it exists an unique parser, for UltraEdit32. But, since I don't use Windows, I was just looking for a tool/plugin that could permit me to add the support for this language to my gnome editors. After spending a week on Anjuta, I came across your gedit plugin, and it was immediately love :)
And now I have finally a function listing for the chilli language. Thanks again.
PS: Maybe should I send you the regexps?
HelterSkelter
April 3, 2008 at 01:52 AM
Hi,
i follow your istruction,everything go well(in compilation of plugin).but when i use the plugin ,for example with C file,in the your plugin sidebar nothing ! a clear windows!
I use gedit 2.22.0 in Arch Linux distribution. i hope you know the problem!
nur
February 29, 2008 at 05:12 AM
hi,
thanks for this well written article. I have customized my gedit in fedora 8. now it is so cool to work with. i downloaded binary files of symbol browser plugin and copied meant for ubuntu. it is working so smoothly. So why don't call it binary package for fedora also.
February 22, 2008 at 05:31 AM
Wow. That's exactly what I was looking for.
Just a note. I tried to install it on a PC running Ubuntu 7.04 and the plugin was not able to find the 2.0 version of the libgtksourceview library. Since it seems that version 2.0 is not present in the Ubuntu Feisty repository, I had to fix it by creating a new symbolic link (named 2.0) to the actually present 1.0 version and it seems to correctly work now.
Was it a known issue?
February 21, 2008 at 11:16 AM
"I'm having trouble with the source tarball. The configure.ac files are missing, and it contains .deps directories. So I think it got messed up somehow. Any chance you could post a fixed-up version?"

It needs to be compiled along with the Gedit sources, using Gedit's configure.ac. The instructions above explain how to edit gedit's configure scripts to make sure the plugin is compiled.

"I also noticed that you don't have any files in CVS at SF. Wouldn't it make sense to have the files in CVS or Subversion, rather than just posting tarballs?"

I don't expect it to be updated frequently enough nor be a popular enough project for that. But, perhaps down the road.
Neil Mayhew
February 19, 2008 at 11:32 AM
I'm having trouble with the source tarball. The configure.ac files are missing, and it contains .deps directories. So I think it got messed up somehow. Any chance you could post a fixed-up version?

I also noticed that you don't have any files in CVS at SF. Wouldn't it make sense to have the files in CVS or Subversion, rather than just posting tarballs?
December 28, 2007 at 12:20 PM
Very nice, thanks :D

I have compiling on i386 Debian : ftp://ftp-developpez.com/nicolasj/temp/gedit-symbol-browser-plugin-bin-debian-i386-0.1.tar.gz

Ready to unpack in ~/.gnome2/gedit/ ;)
December 16, 2007 at 09:01 AM
Gocho:

It passes the file to ctags, so it depends on how ctags determines the type. Curious, what does gedit report as the mime type? Perhaps I could use gedit's mime-type determination and force the type when calling ctags.
Gocho
December 15, 2007 at 11:10 AM
I just installed the ubuntu binaries and load a php file en gedit. (example.module)

But the Symbol Browser panel it's empty.
I installed exuberant-ctags, but is still empty.

Then I renamed example.module to example.php and the plugin works :)

Can't symbol Browser detect the file type automatically?
December 7, 2007 at 12:55 PM
Re: michael depetrillo

It is based on ctags. So if ctags can find your class methods as methods, then it will show up in the plugin. It just parses the output of ctags and groups them in the treeview by type.

So you may want to read up on ctags at ctags.sourceforge.net for the language you are talking about.
December 7, 2007 at 12:17 PM
Is this supposed to show class methods? Mine only shows class variables.
November 30, 2007 at 09:39 AM
Yes, there is a binary for ubuntu i386 and ubuntu amd64. If anybody can help me out, I'll post the binaries for FC7 too.
Gianni
November 30, 2007 at 07:30 AM
Just installed exuberant-ctags on Ubuntu Gutsy, and downloaded the gedit symbol browser bin i386 archive

http://downloads.sourceforge.net/symbol-browser/gedit-symbol-browser-plugin-bin-ubuntu-i386-0.1.tar.gz?modtime=1195036992&amp;big_mirror=0

Unpack this in ~/.gnome2/gedit

Start gedit, edit &gt; preferences &gt; plugins and enable the symbol browser. It's that easy!
November 27, 2007 at 09:26 AM
Re: Mattiko

Sounds a bit like you didn't run autoconf, automake, and ./configure in the top-level gedit source directory. I know this can be a bit confusing for a beginner.

I think I have a Fedora installation on another machine, and I'll see if I can build a fedora binary (which you would just have to copy to the right folder instead of compiling).
Mattiko
November 27, 2007 at 04:03 AM
Hey!

I get following error when I run make inside directory gedit/plugins/symbolbrowser. Previous installing setps I did as told. I have Fedora Core 7.

*** No rule to make target `am--refresh'. Stop.

P.S. I am quite few experiences with linux yet.
November 16, 2007 at 11:19 AM
Re: prem

Once ctags is installed, and the plugin is installed, you activate it through:
edit > preferences > plugins
If "Symbol Browser" isn't in the list, then the plugin isn't installed correctly. If it is in the list, make sure it's checked and that ctags is found. Click 'Configure' and the configure dialog should either show the output of 'ctags --version' or say 'NOT INSTALLED'.

Once it's installed and activated, the treeview lives in the left pane which can be seen using 'View' > 'Left Pane'
November 16, 2007 at 11:14 AM
RE: fbloeink

Thanks for the information! I'll have to modify the file so that it uses a define in the makefile to determine the ctags command it will used. Perhaps erhaps exuberant-ctags will work on all systems. I'll ask around.
fbloeink
November 16, 2007 at 08:05 AM
Hey, thanks for the plugin, i found it very useful.

Just one thing i noticed when i installed the plugin on my machine:
Gentoo renames the binary from "ctags" to "exuberant-ctags" due to another binary named ctags in the system.
In the ctags-ebuild from gentoo it says "namepace collision with X/Emacs-provided /usr/bin/ctags".
This requires to exchange "ctags" for "exuberant-ctags" twice in the file "gedit-symbol-browser-plugin-defs.h" , followed by a "make" and copying over the files for the plugin to work on this systems.
November 16, 2007 at 06:54 AM
will come in handy. although like the html, the ruby ctags seems to have a few issues, but that's not your fault. thanks for that! p.s. i did a little write up on gedit for ruby on ubuntu which you might be interested in: http://crepuscular-homunculus.blogspot.com/2007/10/gedit-for-ruby-and-everything-else-on.html
November 15, 2007 at 10:52 PM
I have been using Gedit only as a notepad replacement all the while ... so was very excited with both your articles on Gedit! I had done the changes with the preferences already ... and was very eager to try out the symbol browser plugin ... I got that installed but I found that I had to install ctags on my Ubuntu installation.

'sudo apt-get install ctags'

did the trick for me, but am still unable to figure out how to get that tree structure in my Gedit :(
November 15, 2007 at 06:33 PM
I've updated the build instructions. Thanks for the feedback guys.
Tomas Virseda
November 15, 2007 at 03:52 PM
Hi!

Thank so much for this plugin. I like a lot and as you request I've compiled the source and I got the library (ia32). I wanted to mail you with it and my screenshot :) but I can't find your email.

If you are interested I have a tar.gz ready to send. I wrote down my email in the form so I suppose that you can reach me.

Thanks again.
Chris
November 15, 2007 at 01:38 PM
Great idea!

Few notes on the source install instructions:

config.ac should be configure.ac

./configure needed after automake and before cd plugins/symbolbrowser

To get "make install" to put the symbols in the place the plugin is expecting I had to:

sed -i "s:symbolsdir = \$(libdir)/gedit-2/symbols:symbolsdir = \$(datadir)/gedit-2/symbolbrowser/symbols:" symbols/Makefile.am
November 15, 2007 at 10:48 AM
Hello Micah,

i played around with it and started compiling ctags myself with css support using this source:
http://cssed.sourceforge.net/ctags/css.c

But the HTML support looks quite bad too :( But I'm not goog in regular expressions for doing something fine, i looked in the html.c of ctags sources and it looks really poor.
November 15, 2007 at 05:51 AM
Congratulation, Micah that is really nice!

That is what i needed to port SweeTS ( typo3.area42.de ) to gEdit/ Linux.
Did you know how to add own formats to Ctags?

BTW I wrote some gEdit plugins too:
http://my.opera.com/area42/blog/gedit-browser-preview-plugin
http://my.opera.com/area42/blog/gedit-language-reference-plugin

Leave a Comment about "Gedit Symbol Browser Plugin"

Your Name:
(Required)
Website URL:
(Optional)
Comment:
(No HTML. Newlines and URLs okay.)
Enter CAPTCHA:
 
 
 
 
Share