jEdit Community - Resources for users of the jEdit Text Editor
automatic completion of " and '
Submitted by Anonymous on Sunday, 21 November, 2004 - 17:39
is any possibility of turning on automatic completion of " and ' in PHP scipts? i'am used from other editors, when i write " or ', automaticly second quotation mark appears.
thanks
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
Try this!
by Anonymous on Mon, 22/11/2004 - 06:51
I offer to use simple BeanShell script like this:

// Insert_double_quote.bsh

buffer_mode = buffer.getMode().toString();
if (buffer_mode.equals("php")) {
   textArea.setSelectedText("\"\"");
   textArea.goToPrevCharacter(false);
} else {
   textArea.setSelectedText("\"");
}

And set the shortcut via: Global Options->Shortcuts->Macros->Insert double quote. E.g. SHIFT+".

Etc. Eye-wink

--
Regards, Skalex
 
Scalex, thanks for posting th
by Anonymous on Wed, 01/12/2004 - 00:24
Scalex, thanks for posting the great auto-quote script. I've modified it to also auto insert the semi colon when I'm coding in Java:
//auto_semicolon.bsh
buffer_mode = buffer.getMode().toString();
if (buffer_mode.equals("java")) {
textArea.goToEndOfWhiteSpace(false);
textArea.setSelectedText(";");
textArea.goToPrevCharacter(false);
}else{
textArea.setSelectedText(";");
}

simple shortcut reassignment in the Jedit options and now my semicolon is placed at the end of the line wherever I am when I type it.
 
awww yeah!
by stavros on Mon, 22/11/2004 - 23:59
I've been using eclipse for some java dev recently and really liked that functionality .. never even thought to make a beanshell for jedit to do the same ... sweet!

Gonna make one for () and [] now as well .. thanks again, that's a gem right there.

-steve
 
thanx, but...
by Anonymous on Mon, 22/11/2004 - 10:20
thank you very much. but can it be done automaticly without using special shortcut?
all other editors i used can do that. jedit is great, but this feature is really missing me
 
Explanation about jEdit
by Anonymous on Mon, 22/11/2004 - 10:52
Such feature is absent (not embed as default) because jEdit NOT ONLY PHP EDITOR. jEdit is editor of any text and all specific language actions is realizes by macros, plugins or abbreviations.
And it is quite reasonable! Smiling

--
Regards, Skalex.
 
I disagree
by Anonymous on Mon, 22/11/2004 - 13:10
IMHO it isn't really reasonable
I use "auto-completion" in PHP, (X)HTML, CSS, etc.
Each good editor has option to turn on/off this, except jEdit. Its huge flaw of jEdit, that doesn't support this feature.
 
Hmmm
by Anonymous on Mon, 22/11/2004 - 13:35
>>Each good editor has option to turn on/off this, except jEdit.
Are you think what jEdit not good editor?

>>Its huge flaw of jEdit, that doesn't support this feature.
Hardly this may be "huge flaw"...

And why above beanshell script don't suit your?

--
Regards, Skalex.
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