all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "David Lam" <david.k.lam1@gmail.com>
To: "Peter Dyballa" <Peter_Dyballa@web.de>
Cc: help-gnu-emacs@gnu.org
Subject: Re: anyone got a function for backward-to-end-of-word?? ('ge' in vim)
Date: Mon, 10 Nov 2008 18:37:45 -0800	[thread overview]
Message-ID: <4f6ab4670811101837j2681f148le38cfa000fcd6c8b@mail.gmail.com> (raw)
In-Reply-To: <1264D6F8-0EFD-4B13-A120-A86DFC8375D1@Web.DE>

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

hey cool thanks, i took ians function and modified it a little ... this
seems to work okay i think...

;; 32 = ASCII <space>
(defun prev-word-end-three (&optional arg)
 (interactive "p")
 (let ((arg (or arg 1)))
   (cond
    ((= (preceding-char) 32)  (progn (backward-word (+ arg))
(forward-word))) ;; bw fw
    (t  (progn (backward-word (+ 1 arg))
(forward-word)))                     ;; bw bw fw
    )
 );; let
);;defun

 (global-set-key "\C-x\M-b" 'prev-word-end-three)
 (global-set-key "\M-B" 'prev-word-end-three)


On Mon, Nov 10, 2008 at 3:11 PM, Peter Dyballa <Peter_Dyballa@web.de> wrote:

>
> Am 10.11.2008 um 23:20 schrieb David Lam:
>
>  So for example if you had...
>>
>>      'fooz bar'
>>
>> ...with the cursor anywhere within 'bar', pressing ge in vi immediatley
>> positions the cursor at the 'z' !!!1
>>
>
>
> You could create one! Comprised of backward-word, backward-word,
> forward-word, delete-backward-char ... And bind it to some key.
>
> --
> Greetings
>
>  Pete
>
> We have to expect it, otherwise we would be surprised.
>
>
>
>

[-- Attachment #2: Type: text/html, Size: 2037 bytes --]

  reply	other threads:[~2008-11-11  2:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-10 22:20 anyone got a function for backward-to-end-of-word?? ('ge' in vim) David Lam
2008-11-10 23:11 ` Peter Dyballa
2008-11-11  2:37   ` David Lam [this message]
2008-11-15 10:31 ` Johan Bockgård

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f6ab4670811101837j2681f148le38cfa000fcd6c8b@mail.gmail.com \
    --to=david.k.lam1@gmail.com \
    --cc=Peter_Dyballa@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.