Hi
How do I change the behaviour of backspace to only delete the selected block if there is a selection?
At the moment, it deletes the block and the previous char which is different to all the other editors I use (and thus annoying!).
Also, ctrl+backspace when the cursor is in the middle of a word deletes the whole word whereas I only want it to delete to the start of the word.
Thanks
Robert
p.s. Otherwise I find it nice and am considering switching!
Backspace with selected blocks
Hi Robert,
and then bind the macro file to the backspace key.
Jussi
Save the macro below to the c:\program files\zeus\zScript\backspace.lua file:How do I change the behaviour of backspace to only delete the selected block if there is a selection?
Code: Select all
function key_macro()
screen_update_disable()
-- this macro will only work for document windows
local document = is_document()
if (document == 0) then
message ("This macro only works for document files!")
beep ()
return 1
end
-- this macro will only work for read/write documents
local locked = is_read_only()
if (locked == 1) then
message ("The current document is marked as read only!")
beep ()
return 1
end
-- look for a marked area
local marked = is_marked()
if marked == 1 then
-- the marked area is gone
MarkDelete()
else
-- do a normal backspace
Backspace()
end
screen_update()
end
key_macro() -- run the macro
Jussi