jEdit Community - Resources for users of the jEdit Text Editor
Reproducing Basic BBEdit Features
Submitted by thinsoldier on Friday, 16 June, 2006 - 01:46
Lets try this again Sad

I've been desperately trying to find a GOOD text editor that will run in windows for many months now. I tried jedit some time last year and after trying many MANY apps over the last two months I'm back to jEdit. It is in may ways a bit better than the rest but there are still a few features that are either not there or I can't seem to find. Not having these features makes trying to work outside of BBEdit a time consuming nightmare for me.
Maybe someone here can help me find them or let me know they don't exist in jedit.


#1 \r and \t

Lets say I have a number of spaces that I want to turn into tabs. 
In bbedit I can represent a tab character with \t. Find my spaces. Replace with \t\t.
It's similar with new lines. Find all \r\r and replace with just one \r until the number of empty lines is to my liking.

Yes I know theres a macro that will convert all spaces to tabs and vice versa. But what if I don't wan that to happen to the entire file, what if I have a specific reason to have a certain number of spaces or a certain number of tabs and it's only important to section of the file and not the whole thing.

so is there a character i can put into jedits find/replace that will match the newline character? or tab character instead of literally pressing tab then copying and pasting!?!?



#2 (?s) multiple line regular expressions
For example:
<p>doodie</p>

<p>
mulligan
</p>

<p> piggums </p>

This expression: <p>.*?</p> will match the doodie and piggums paragraphs...but not mulligan.
In some programming languages and other applications like BBEdit I can specify flags that modify the way regular expressions work. If start my expression with (?s) it will make the expression match all three. This comes in very very handy for me all the bloody time.



#3 - multiple line search text fields
Example: lets say I need to batch find/replace the following over many files
$user='something';
$pass='else';
But other parts of many files have variables named $user and $pass.
I do know for sure that the original programmer always has just these two lines one after the other and other usage of $user and $pass tend to be mixed in with other code or have something betwen them.

if I could past both lines into the search box it would greatly reduce the chances of matching something I don't want it to match.
Actually if I could just use \r to indicate a new line in the single line text field that would be just as good.


Even with many months (off and on) of jEdit use under my belt I still spent over 20 minutes the other night cleaning up 1 afwul html file that was sent to me and long before finishing I gave up. It was easier to wait until I got to work and clean up all 4 of them in under 10 minutes using BBEDIT and the very simple features I described above.

Yes I know i could have used jtidy but I have very strong preferences as to how I want MY html files to look which make them EASIEST for ME to read. Jtidy doesn't do ME.
It always ads the html, head, body etc... tags that I am already using includes to bring in, so its just more stuff I have to double check to remove.

And how to I turn off this html autocomplete?

Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
1. Tick "regular expressions"
by Denyer on Thu, 23/11/2006 - 15:30
1. Tick "regular expressions".

2. <p>(.*?)</p>

[or <p>\s*?(.*?)\s*?</p> if you've got whitespace to deal with.]

The ? are for matching the minimum amount of string that fits the criteria:

http://javaalmanac.com/egs/java.util.regex/Greedy.html

In many cases you won't need them. The ( ) are in case you want to use the found text in the replace -- with one bracketed set, you'd use $1 as the token in the replace action.

3. $user='something';\n$pass='else';

Have a read of the regular expressions section in the manual -- it's really very helpful.

If you've got HTML autocomplete, it's probably being supplied by the XML plugin. Just go into the plugin manager, see if it's there, and if it is, untick it.

Tip: if you're using the BufferTabs plugin to make a tab bar for navigating open files, turning it off temporarily will make working with jEdit with hundreds of files open simultaneously a lot easier. Safer than performing search-and-replace actions directly on files in a directory, and you can check which were altered before committing the changes to disc.
User login
Browse archives
« April 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   82348
Context Free Art (*.cfdg)   0.31   46055
JBuilder scheme   .001   18495
BBEdit scheme   1.0   18116
ColdFusion scheme   1.0   18024
R Edit Mode - extensive version   0.1   17473
Advanced HTML edit mode   1.0   16206
Matlab Edit Mode   1.0   16068
jEdit XP icons   1.0   15229
XP icons for jEdit   1.1   14293