jEdit Community - Resources for users of the jEdit Text Editor
RecentBufferSwitcher With SuperAbbrevs
Submitted by freeborough on Wednesday, 29 September, 2010 - 12:34
Hi, I've been using the RecentBufferSwitcher plugin for some time and have it bound to Ctrl + Tab. I've recently discovered the SuperAbbrevs plugin and want to use it alongside RBS, however it seems that with RBS enabled Tab doesn't trigger SuperAbbrevs.

Is there an alternative to RBS (that can work in exactly the same way) that doesn't hog the key it's assigned to?

Could RBS be modified to allow it to work with SuperAbbrevs? What would I need to make it do that it's not doing at the moment?

Failing that, I was thinking of configuring / modifying SuperAbbrevs to use the Space key instead of Tab for its trigger - much like the normal built-in abbreviations which I've got used to.

Are any of these work-arounds available already?

Thanks in advance,

- Andy.
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Shortcuts
by Robert Schwenn on Wed, 29/09/2010 - 17:37
The shortcuts of all actions of jEdit and it's plugins are configurable in "Global Options -> Shortcuts". Maybe this could help You?
 
Unfortunately Not
by freeborough on Thu, 30/09/2010 - 08:32
Robert, unfortunately simply managing the shortcuts through the interface isn't possible in this instance. The main reasons for this are:

I want RBS to be on Ctrl + Tab no matter what - this is what the same functionality is in every other application and I'm too used to it / can't change it for other applications.

I've been looking at the source for both plugins and the shortcut for SuperAbbrevs is hard-coded. While the shortcut is defined in it's properties file, the code calls the TabAndInsert functionality directly if it decides it shouldn't handle the key event.

So, in an ideal world I'd like the RBS plugin to 'pass on' the key event if it determines it shouldn't use it. Quickly looking at the code I can't really see what's causing it to not do this - it's only calling consume in certain instances. I'd need to debug it to see really I think.

The other option is to change the SuperAbbrevs plugin to better handle its shortcuts. Ideally I could get it to identify the functionality of the shortcut before, then call that functionality instead of always calling TabAndInsert. However, while having SPACE to activate SuperAbbrevs would be OK, I would want TAB to switch between the template variables, so some extra work would be needed to handle this.

Anyway, I've only had a very quick look at the code - when I've got time I'll have a proper look and see if there is a nice fix. Any suggestions are more than welcome!

Thanks,

- Andy.
 
Mailing List
by Robert Schwenn on Thu, 30/09/2010 - 18:38
You should ask this question in the mailing list ( https://lists.sourceforge.net/lists/listinfo/jedit-devel ), where the developers will see it.

Also, You could make changes to the code of a plugin and try to commit it as a patch ( http://sourceforge.net/tracker/?atid=997937&group_id=588&func=browse ).
 
Further Investigation
by freeborough on Fri, 01/10/2010 - 00:00
Robert, thanks for the information about getting the problem seen by the developers, that's very useful. I should have some time over the weekend / coming week to have more of a play with the code. If I don't come up with a solution, for which I can release a patch, I'll at least have a better knowledge of the problem to take to the developers.

It gives me a good excuse to write my first jEdit plugin too to learn something of the framework. Hmm, what to do..

Thanks for your help,

- Andy.
User login
Browse archives
« November 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   101634
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300