Some wishes

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 7
Joined: Fri Jul 08, 2011 11:04 am

Some wishes

Post by drkh »

Hi,

After using AkelPad on my Traditional Chinese Win7 Home Pre x64 SP1 machine for one month, I think AkelPad can be improved in the following ways:

(1)

If word-wrapping takes place on a double-byte character, such as Chinese, Japanese and Korean, AkelPad should always wrap it "by symbols", never "by words", because there is absolutely no need, in any case, for double-byte characters to be wrapped by "words", which AkelPad defines as the characters grouped between two spaces, as for the Latin languages.

If text containing double-byte characters is to be wrapped by words, mistake may occur as this picture shows:

http://drkh.myweb.hinet.net/wrong_wrap.jpg

The following picture shows the correct way of word-wrapping of the same text:

http://drkh.myweb.hinet.net/correct_wrap.jpg


(2)

A more convenient way to copy text into the clipboard is to mouse-select the text while holding down the CTRL key. Similarly, right-clicking while holding down the CTRL key pastes the copied text.


(3)

Have a menu command to transform all word-wrappings into hard returns (line breaks), and vice versa.


(4)

Have a menu command to trim white spaces at the beginning of a line. Also have a menu command to reduce two or more consecutive white spaces to a single white space, whatever their positions are in a line.


(5)

After Notepad is replaced by AkelPad, the AkelPad's own icon on the Win7 taskbar should have a right-click jump list of recently opened files, like Notepad does.


(6)

I know I can double-click on a tab to close it. But, if I could press an x-shaped button on the tab (like IE or FireFox) to close it without bringing the tab to the front, I would be happier.


(7)

Add an "Apply" button to the "Settings" dialogue.

Offline
Posts: 876
Joined: Tue Jul 24, 2007 8:54 am

Post by Fr0sT »

(3) I remember some script with such a function, try searching Scripts collection topic.
(4) There are plenty of scripts doing it. Also consider invoking shift-tab/space on a selection.

Offline
Posts: 1862
Joined: Mon Aug 06, 2007 1:07 pm
Contact:

Post by Infocatcher »

(3)

Have a menu command to transform all word-wrappings into hard returns (line breaks)
See LineFixWrap method in Format plugin.

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

drkh
1. Check "Settings...->Editor 1->Wrap->By symbols".
2.
Infocatcher wrote:See LineFixWrap method in Format plugin.
Or LinesWrap.js and LinesUnwrap.js.
4. See SearchReplace.js script and use RegExps (
Image
).
6. Don't understand. You want to close tab with two clicks without activating it?

Offline
Posts: 1862
Joined: Mon Aug 06, 2007 1:07 pm
Contact:

Post by Infocatcher »

Instructor wrote:Or LinesWrap.js and LinesUnwrap.js.
Second link wrong here and in the list.
LinesUnwrap still exists?
Instructor wrote:6. Don't understand.
This is just about close buttons, I think:
[Tab label [x]]

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

Infocatcher wrote:LinesUnwrap still exists?
Probably accidentally deleted after LinesWrap.js update. Corrected.
Infocatcher wrote:This is just about close buttons, I think:
[Tab label [x]]
drkh
Then close tab without bringing it to the front, can be done with middle mouse click.

Offline
Posts: 7
Joined: Fri Jul 08, 2011 11:04 am

Post by drkh »

Thank you, guys, for your assistance.

I know "Settings...->Editor 1->Wrap->By symbols". But, if it's selected, word-wrapping on a word of a Latin language will divide that word into two separate parts. I'm sure many people would not want that. So, I suggest that, for double-byte characters like Chinese, always wrap "by symbols", regardless of the Wrap setting, and, for words like English, wrap in accordance with the wrap setting.


----------


Closing a tab by middle-clicking is a great idea. (I did not know that!) I think it is even better than pressing a close button on a tab.


--------------------


For transforming wrappings into line breaks, I tried LineWrap.js, LineUnwrap.js and the LineFixWrap method of the Format plug-in, as you suggested. I observed that LineUnwrap.js can be successfully executed without any problem. But there are problems with LineWrap.js and LineFixWrap of the Format plug-in.

(a) Problem with LineWrap.js


I took a look at the contents of LineWrap.js. But, frankly, I don't really understand what it does. (I know almost nothing about computer programming.)

And, when LineWrap.js is executed, an error message will appear, as the picture below shows:

http://drkh.myweb.hinet.net/LineWrapError.jpg

The LineWrap.js is executed from "Plugins -> Scripts -> double-clicking on LineWrap.js".


(b) Problem with LineFixWrap of the Format plug-in


If a single line is wrapped into more than two lines, and I only want a portion of the wrapped lines to be transformed into real lines, LineFixWrap will transform ALL the wrapped line into real lines.

For example, below is a single line:

123 456 789 xyz

which is wrapped into four lines, like this:

123
456
789
xyz

I only want the wrapping at the end of the second line (456) to be transformed into a line break. If that would be achieved as I wish, the original line, when not wrapped, should become two separate real lines, like this:

123 456
789 xyz

So, I mouse-select the second wrapped line 456 (or just part of it), and then invoke "Format | Insert end-of-line character in wrap spaces". Now, against my wish, not only the wrapping at the end of the second line, but also those wrappings at the ends of all the other lines become line breaks! Thus, the original line, when not wrapped, becomes four separate real lines, like this:

123
456
789
xyz

Offline
Site Admin
Posts: 6311
Joined: Thu Jul 06, 2006 7:20 am

Post by Instructor »

drkh wrote:(a) Problem with LineWrap.js
Update Scripts plugin.
drkh wrote:(b) Problem with LineFixWrap of the Format plug-in
Format plugin v2.1

Offline
Posts: 7
Joined: Fri Jul 08, 2011 11:04 am

Post by drkh »

Instructor wrote:Update Scripts plugin.

Format plugin v2.1

Hi,

After an update of the Format plug-in, LineFixWrap no longer automatically expands a partial selection of a real line.

The Scripst plug-in is also updated. Afterwards, the error message accompanied with the LinesWrap.js is gone. Now I can see the "Maximum line length" dialogue.

Thank you very much.


--------------


I think I have figured out what LinesWrap.js does. It seems to work the following way:

When some text is selected. LinesWrap.js will transforms the selected text into real lines (not wraps them) according to the "Maximum line length". If no selection exists, all the text will be automatically selected and transformed.

LinesWrap.js also automatically indents the first line of each newly generated paragraph by 4 spaces.

I also observe that the selected text may start and end anywhere in a real line, not necessarily starting at the first, or ending at the last, charater of a real line.
Post Reply