|
From: | Greg Rowe |
Subject: | Re: newbie: selecting a line in emacs |
Date: | Tue, 29 Mar 2005 15:02:41 -0500 |
User-agent: | Mozilla Thunderbird 1.0 (Windows/20041206) |
Saket Sathe wrote:
hi, How do I select an entire line in emacs for yanking/pasting etc.
In emacs the "selection" is all the text between the point (where the cursor is) and the mark (where you set the mark last using C-space). Normally the "selection" is not visible because the selection is ALWAYS active. In many other editors selections are not always active.
A lot of emacs users like using transient mark mode. This mode will highlight the active "selection" and slightly changes the behavior of emacs to be a bit more like other editors. You can enable this mode with M-x transient-mark-mode. If you run M-x transient-mark-mode a second time it will turn it off.
In transient mark mode to disable an active selection you can hit C-g. So if you want to kill/cut some text you would hit C-space at the beginning of your selection and then move to the end of your selection. Then C-w to put the text into the kill ring (to cut it).
To disable the active selection in transient mark mode use C-g. Greg -- Home is where the .bashrc is.
[Prev in Thread] | Current Thread | [Next in Thread] |