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 

behave like Notepad space w/mulitple lines of selected text

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



Joined: 25 Mar 2013
Posts: 3

PostPosted: Mon Mar 25, 2013 8:07 am    Post subject: behave like Notepad space w/mulitple lines of selected text Reply with quote

I love AkelPad but I'm not a programmer or sophisticated technical user. I have replaced Notepad with Akelpad using the Debugger registry key and am sailing merrily along except for one thing: I can't get used to Akelpad's behavior when multiple lines of text are selected and the space bar is pressed. Akelpad selects the entire paragraph (complete line) and then puts a single space at the beginning, whereas decades of use have accustomed me to the behavior of Notepad and every other text editor/word processor I've ever used: the selected text is deleted and only after that is a space added. Akelpad does this if text on a single line is selected, but not if the selection spans multiple lines. How can I make Akelpad's spacebar behave the same on text selections for multiple lines as it does within a single line?

In the Hotkeys plugin I attempted to achieve this by specifying "command(4156) command(4168)", but unfortunately if nothing is selected, the spacebar doesn't move at all (because the two commands cancel each other out, I assume). So I need a way for Akelpad to sense that text is selected, and only then should it do "command(4156) command(4168)". Otherwise it should simply execute command(4168) alone. But I searched through the help and the text file for Hotkeys and didn't find a command that would tell Akelpad whether or not text is selected, whether multiple lines or within a line.

I thought there might be a script available in the very large Scripts thread here, but I did a couple of searches, e.g. "change space hotkey", "space multiple selection" and "make space behave like notepad", but didn't find anything relevant. (If there is one, I assume that the manual tells how to apply a script to a key--otherwise I'll be asking about that too... ;)

Thanks for any help--what an awesome little app. The fact that I can ask this question and know that there's an answer speaks for itself.
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5289

PostPosted: Mon Mar 25, 2013 8:51 am    Post subject: Reply with quote

Hanging
http://akelpad.sourceforge.net/forum/viewtopic.php?p=18763
Back to top
View user's profile Send private message Send e-mail
Hanging



Joined: 25 Mar 2013
Posts: 3

PostPosted: Tue Mar 26, 2013 9:30 am    Post subject: Reply with quote

Instructor wrote:
Hanging
http://akelpad.sourceforge.net/forum/viewtopic.php?p=18763
Thanks very much. I can't get past a syntax error, however. In the Hotkeys plugin, the correct command to edit, if I'm not mistaken, is IDM_EDIT_INSERT_SPACE. However, when I try to replace the current command with Command: Insert(" "), AkelPad says "Syntax error" and does not make the change (same result if I delete the space between "Command:" and "Insert").

I tried to replace IDM_EDIT_INSERT_SPACE with "Insert space", per the link, but Akelpad then says "Hotkey already assigned to IDM_EDIT_INSERT_SPACE" and I can't proceed. I tried to delete the whole command, but Akelpad won't do that either--the hotkey appears to be gone, but if I press "All keys", it shows up again. (Same with program restart.)

Sorry, I know I'm probably missing something easy, but sincerely don't know what to do next.
Back to top
View user's profile Send private message
Instructor
Site Admin


Joined: 06 Jul 2006
Posts: 5289

PostPosted: Tue Mar 26, 2013 9:42 am    Post subject: Reply with quote

Hanging
"Command:" it is field name. You should input Insert(" ") in this field Smile
Back to top
View user's profile Send private message Send e-mail
Hanging



Joined: 25 Mar 2013
Posts: 3

PostPosted: Tue Mar 26, 2013 9:13 pm    Post subject: Reply with quote

Instructor wrote:
"Command:" it is field name. You should input Insert(" ") in this field :)
Aha! I was confused because of the native AkelPad commands that use the "Command(xxxx)" syntax. I thought perhaps other commands would also need the string "Command".

Now the space is working the way I want. Excellent! What a wonderful application--thanks very much for creating it.
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