|
From: | Andreas Politz |
Subject: | Re: forward-word |
Date: | Thu, 12 Feb 2009 14:29:26 +0100 |
User-agent: | Mozilla-Thunderbird 2.0.0.17 (X11/20081018) |
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
[Prev in Thread] | Current Thread | [Next in Thread] |