* highlight select whole word when in the middle shortcut
@ 2010-04-05 7:09 mouezapeter
2010-04-05 13:40 ` Colin S. Miller
0 siblings, 1 reply; 5+ messages in thread
From: mouezapeter @ 2010-04-05 7:09 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
If I am in the middle of the word "deduction", is there a shortcut to
highlight,select the hole word ?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: highlight select whole word when in the middle shortcut
2010-04-05 7:09 highlight select whole word when in the middle shortcut mouezapeter
@ 2010-04-05 13:40 ` Colin S. Miller
2010-05-07 4:20 ` Kevin Rodgers
[not found] ` <mailman.37.1273206036.9285.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 5+ messages in thread
From: Colin S. Miller @ 2010-04-05 13:40 UTC (permalink / raw)
To: help-gnu-emacs
mouezapeter wrote:
> Hi,
> If I am in the middle of the word "deduction", is there a shortcut to
> highlight,select the hole word ?
Hi,
If you are using a GUI, then double-click on the word to select it.
Otherwise, add this to your .emacs, restart, and then press C-x w
HTH,
Colin S. Miller
(defun select-word-at-point ()
(interactive)
(let ((p (bounds-of-thing-at-point 'word)))
(set-mark (car p))
(exchange-point-and-mark)
(set-mark (cdr p))
))
(global-set-key '[(control x) (w)] 'select-word-at-point)
--
Replace the obvious in my email address with the first three letters of the hostname to reply.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: highlight select whole word when in the middle shortcut
2010-04-05 13:40 ` Colin S. Miller
@ 2010-05-07 4:20 ` Kevin Rodgers
[not found] ` <mailman.37.1273206036.9285.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2010-05-07 4:20 UTC (permalink / raw)
To: help-gnu-emacs
Colin S. Miller wrote:
> mouezapeter wrote:
>> Hi,
>> If I am in the middle of the word "deduction", is there a shortcut to
>> highlight,select the hole word ?
>
> Hi,
> If you are using a GUI, then double-click on the word to select it.
> Otherwise, add this to your .emacs, restart, and then press C-x w
>
> HTH,
> Colin S. Miller
>
> (defun select-word-at-point ()
> (interactive)
> (let ((p (bounds-of-thing-at-point 'word)))
> (set-mark (car p))
> (exchange-point-and-mark)
> (set-mark (cdr p))
> ))
>
> (global-set-key '[(control x) (w)] 'select-word-at-point)
M-x mark-word
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: highlight select whole word when in the middle shortcut
[not found] ` <mailman.37.1273206036.9285.help-gnu-emacs@gnu.org>
@ 2010-05-12 7:02 ` Robert Knighten
2010-05-12 11:32 ` Scott Frazer
0 siblings, 1 reply; 5+ messages in thread
From: Robert Knighten @ 2010-05-12 7:02 UTC (permalink / raw)
To: help-gnu-emacs
Kevin Rodgers <kevin.d.rodgers@gmail.com> writes:
> Colin S. Miller wrote:
>> mouezapeter wrote:
>>> Hi,
>>> If I am in the middle of the word "deduction", is there a shortcut to
>>> highlight,select the hole word ?
>>
>> Hi,
>> If you are using a GUI, then double-click on the word to select it.
>> Otherwise, add this to your .emacs, restart, and then press C-x w
>>
>> HTH,
>> Colin S. Miller
>>
>> (defun select-word-at-point ()
>> (interactive)
>> (let ((p (bounds-of-thing-at-point 'word)))
>> (set-mark (car p))
>> (exchange-point-and-mark)
>> (set-mark (cdr p))
>> ))
>>
>> (global-set-key '[(control x) (w)] 'select-word-at-point)
>
> M-x mark-word
That just marks to the end of the word.
--
Robert L. Knighten
RLK@knighten.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: highlight select whole word when in the middle shortcut
2010-05-12 7:02 ` Robert Knighten
@ 2010-05-12 11:32 ` Scott Frazer
0 siblings, 0 replies; 5+ messages in thread
From: Scott Frazer @ 2010-05-12 11:32 UTC (permalink / raw)
To: help-gnu-emacs
On May 12, 3:02 am, Robert Knighten <R...@knighten.org> wrote:
> Kevin Rodgers <kevin.d.rodg...@gmail.com> writes:
> > Colin S. Miller wrote:
> >> mouezapeter wrote:
> >>> Hi,
> >>> If I am in the middle of the word "deduction", is there a shortcut to
> >>> highlight,select the hole word ?
>
> >> Hi,
> >> If you are using a GUI, then double-click on the word to select it.
> >> Otherwise, add this to your .emacs, restart, and then press C-x w
>
> >> HTH,
> >> Colin S. Miller
>
> >> (defun select-word-at-point ()
> >> (interactive)
> >> (let ((p (bounds-of-thing-at-point 'word)))
> >> (set-mark (car p))
> >> (exchange-point-and-mark)
> >> (set-mark (cdr p))
> >> ))
>
> >> (global-set-key '[(control x) (w)] 'select-word-at-point)
>
> > M-x mark-word
>
> That just marks to the end of the word.
>
> --
> Robert L. Knighten
> R...@knighten.org
I use this:
(defun my-select-word-at-point ()
"Select the word at point."
(interactive)
(skip-syntax-forward "w_")
(push-mark (point))
(skip-syntax-backward "w_")
(exchange-point-and-mark))
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-05-12 11:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-05 7:09 highlight select whole word when in the middle shortcut mouezapeter
2010-04-05 13:40 ` Colin S. Miller
2010-05-07 4:20 ` Kevin Rodgers
[not found] ` <mailman.37.1273206036.9285.help-gnu-emacs@gnu.org>
2010-05-12 7:02 ` Robert Knighten
2010-05-12 11:32 ` Scott Frazer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).