jEdit Community - Resources for users of the jEdit Text Editor
Line wrap
Submitted by Naturo on Wednesday, 25 April, 2007 - 16:00
Sorry to bother, I have searched the JEdit help and the forum but haven't find any answer to the following issue:

When the wrap option is set, a long line is wrapped as expected if and only if it contains spaces.
If the typed line does not contain space characters (i.e. the line is a single and very long token) then it is not wrapped (i.e. it is necessary to use the horizontal scroller to see the tail of the line). Cheching and editing such a line without visual wrapping is awkward when the line is very long, e.g. the value of a PATH variable in a .chsrc file.

Is there any way to wrap the lines even if they don't contain spaces?

Thanks for your help!

Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
To wrap lines without spaces, use a regex replace
by Graham Hannington on Thu, 06/09/2012 - 03:50
Five years after the original question, I have just had the same issue with a data URI, where the src attribute of an HTML img element contains image data as a base64-encoded string (a single line of nearly 10,000 characters with no spaces).

I need the lines in the HTML file to be limited to 80 characters.

I used "Replace All" with the following search and replace strings (and with the "Regular expressions" option selected):

Search for:
(.{78})
Replace with:
$1\n

The regular expression search string selects a block of 78 characters. The replace string replaces that block with the same block followed by a line break. "Replace All" performs this replacement for each successive block of 78 characters.

hmm...
by AlexCory on Thu, 26/04/2007 - 15:40
not that I know of...
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