Surround selection with string (Surround.bsh v1)
Submitted by
vdichev on
Monday, 29 October, 2007 - 11:31
This script is designed to help with inline markup of strings for reStructuredText, AsciiDoc, txt2tags, or other similar Lightweight markup languages. Of course, you can use it on *any* plain text where you want to convey extra meaning to the contents.
Similarly to the XML plugin, it can surround multiple selections with the string requested by the user (by default, an asterisk- "*"). To be accepted as valid markup, though, the string must be at the start or end of the word, so the macro inserts the string at the closest word boundary without shrinking the selection. The selection is preserved, making it easier to apply another markup command afterwards.
Unlike the Add_Prefix_and_Suffix.bsh macro, this one operates on selections, not selected lines.
mysql tables problem
Submitted by
sirfaber on
Friday, 2 November, 2007 - 00:33
I just figured out that there is a problem in table definition... actually, mysql script used to create tables contains some odd field name (eg: "index") and mysql report an error. If it's correct it's necessary to change db init script and tables references in the code.
Selecting/Excluding lines of text
Submitted by
jurrie on
Friday, 2 November, 2007 - 16:59
When analyzing log files it can be handy to run with split views with each view being restricted to a particular subset of lines from the file in question. I'm trying to do something like this with jEdit and am looking for some guidance to steer me in the right direction. A search of the User's Guide and this forum didn't yield any obvious answers, possibly due to my use of inaccurate search terminology. Here goes:
1. how can I display only lines which match a certain search string (or pattern) ?
i.e. Show only lines with contain the string "MyLogEntry:"
2. how can I restrict the display content to only those lines which do not meet some exclusion content?
Ideally I'd be able to add and remove display filter restrictions dynamically.
i.e. Only show lines which do not contain the string "ComponentA:" nor the string "ComponentD:" nor the string "ComponentZ:"
In both of these cases I'd like to maintain the buffer's gutter and the ability display the original line numbers.
Is there a standard jEdit means of doing this?
Any guidance would be appreciated.
Saving & Editing Read-Only Files
Submitted by
drperrier on
Sunday, 4 November, 2007 - 18:58
I want to edit and then save a read-only file and I can't seem to do this. The "Read Only" macro built in only seems to work one-way and trying beanshell and entering buffer.setReadOnly(false) doesn't work either. Trying the search here at the community only turned up hits for people trying to make files read-only.
Is there a simple way to edit and then save read-only files in JEdit? Textmate and even Smultron will let me edit read-only files and then save them by authenticating myself as the root user inside the program. I'd like to stick with JEdit.
I'm running JEdit 4.3pre11 on Mac OS 10.4.9 and am dealing with a ruby directory I created as the root user in a unix window.
Thanks
Cannot see contents of Samba share
Submitted by
Slav Erik on
Tuesday, 6 November, 2007 - 09:30
Hi,
I'm running Ubuntu 7.10 on my workstation, and most of my files are on my server(running ubuntu 6.06). I connect via a Samba share which is mounted at boot.
I installed jEdit via the .deb install using synaptic, and it appears to work great apart from one major issue, I cannot access any of my work files. The samba share appears but when I click on it it is shown as empty. I've turned off the two step save incase thats the problem but still no go.
Any help at this point would be much appreciated as it's taken me quite some time to find an IDE as good as phpEdit that runs on Linux.
Thanks.
CtagsSideKick case insensitive tag sort?
Submitted by
colinl on
Thursday, 8 November, 2007 - 16:36
Hi
I use CtagsSideKick with C++, it is excellent. Unfortunately I have legacy code that is inconsistent in the case of function names. When I sort tags by name it correctly but non-intuitively (for me anyway) sorts all functions starting in upper case before those starting in lower case. Is there a way of getting it to ignore the case?
Thanks
jEdit java source files
Submitted by
vikki_pu on
Monday, 12 November, 2007 - 05:32
Hello ,I want to know that where I get the Java source files of jEdit editor or like as DrJava,J,eclipse etc...
Anyone know the Url or link so please tell me.
Thanks in Advance..
jEdit Font Courier New != Windows Courier New ?!
Submitted by
uhuebner on
Thursday, 15 November, 2007 - 13:02
I'm using jEdit 4.2pre11 on Windows XP.
Text Area font is Courier New 12.
Why does it look completely different (may I say ugly?) from the Windows one?
Can I use the Windows font?
Plugin Console: TOGGLE LABEL is not working properly
Submitted by
domingo80 on
Thursday, 15 November, 2007 - 23:42
Hello guys,
I'm having some problems making an XML file for a commando UserInterface with
the console plugin.
The jedit help is telling about the use of the TOGGLE_ENTRY ELEMENT the
following:
Here is an example TOGGLE_ENTRY element:
<TOGGLE_ENTRY LABEL="Additional file" VARNAME="ignoreCase"
EVAL="buffer.getPath()"/>
Now, i've try this:
<?xml version="1.0"?>
<!DOCTYPE COMMANDO SYSTEM "commando.dtd">
<COMMANDO>
<TOGGLE LABEL="blahblah"
VARNAME="var1" />
<TOGGLE_ENTRY LABEL="more blah " VARNAME="var2"
EVAL="buffer.getPath()"/>
</COMMANDO>
The first action "toggle" is working, which means for me that the xml file (under
\.jedit\console\commando) has been found and could be read. Now, if i add the
element "toggle_entry" jedit is giving an error. Im having exactly the same
problem with the LONG ENTRY element!
Am i doing something really wrong or is this a bug? This feature is really
important for me, so if u guys have an idea, plz let me know it!
The first lines of the BeanShell error say:
Sourced file: inline evaluation of: ``commandoTOGGLE_ENTRY(view,pane,ns,label,var,options);''
: Undefined argument: value : at Line: 10 : in file: commandoTOGGLE_ENTRY : (
value )
Called from method: commandoTOGGLE_ENTRY : at Line: 1 : in file: inline
evaluation of: ``commandoTOGGLE_ENTRY(view,pane,ns,label,var,options);'' :
commandoTOGGLE_ENTRY ( view , pane , ns , label , var , options )
at bsh.BSHArguments.getArguments(BSHArguments.java:67)
at bsh.BSHPrimarySuffix.doName(BSHPrimarySuffix.java:167)
.....
...
.
TypoScript problem
Submitted by
blipbloup on
Friday, 16 November, 2007 - 10:15
Hi,
I'm using the TypoScript extension for jEdit and have the following problem :
In "Plugin Options", when I choose "TypoScript" and click on the + button to add a new site, nothing happen !
I tried with jEdit 4.2 and 4.3.
Thanks for help !
sql 2 html
Submitted by
mbisping on
Saturday, 17 November, 2007 - 11:25
Hello,
I'd like to present SQL from a database with syntax highlighting on a HTML-web page.
I thougt about combining the JEdit syntax package
with the Code2Html plugin.
However, even the old version of the plugin doesn't streamline with the jedit syntax code.
What would be the best/easiest way to create a java method like
/**
* param String sql - a number of sql statements
* returns syntax highlighted sql codes in HTML notation
**/
public String toSyntaxHighlightHTML(String sql)
Cheers
Meikel
display line numbers in gutter
Submitted by
xlinuks on
Saturday, 17 November, 2007 - 13:41
Hi!
I'm trying to set (programmatically) jEdit to display the line numbers at startup (These only appear if one presses Ctrl+E+T, jEdit doesn't seem to remember whether showing line numbers was turned on or off last time).
I think I have to tinker with the class Gutter.java from package org.gjt.sp.jedit.textarea
The method Gutter.setExpanded( true ); (I've put it in different locations) doesn't seem to work.
Does anybody have any idea what I'm doing wrong?
Creating edit modes
Submitted by
OBI_Ron on
Monday, 19 November, 2007 - 21:56
Hello Everyone,
I would like to create an edit mode for a specific file type / extension = igs. However, the file type has the following as the first line:
Because of this (I think), the syntax highlighting is taken from xml.xml, and ignores my igs.xml. Is there a way to force the file to use the igs.xml? Or will I have to modify the xml.xml?
If I do need to modify the xml.xml, is it best to use a new ruleset vs modifying an existing one?
Thanks in advance!
Creating edit modes
Submitted by
OBI_Ron on
Monday, 19 November, 2007 - 22:01
Hello Everyone,
I would like to create an edit mode for a specific file type / extension = igs. However, the file type has the following as the first line:
Because of this (I think), the syntax highlighting is taken from xml.xml, and ignores my igs.xml. Is there a way to force the file to use the igs.xml? Or will I have to modify the xml.xml?
If I do need to modify the xml.xml, is it best to use a new ruleset vs modifying an existing one?
Thanks in advance!
How to use SearchAndReplace in a loop?
Submitted by
tvojeho on
Wednesday, 21 November, 2007 - 16:59
Hello,
I have been using jEdit for a few months now, and it is an awesome editor. I have written a few macros, but I do not know Beanshell very well and now I am stumped.
I want to write a macro to correct some words using SearchAndReplace command. I would like to be able to define the words to be searched and replaced, and then to run a loop, where the replacements happen. I am vaguely aware of things such as arrays and maps, and I think in my case I am going to have to use one of those, but I don't know where to begin.
This is an example of how I want it to work (just a concept, not a working code):
//Define search and replace pairs
searchReplacePairs[] = ("thats","that's",
"lets","let's"
"...","...");
//Grab each pair and perform replace
Loop searchReplacePairs
{
SearchAndReplace.setSearchString(textToSearch);
SearchAndReplace.setReplaceString(textToReplace);
SearchAndReplace.setBeanShellReplace(false);
SearchAndReplace.setIgnoreCase(true);
SearchAndReplace.setRegexp(true);
SearchAndReplace.setSearchFileSet(new CurrentBufferSet());
SearchAndReplace.replaceAll(view);
}
As you can see, I do not know how to define the array, then how to parse it to get the textToSearch/textToReplace pair and process it in the loop. Any help would be welcome.
Thanks, tvojeho
Missing entry for Console in Global Options
Submitted by
hotcore on
Thursday, 22 November, 2007 - 19:26
Hello,
i created a command which i am able to run using Console.
Now i wish to associate that command with "Compile current buffer".
The documentation for the Console plugin says:
"Commandos can be associated with edit modes in the Console>Compile & Run pane of the Global Options dialog box.".
However, i cannot find an entry "Console" and "Compile & Run" in "Global Options" panel.
Any ideas?
TIA,
Arie
Key Command to Move From Console to Text Area
Submitted by
cpsmusic on
Thursday, 22 November, 2007 - 23:56
Hi,
Is there a key command that moves the caret from the console back to the text area?
Cheers,
Chris
Printing fails with a Beanshell error
Submitted by
cherax on
Friday, 23 November, 2007 - 05:28
When I attempt to print a text file, I get a long Beanshell error (and no printing) that starts with:
java.lang.NullPointerException: null attribute
at sun.print.IPPPrintService.isAttributeValueSupported(IPPPrintService.java:1100)
at sun.print.ServiceDialog$OrientationPanel.updateInfo(ServiceDialog.java:2092)
etc. etc. etc.
Checking the "use old printing API" doesn't help.
This happens with jEdit 4.2 stable and with 4.3pre11, and with java 5 and 6. I'm using Kubuntu 7.10.
Any ideas?
Nautilus (Nautilus.jedit-scheme v0.9 by Giger)
Submitted by
Giger on
Friday, 23 November, 2007 - 12:27
Similar to native Windows XP Brick color scheme.
lightweight text editor jar?
Submitted by
boardtc on
Friday, 23 November, 2007 - 15:25
I've never used JEdit and am relatively new to the Java community, so please be gentle

I need to provide a very basic text editor in my swing app. I don't think a commercial app would be allowed to distribute JEdit is my understanding but anyway the distribution footprint is likely too large for my needs...
Rather than reinventing the wheel are there any freely available fine tuned lightweight editors available in a jar that I can use for this purpose?
Thanks,
Tom.