Ctrl+Arrow Keys: Inconsistencies betw. editors; feature sugg

English main discussion
Post Reply
  • Author
  • Message
Offline
Posts: 84
Joined: Wed Jan 27, 2016 6:53 pm
Location: Europe

Ctrl+Arrow Keys: Inconsistencies betw. editors; feature sugg

Post by SaFeTyPe »

Hello,

when I move through text that consists of characters and tabs, then notepad (MS) and akelpad exhibit different behavior:

enter
1test[tab]test[tab]test[tab]test2
3test[tab]test[tab]test[tab]test4

into notepad, and akelpad.

place the cursor in front of "1".

then move through the text by hitting ctrl-right until you are at the end of the text, AND afterwards do the same by moving to the left until you are back at the start again, using ctrl plus cursor/arrow keys (left/right).

You will notice that akelpad stops at different positions as notepad does.

I consider BOTH behaviors not good. I would like to see the cursor stop at ALL useful positions, which I have denoted with * below:


*1test*[tab]*test*[tab]*test*[tab]*test2*
*3test*[tab]*test*[tab]*test*[tab]*test4*

Since obviously there is no standard behavior for this (see the discrepancy between notepad.exe and akelpad, I believe there is no compelling reason to to at least offer such a behavior that might well prove advantageous in the majority of situations.

Hope this was of any interest!

PS. could the subject length be extended from 60 to 90 or 100 chars please? That would be a better compromise IMHO.

Offline
Posts: 84
Joined: Wed Jan 27, 2016 6:53 pm
Location: Europe

Post by SaFeTyPe »

I forgot: It would also be very helpful if CTRL-Arrow would stop before and after interpunction: I will denote with * all positions where IMHO it would be advantageous for the cursor to stop when doing text editing:

(Take not of the spaces!)

EXAMPLE TEXT:

This is a sentence, and this was a comma!! These were two exclamation marks, and here are some more special characters: §34, 5%, Pa%55woRd, $4, 44E, (brackets). End

*This *is *a *sentence*, *and *this *was *a *comma*!! *These *were *two *exclamation *marks*, *and *here *are *some *more *special *characters*: *§*34*, *5*%, *Pa*%*55woRd*, *$*4*, *44E*, *(*brackets*). *End*

(Umlauts (ä) etc. should be treated like normal letters, of course.)

You can see an almost-perfect implementation in Smedit Editor (Sinner Computing) (Umlauts were forgotten and don't work though).

Obviously the same cursor-move behavior should also be displayed when ctrl-shift is pressed to select parts of text.

I hope these ideas were of interest! I did skim though the plugins and scripts for solutions but please bear with me since I've discovered Akelpad just a few days ago. Sorry I cannot code.

KDJ
Offline
Posts: 1949
Joined: Sat Mar 06, 2010 7:40 pm
Location: Poland

Post by KDJ »

SaFeTyPe
This is standard behavior in AkelPad. You can change it using manual parameter "WordBreak".
About "WordBreak" read documentation ...\AkelPad\AkelFiles\Docs\AkelHelp-Eng.htm, chapter "Manual settings" (or Main menu -> Help -> Manual).
Script to easy change the manual settings: AkelPadManualSettings.js.

Offline
Posts: 84
Joined: Wed Jan 27, 2016 6:53 pm
Location: Europe

Post by SaFeTyPe »

I just found WordBreak a minute ago. I am now going to read the documentation instead of annoying the forum :-)
Thanks.

Offline
Posts: 84
Joined: Wed Jan 27, 2016 6:53 pm
Location: Europe

Post by SaFeTyPe »

I have read and tested a lot now, so these questions might be useful:

1. Would it be possible to add to AkelPadManualSettings.js this:

Movement is stopped when new tab is found. (tab!!)

EDIT: I think this would require an update of the akelpad software. Instructor, would you please consider adding this feature? :-) Thank you a lot!

2. In settings, word/wrap delimiters, I found that the pre-entered characters and codes are not identical to the default. This means that a freshly installed AkelPad behaves differently when the checkboxes are checked, even though the pre-entered chararacteres/codes ( \t\n'`"\\|[](){}<>,.;:+-=~!@#$%^&*/?) should be the default.
Could someone please post the internal characters that are active when the checkboxes are NOT checked?

It is also not clear to me why these characters have been chosen because they lack important Latin/Russian/European/US characters of similar kind, like €µ°).

3. (not important) Word wrap: I found no way to prevent wrapping with tabs: in certain circumstances, a tab is treated as part of a word no matter if \t is entered in the settings, word delimiters, or not.

Offline
Posts: 84
Joined: Wed Jan 27, 2016 6:53 pm
Location: Europe

Post by SaFeTyPe »

Hello,
here is an example where the lack of WordBreaks between tabs is very impractical:

ThisIsTheFirstWord[tab][tab][tab][tab][tab][tab][tab][tab][tab]ThisIsTheSecondWord ThirdWord ForthWord


Now put your cursor behind "ForthWord" and try to navigate with the keyboard BEHIND "ThisIsTheFirstWord" (and write e.g. "Test" behind "ThisIsTheFirstWord").

I cannot do this without hitting the cursor at leaste 9 times...!

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

Post by Instructor »

SaFeTyPe wrote:1. ...Movement is stopped when new tab is found. (tab!!)
It has already:
AkelHelp-Eng.htm wrote:16 - Movement is stopped, when spacing start is found. Cannot be combined with 64.
32 - Movement is stopped, when spacing end is found. Cannot be combined with 128.
64 - Movement is continued, when spacing start is found. Cannot be combined with 16.
128 - Movement is continued, when spacing end is found. Cannot be combined with 32.
2. ...Could someone please post the internal characters that are active when the checkboxes are NOT checked?
AkelEdit.h wrote:#define AES_WORDDELIMITERSW L" \t\n'`"\\|[](){}<>,.;:+-=~!@#$%^&*/?\0\0"
#define AES_WRAPDELIMITERSW L" \t\0\0"
3. (not important) Word wrap: I found no way to prevent wrapping with tabs: in certain circumstances, a tab is treated as part of a word no matter if \t is entered in the settings, word delimiters, or not.
You should change "Wrap delimiters" not "Word delimiters".
I cannot do this without hitting the cursor at leaste 9 times...!
Write example text and how caret must be moved.

Offline
Posts: 84
Joined: Wed Jan 27, 2016 6:53 pm
Location: Europe

Post by SaFeTyPe »

Thank you for the answer to #2!!

Regarding #1: The problem is of course that options do not differentiate between spaces and tabs. I know that I can activate 16 AND 32. But then it will also stop twice when there are *spaces*. Of couse I do not want that.
The idea is that it should stop everywhere where I put an "*" in the below example sentence. [S] denotes SPACE, [T] denotes TAB. The user is doing CTRL+RightArrow and starts with the cursor at "This". His goal is to correct "example" to "example".

*This[S]*is[S]*an[S]*exampel*[T][T][T][T][T][T][T][T]*text1

The problem is that we need separate settings for (1.) space and (2.) for tab. tab should stop before AND after, and space should only stop before OR after. Currently, there is no way to get the cursor behind "...pel".

The idea is that there are MANY reasons to use many tabs (TTTTT), so it has an advantage to stop before and after many tabs -- and it also mostly has no disadvantage to stop before and after a single tab. (of course one could even differentiate further and make it stop twice ONLY when there are more than 1 tabs / spaces, but that would be overkill I think...?)

In analog, there are FEW reasons to use many spaces (SSSS), so it rarely has an advantage to stop before and after many spaces -- but it DOES have a disadvantage to stop before and after every single space.

So that's why I suggest separate handling of space and tab.

Offline
Posts: 84
Joined: Wed Jan 27, 2016 6:53 pm
Location: Europe

Post by SaFeTyPe »

Hello,

I tried Call("Scroll::Settings", 4, VALUE, MOVECARET), but could someone please tell me how I can simply move the caret up 4 times by hotkey?

(With the above-mentioned Call command, I can only move the screen (MOVECARET=0), or move the cursor ONLY when it would otherwise go out of focus (MOVECARET=1). I want to simply move the caret everytime a hotkey is pressed by 4 lines up/down. I tried with Macros, but that does not work well (because it waits (delay) until all modifier keys of the hotkey are released).

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

Post by Instructor »

SaFeTyPe wrote:*This[S]*is[S]*an[S]*exampel*[T][T][T][T][T][T][T][T]*text1
1. Replace in AkelEdit.c:

Code: Select all

BOOL AE_IsSpace(wchar_t c, DWORD dwSpacesFlags)
{
  if ((c == L' ' && (dwSpacesFlags & AEWBS_SPACE)) ||
      (c == L'\t' && (dwSpacesFlags & AEWBS_TAB)))
with

Code: Select all

BOOL AE_IsSpace(wchar_t c, DWORD dwSpacesFlags)
{
  //if ((c == L' ' && (dwSpacesFlags & AEWBS_SPACE)) ||
  //    (c == L'\t' && (dwSpacesFlags & AEWBS_TAB)))
  if (c == L' ' && (dwSpacesFlags & AEWBS_SPACE))
and recompile AkelPad.

2. Set WordBreak to 111.

I tried Call("Scroll::Settings", 4, VALUE, MOVECARET), but could someone please tell me how I can simply move the caret up 4 times by hotkey?
Down:

Code: Select all

Call("Scripts::Main", 1, "EvalCmd.js", `"for (i=0; i < 4; ++i) AkelPad.SendMessage(AkelPad.GetEditWnd(), 3044 /*AEM_KEYDOWN*/, 0x28 /*VK_DOWN*/, 0);"`)
Up:

Code: Select all

Call("Scripts::Main", 1, "EvalCmd.js", `"for (i=0; i < 4; ++i) AkelPad.SendMessage(AkelPad.GetEditWnd(), 3044 /*AEM_KEYDOWN*/, 0x26 /*VK_UP*/, 0);"`)

Offline
Posts: 84
Joined: Wed Jan 27, 2016 6:53 pm
Location: Europe

Post by SaFeTyPe »

Thank you a lot for #2!

------

Regarding #1: I am new to recompiling software, but I think it will not be difficult. However before I educate myself, I have two questions:

(a) Doesn't this mean that I would have to change AkelPad every time a new version comes out? (Do you consider making this feature (2.) available in a future release of AkelPad? :-)
(b) I am sorry I am a total n00b- > I downloaded AkelPad-4.9.7-src . Can you tell me with which program I should recompile? I don't want to make any mistakes. (I am currently using the 32bit version on Win 8.1 64.) Thanks for you help.

Offline
Posts: 1161
Joined: Sun Oct 20, 2013 11:44 am

Post by Skif_off »

SaFeTyPe
(b) You need Microsoft Visual C++ Toolkit 2003 and Windows Server 2003 SP1 Platform SDK: check paths MSSDK and VCDIR in Build-Eng.cmd and run Build-Eng.cmd. I can do it if you don't succeed.
Post Reply