[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: forward-word

From: Andreas Politz
Subject: Re: forward-word
Date: Thu, 12 Feb 2009 14:29:26 +0100
User-agent: Mozilla-Thunderbird (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")
   ((< arg 0)
    (forward-word arg))
   ((> arg 0)
    (if (looking-at "\\w")
        (setq arg (1+ arg)))
    (forward-word arg)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]