EmEditor (text editor) Forum Index
   EmEditor Core Enhancement Suggestions
     Copy complete line without having to mark line
Register To Post

Threaded | Newest First Previous Topic | Next Topic | Bottom
Poster Thread
Robby
Posted on: 8/2/2007 11:14 pm
Just popping in
Joined: 8/2/2007
From:
Posts: 4
Copy complete line without having to mark line
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.
Yutaka
Posted on: 8/3/2007 4:25 pm
Webmaster
Joined: 9/28/2006
From: Redmond
Posts: 2401
Re: Copy complete line without having to mark line
You 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.


----------------
Yutaka Emura
Developer of EmEditor
http://www.emeditor.com/

Robby
Posted on: 8/25/2007 1:47 am
Just popping in
Joined: 8/2/2007
From:
Posts: 4
Re: Copy complete line without having to mark line
How 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?
Threaded | Newest First Previous Topic | Next Topic | Top


Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文