Hi,
I'm interested in using Zeus editor in emacs mode. I use the ctrl-k and ctrl-y all the time to remove lines and paste elsewhere. It seems as though this feature doesn't quite exist in the emacs emulation. Under gnu emacs ctrl-k will kill the contents of the line, and another ctrl-k will delete the blank line left from the previous ctrl-k. crtl-y behaves a bit weird as well.
Am I doing something wrong? This feature alone will dictate my purchase. I use Linux/emacs a bit and have to be able to have this feature working the same as Linux.
thanks and regards,
gh
emacs line kill and paste
-
- Posts: 1
- Joined: Fri Jun 13, 2008 3:15 pm
Based on your description of the required Emacs functionalitty I think the following emacs_cut.lua macro will do something similar:Under gnu emacs ctrl-k will kill the contents of the line, and another ctrl-k will delete the blank line left from the previous ctrl-k.
Code: Select all
function key_macro()
-- macro only works for documents
local document = is_document()
-- macro only works for read/write documents.
local locked = is_read_only()
if (locked == 1) or (document == 0) then
-- can't run astyle.exe on current document
message("This macro can only be run with a named, writable document file.")
beep()
else
-- disable screen updates
screen_update_disable()
-- get a copy of the current line
local text = get_line_text()
-- see if the current line is empty
if string.len(text) == 0 then
-- delete the current line
LineDelete()
else
-- save the current cursor
cursor_save()
-- add the text to the clipboard
set_clipboard_text(text)
-- replae the line with an empty line
LineDelete()
MoveLineHome()
EnterOpen()
-- restore original cursor
cursor_restore()
end
-- restore screen updates
screen_update_enable()
end
end
key_macro() -- run the macro
It should be possible to right a similar Lua macro to implement the required clipboard paste functionality.crtl-y behaves a bit weird as well.
Cheers Jussi