AkelPad Forum Index AkelPad
Support forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

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

 
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English)
View previous topic :: View next topic  
Author Message
SaFeTyPe



Joined: 27 Jan 2016
Posts: 66
Location: Europe

PostPosted: Wed Feb 03, 2016 7:54 pm    Post subject: Ctrl+Arrow Keys: Inconsistencies betw. editors; feature sugg Reply with quote

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.
Back to top
View user's profile Send private message
SaFeTyPe



Joined: 27 Jan 2016
Posts: 66
Location: Europe

PostPosted: Wed Feb 03, 2016 8:40 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
KDJ



Joined: 06 Mar 2010
Posts: 1919
Location: Poland

PostPosted: Wed Feb 03, 2016 8:44 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
SaFeTyPe



Joined: 27 Jan 2016
Posts: 66
Location: Europe

PostPosted: Wed Feb 03, 2016 9:34 pm    Post subject: Reply with quote

I just found WordBreak a minute ago. I am now going to read the documentation instead of annoying the forum Smile
Thanks.
Back to top
View user's profile Send private message
SaFeTyPe



Joined: 27 Jan 2016
Posts: 66
Location: Europe

PostPosted: Fri Feb 05, 2016 3:52 am    Post subject: Reply with quote

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? Smile 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.
Back to top
View user's profile Send private message
SaFeTyPe



Joined: 27 Jan 2016
Posts: 66
Location: Europe

PostPosted: Sun Feb 14, 2016 5:22 pm    Post subject: Reply with quote

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...!
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 6225

PostPosted: Sun Feb 21, 2016 2:33 pm    Post subject: Reply with quote

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.


Quote:
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"


Quote:
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".

Quote:
I cannot do this without hitting the cursor at leaste 9 times...!
Write example text and how caret must be moved.
Back to top
View user's profile Send private message Send e-mail
SaFeTyPe



Joined: 27 Jan 2016
Posts: 66
Location: Europe

PostPosted: Sun Feb 21, 2016 7:53 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
SaFeTyPe



Joined: 27 Jan 2016
Posts: 66
Location: Europe

PostPosted: Wed Feb 24, 2016 2:54 am    Post subject: Reply with quote

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).
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 6225

PostPosted: Tue Mar 08, 2016 1:48 pm    Post subject: Reply with quote

SaFeTyPe wrote:
*This[S]*is[S]*an[S]*exampel*[T][T][T][T][T][T][T][T]*text1

1. Replace in AkelEdit.c:
Code:
BOOL AE_IsSpace(wchar_t c, DWORD dwSpacesFlags)
{
  if ((c == L' ' && (dwSpacesFlags & AEWBS_SPACE)) ||
      (c == L'\t' && (dwSpacesFlags & AEWBS_TAB)))
with
Code:
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.


Quote:
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:
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:
Call("Scripts::Main", 1, "EvalCmd.js", `"for (i=0; i < 4; ++i) AkelPad.SendMessage(AkelPad.GetEditWnd(), 3044 /*AEM_KEYDOWN*/, 0x26 /*VK_UP*/, 0);"`)
Back to top
View user's profile Send private message Send e-mail
SaFeTyPe



Joined: 27 Jan 2016
Posts: 66
Location: Europe

PostPosted: Mon Mar 14, 2016 5:45 pm    Post subject: Reply with quote

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? Smile
(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.
Back to top
View user's profile Send private message
Skif_off



Joined: 20 Oct 2013
Posts: 1103

PostPosted: Tue Mar 15, 2016 1:54 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AkelPad Forum Index -> Discussion (English) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


SourceForge.net Logo Powered by phpBB © 2001, 2005 phpBB Group