Bug 56407

Summary: Generate Bookmarks from regular expression
Product: [Applications] kate Reporter: Carsten Schlipf <carsten.schlipf>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: wishlist    
Priority: NOR    
Version: 2.1   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Carsten Schlipf 2003-03-25 21:20:24 UTC
Version:           2.1 (using KDE 3.1.1)
Installed from:    SuSE
Compiler:          gcc version 3.2
OS:          Linux (i686) release 2.4.19-4GB

I regulary use the bookmarks in kate for defining a bookmarks at each function declaration in a file. However this requires quite some work after reopening a file: I have to set the bookmarks manually for each function.

It would be very nice to have a feature "Bookmarks -> Generate from Regular Expression..." that asks for a regular expression that is applied to each line. Each matching line will then become a bookmark.

Example:

In a Perl script, I would generate the bookmarks from the regular expression 

^sub [^ ]*$

and then I have a bookmark for each beginning of a function. 

This functionality could also provide predefined patterns for certain language modes, e.g. if the language mode is Java, then there would be the possibility to set bookmarks at each class definition by using a menu item like "Bookmarks -> Set Bookmarks at -> Class Definitions" or set bookmarks for each function with "Bookmarks -> Set Bookmarks at -> Function definitions".
Comment 1 Anders Lund 2004-02-25 10:37:43 UTC
Allmost ready :-)
Comment 2 Anders Lund 2004-03-08 21:48:57 UTC
The autobookmarker plugin is now in cvs.
It is a KTE plugin, so it will work in kwrite and katepart in konquereor or any other app as well if you enable it for that application.

It has a config page (for entering your regexps and file masks), so it won't work for KDE < 3.3 (or CVS HEAD as of this writing).
Comment 3 Georgi Ivanov 2005-03-11 09:18:27 UTC
I'm with KDE 3.4 RC1 now ant this feature is not in.
It was in KDE 3.3.2 . What happened ?
Is this a plugin or it's an internal feture of KATE ?
If it's a plugin , what should i install ? I already have kdeaddons but it's no there.

Joro
Comment 4 Anders Lund 2005-03-11 10:58:47 UTC
On Friday 11 March 2005 09:18, rat_bg wrote:
> I'm with KDE 3.4 RC1 now ant this feature is not in.
> It was in KDE 3.3.2 . What happened ?
> Is this a plugin or it's an internal feture of KATE ?
> If it's a plugin , what should i install ? I already have kdeaddons but
> it's no there.
>
> Joro


It is a plugin in kdelibs/kate/plugins/autobookmarker
I disabled the compilation of the plugin because it caused also problems, and 
it is automatically enabled when present. You'd need to add the directory to 
the subdirs variable in kdelibs/kate/plugins/Makefile.am to make it compile.

There is a standalone version of the plugin available on kates website.

-anders
Comment 5 Pere Constans 2005-03-21 18:36:48 UTC
> There is a standalone version of the plugin available on kates website.

I found this plugin really usefull and I'd like to have it back in my recently upgraded KDE3.4. I've been looking for the standalone plugin to compile it but I've not been able to find it. I looked through the Kate's site and at http://kate.kde.org/3rdparty.php, but no success. Please, could you tell us where is it? Thank you.

Pere
Comment 6 Carsten Schlipf 2005-03-22 09:53:53 UTC
I also can't find it. Since I got rid of RedHat I use the SuSE RPMs and do not compile it on my own. So it would be nice to have a way to get it, without the need to compile kdelibs.

What about creating an entry for this plugin on KDE-Apps.org?
Comment 7 Iges Seem 2005-03-22 17:07:36 UTC
I rellay like the autobookmarker feature, it makes jumping to different classes and methods in a file really easy. But in KDE 3.4 it is not enabled by default anymore, I hope that whatever problems it causes can be sorted out ;)
Comment 8 Carsten Schlipf 2005-03-22 20:14:29 UTC
I reopened this bug, since quite some people are missing it and there is no longer an easy way for the average user to get it.
Comment 9 Anders Lund 2005-03-22 21:10:34 UTC
I have made the plugin available as a seperate package at kde-apps.org. If you create a rpm, deb or other common package, send it to me on email and i'll make it available.

http://www.KDE-Apps.org/content/show.php?content=22106
Comment 10 Carsten Schlipf 2005-03-22 22:01:37 UTC
Thank you very much, Anders. However the URL is not correct. The correct URL is http://www.kde-apps.org/content/show.php?content=22102
Comment 11 Anders Lund 2005-03-22 22:14:15 UTC
because of that *** site being one big bug it was submitted several times, and i deleted the extra instances. This attempt to be nice has really lead to the worst internet experience I've had since a long time.