* forward-word
@ 2009-02-12 0:32 jrwats
2009-02-12 10:58 ` forward-word Ronnie Collinson
2009-02-12 13:29 ` forward-word Andreas Politz
0 siblings, 2 replies; 4+ messages in thread
From: jrwats @ 2009-02-12 0:32 UTC (permalink / raw
To: help-gnu-emacs
Is there any function providing the functionality of VIM's 'w'
command? It moves forward a word, but places you at the beginning of
the word rather than the end. A good illustration of this (that only
works when words are separated by whitespace) is forward-whitespace.
VIM's equivalent of forward-word is 'e', but it seems emacs has no 'w'?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: forward-word
2009-02-12 0:32 forward-word jrwats
@ 2009-02-12 10:58 ` Ronnie Collinson
2009-02-12 13:29 ` forward-word Andreas Politz
1 sibling, 0 replies; 4+ messages in thread
From: Ronnie Collinson @ 2009-02-12 10:58 UTC (permalink / raw
To: jrwats; +Cc: help-gnu-emacs
I would imagine with advice it wouldn't be to difficult to modify
forward-word to do that
On 2/12/09, jrwats <jrwats@gmail.com> wrote:
> Is there any function providing the functionality of VIM's 'w'
> command? It moves forward a word, but places you at the beginning of
> the word rather than the end. A good illustration of this (that only
> works when words are separated by whitespace) is forward-whitespace.
>
> VIM's equivalent of forward-word is 'e', but it seems emacs has no 'w'?
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: forward-word
2009-02-12 0:32 forward-word jrwats
2009-02-12 10:58 ` forward-word Ronnie Collinson
@ 2009-02-12 13:29 ` Andreas Politz
2009-02-13 7:41 ` forward-word jrwats
1 sibling, 1 reply; 4+ messages in thread
From: Andreas Politz @ 2009-02-12 13:29 UTC (permalink / raw
To: help-gnu-emacs
jrwats wrote:
> Is there any function providing the functionality of VIM's 'w'
> command? It moves forward a word, but places you at the beginning of
> the word rather than the end. A good illustration of this (that only
> works when words are separated by whitespace) is forward-whitespace.
>
> VIM's equivalent of forward-word is 'e', but it seems emacs has no 'w'?
Emacs has only C-M-w ;)
(defun vi-forward-word (arg)
(interactive "p")
(cond
((< arg 0)
(forward-word arg))
((> arg 0)
(if (looking-at "\\w")
(setq arg (1+ arg)))
(forward-word arg)
(backward-word))))
-ap
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: forward-word
2009-02-12 13:29 ` forward-word Andreas Politz
@ 2009-02-13 7:41 ` jrwats
0 siblings, 0 replies; 4+ messages in thread
From: jrwats @ 2009-02-13 7:41 UTC (permalink / raw
To: help-gnu-emacs
> (defun vi-forward-word (arg)
> (interactive "p")
> (cond
> ((< arg 0)
> (forward-word arg))
> ((> arg 0)
> (if (looking-at "\\w")
> (setq arg (1+ arg)))
> (forward-word arg)
> (backward-word))))
>
> -ap
and the kicker:
(global-set-key (kbd "M-F") 'forward-word-beg)
(kbd "M-f") still mapped to forward-word
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-13 7:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-12 0:32 forward-word jrwats
2009-02-12 10:58 ` forward-word Ronnie Collinson
2009-02-12 13:29 ` forward-word Andreas Politz
2009-02-13 7:41 ` forward-word jrwats
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.