Page 1 of 1
Some Suggestions
Posted: Mon Jul 18, 2011 5:49 am
by Rat
Hi Jussi,
I have a compiled a list of minor suggestions in no particular order.
1. A selection from the start to the end of a line should include the line's terminating <CR><LF> pair. Currently I have to move the cursor down to the next line to include these. (CodeWright and Brief used to have this suggested behaviour.)
2. Pressing the <KeyPad 5> should move the page horizontally so that its centered on the line holding the cursor. Currently Zeus moves the cursor to the line at the center of the window. (CodeWright and Brief used to have this suggested behaviour.)
3. When I cut and paste some lines, Zeus will indent them to match the line immediately above the inserted text. Since I can see where this may also be a useful feature I propose an option to disable the smart indenting of pasted text. (Unchecking Smart Indenting doesn't seem to do it.)
4. The '/' forward slash character should by default be added as a string delimiter for XML files. This allows a double-click to select a closing tag name.
Posted: Mon Jul 18, 2011 6:11 am
by jussij
1. A selection from the start to the end of a line should include the line's terminating <CR><LF> pair.
I checked this behaviour against Windows Notepad and it does not work this way. Personally I think Notepad is correct in this case and CodeWright and Brief are not doing this right.
Currently I have to move the cursor down to the next line to include these.
In any case it is easy enough to just write a macro to provide the required behaviour and then just rebind the copy keyboard combination to use the macro.
For example here is a Lua macro that should provide the functionality you desire:
Code: Select all
function key_macro()
local marked = is_marked()
local document = is_document()
if (marked == 1) and (document == 1) then
-- see if the cursor is at the end of the line
if (is_cursor_eol() == 1) then
local MARK_BLOCK = 2
local mode = get_marked_mode()
-- look for the Alt+M block marking mode
if mode == MARK_BLOCK then
cursor_save()
-- move cursor right to include line feed in copy that follows
MoveLineRight()
-- copy the data to clipboard
MarkCopyEx()
cursor_restore()
--message_box(1, "debug test" .. mode)
return
end
end
end
-- leave up to the default action
MarkCopyEx()
end
key_macro() -- run the macro
2. Pressing the <KeyPad 5> should move the page horizontally so that its centered on the line holding the cursor. Currently Zeus moves the cursor to the line at the center of the window. (CodeWright and Brief used to have this suggested behaviour.)
Once again you should be able to rebind the keyboard to do this.
In this case there may well be a keyboard function that already does what you want, so there would be no need to write a macro.
3. When I cut and paste some lines, Zeus will indent them to match the line immediately above the inserted text.
This is the
SmartPaste keyboard function. Once again, all you need do is remap that keyboard key.
Just use the
Options, Editor Options menu, select the
Keyboard section and rebind the keyboard to suit.
Cheers Jussi
Posted: Tue Jul 26, 2011 1:25 pm
by Rat
jussij wrote:2. Pressing the <KeyPad 5> should move the page horizontally so that its centered on the line holding the cursor. Currently Zeus moves the cursor to the line at the center of the window. (CodeWright and Brief used to have this suggested behaviour.)
Once again you should be able to rebind the keyboard to do this.
In this case there may well be a keyboard function that already does what you want, so there would be no need to write a macro.
I couldn't find a suitable keyboard function, and am struggling with the macro

Posted: Tue Jul 26, 2011 11:51 pm
by jussij
i'm struggling with the macro
Describe (in about 5 lines of detail) how you think the macro should work an I will have a go at writting it for you.
Cheers Jussi
Posted: Wed Jul 27, 2011 12:46 am
by Rat
Pressing the <KeyPad 5> should scroll the page vertically so that it is vertically centered on the line containing the caret.
Currently Zeus moves the caret to the line at the center of the window when <KeyPad 5> is pressed.
(CodeWright and Brief used to have the suggested behaviour.)
Posted: Wed Jul 27, 2011 2:31 am
by jussij
This sounds like the ScrollLinePageCenter keyboard function.
Cheers Jussi
Posted: Wed Jul 27, 2011 2:57 am
by Rat
Brilliant!
Works perfectly...
Thanks Jussi.