From: Marco Parrone <marc0@autistici.org>
Subject: Re: A few simple questions
Date: Sat, 10 May 2003 15:28:20 GMT [thread overview]
Message-ID: <87k7cy4y95.fsf@marc0host.dyndns.org> (raw)
In-Reply-To: ph1xz6lufm.fsf@wangyin.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Wang Yin <wang-y01@mails.tsinghua.edu.cn> writes:
> Thank you very much!
> And I want a fast way to repeat your go-to-char, since the position I
> first go to may not be the position I want, and I think doing a
>
> C-c n <char>
>
> again is too slow. I mean, is there a function like ";" in vi?
(setq last-go-to-char "")
(defun go-to-char (arg char)
"Go to ARG'th occurrence of CHAR.
Case is ignored if `case-fold-search' is non-nil in the current buffer.
Goes backward if ARG is negative; error if CHAR not found."
(interactive "p\ncGo to char: ")
(setq last-go-to-char (char-to-string char))
(search-forward last-go-to-char nil nil arg))
(defun go-to-char-again (arg)
"Repeat the previous go-to-char command."
(interactive "p")
(search-forward last-go-to-char nil nil arg))
(defun go-to-whitespace-not-whitespace (arg)
"Search forward for a whitespace followed by a non-whitespace."
(interactive "p")
(re-search-forward "[ \n\t][^ \n\t]" nil nil arg)
(goto-char (- (point) 1)))
(define-key global-map (kbd "C-c f") 'go-to-char)
(define-key global-map (kbd "C-c ;") 'go-to-char-again)
(define-key global-map (kbd "C-c W") 'go-to-whitespace-not-whitespace)
GoodBye
- --
Marco Parrone - marc0@autistici.org
www.autistici.org/marc0
2143 9E77 D5E6 115A 48AD A170 D0EE F736 (4E88 99C2)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8 <http://mailcrypt.sourceforge.net/>
iD8DBQE+vRpI0O73Nk6ImcIRAuYIAKCvisB2pHzl6IPy4YYyiWKlCgASyQCg9B2s
V2lEeQ2/UXZ4tD/sRFqUW3o=
=1zKf
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2003-05-10 15:28 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-10 5:18 A few simple questions Wang Yin
2003-05-10 6:50 ` Jonas Steverud
2003-05-10 7:00 ` Friedrich Dominicus
2003-05-10 14:03 ` Wang Yin
2003-05-10 14:15 ` Friedrich Dominicus
2003-05-10 14:19 ` Marco Parrone
2003-05-10 14:23 ` Marco Parrone
2003-05-10 14:35 ` Marco Parrone
2003-05-10 14:58 ` Wang Yin
2003-05-10 15:28 ` Marco Parrone [this message]
2003-05-11 0:28 ` Wang Yin
2003-05-12 12:50 ` Oliver Scholz
2003-05-12 12:56 ` Oliver Scholz
2003-05-10 17:39 ` Eli Zaretskii
[not found] ` <mailman.5930.1052588693.21513.help-gnu-emacs@gnu.org>
2003-05-11 0:34 ` Wang Yin
2003-05-10 8:59 ` Eli Zaretskii
2003-05-10 14:33 ` Kai Großjohann
2003-05-10 17:07 ` Kai Großjohann
2003-05-11 0:33 ` Wang Yin
2003-05-12 19:03 ` Kin Cho
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=87k7cy4y95.fsf@marc0host.dyndns.org \
--to=marc0@autistici.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.