- AuthorPosts
- August 3, 2007 at 7:14 am #4487RobbyMember
Hi, I used to be a CodeWright user for years, but it was to big and hence I switched to EmEditor.
Anyway, CW had a nice feature I’m missing: I could copy a whole line without marking by just using CTRL+INS / CTRL+C.
Would be nice if this feature is added to EmEditor as well.
August 4, 2007 at 12:25 am #4489Yutaka EmuraKeymasterYou can use the following macro (JavaScript):
if( document.selection.IsEmpty ){
editor.ExecuteCommandByID(4192);
}
else {
document.selection.Copy(eeCopyUnicode);
}
and you can assign this macro as CTRL+INS and CTRL+C.
August 25, 2007 at 9:47 am #4598RobbyMemberHow can I assign a macro to a key combination? I didn’t find this information in the docs.
Ok, found it. In the keymap there is a selection called “My Macros” where one can find the macros that were made known to EmEditor via Macros/Customize. [BTW: The process is a bit awkward]
The code isn’t perfect because the result for insert depends on where the cursor is located at the time the copy happens.
I want the insert to always insert the copied line as a complete new line. Does it help to add a NL/CR at the beginning and end of the copied line?
- AuthorPosts
- You must be logged in to reply to this topic.