Page 1 of 1

Small feature suggestion

Posted: Tue Mar 31, 2015 12:46 pm
by danf84
Often when writing, I need to have an empty/new line at the end of the file. So I scroll with the "ARROW DOWN", the cursor often ends up somewhere in the middle of the last line.

Would it be a nice feature that AkelPad detected that if you press ARROW DOWN and the cursor doesn't move (it has nowhere to go), AkelPad creates a new line at the end and puts the cursor there? So in effect, it would be performing END + ENTER.

I know this is picky, but I think this is a really good idea :) Because then you could be holding arrow down, always ensuring you begin typing at a fresh new line.

Merci Beaucoup / Spacibochki

Posted: Tue Mar 31, 2015 1:25 pm
by Akuro
I am a total newbie, but couldn't you press Ctrl+ArrowDown? Instead of holding down the arrow key until it no longer moves?

Ctrl+ArrowDown should bring you to the very end. To achieve your intended END+Enter in one go, record it as a Macro, click the Record button, then press Ctrl+ArrowDown followed by Enter. Then click the STOP button of the macro recorder. Assign it a keyshortcut or a context menu button or a toolbar button .....

Posted: Wed Apr 01, 2015 6:05 am
by Instructor
danf84

Code: Select all

var hWndEdit=AkelPad.GetEditWnd();
var nSelStart=AkelPad.GetSelStart();
var nSelEnd=AkelPad.GetSelEnd();

if (nSelStart == nSelEnd)
{
  nLine=AkelPad.SendMessage(hWndEdit, 3129 /*AEM_GETLINENUMBER*/, 0 /*AEGL_LINECOUNT*/, 0);
  if (AkelPad.SendMessage(hWndEdit, 3138 /*AEM_GETRICHOFFSET*/, 40 /*AEGI_RICHOFFSETFROMLINE*/, nLine - 1) <= nSelStart)
  {
    AkelPad.SendMessage(hWndEdit, 3044 /*AEM_KEYDOWN*/, 0x23 /*VK_END*/, 0);
    AkelPad.SendMessage(hWndEdit, 258 /*WM_CHAR*/, 0x0D /*VK_RETURN*/, 0);
    WScript.Quit();
  }
}
AkelPad.SendMessage(hWndEdit, 3044 /*AEM_KEYDOWN*/, 0x28 /*VK_DOWN*/, 0);


Add to Hotkeys plugin:

Command on hotkey Down:

Code: Select all

Call("Scripts::Main", 1, "DownNewLine.js")

Re: Small feature suggestion

Posted: Fri May 02, 2025 9:04 am
by Skif_off
Instructor,
If you have free time, can you pay attention to the discussion from here and below?

Re: Small feature suggestion

Posted: Sun May 04, 2025 7:15 pm
by Instructor