all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Xah Lee <xah@xahlee.org>
To: help-gnu-emacs@gnu.org
Subject: Re: Help with keybinding to delete between {}
Date: Fri, 14 Dec 2007 03:43:33 -0800 (PST)	[thread overview]
Message-ID: <1654b87e-715a-40eb-96ee-2a0769d1fa58@d4g2000prg.googlegroups.com> (raw)
In-Reply-To: 922740c0-88f0-42c0-a373-d7a28c354c4a@s12g2000prg.googlegroups.com

today i took some closer look at cursor moving commands for editing
lisp code.

`C-M-n'     Move forward over a parenthetical group (`forward-list').
`C-M-p'     Move backward over a parenthetical group (`backward-
list').

`C-M-u'     Move up in parenthesis structure (`backward-up-list').
`C-M-d'     Move down in parenthesis structure (`down-list').

`C-M-f'     Move forward over a balanced expression (`forward-sexp').
`C-M-b'     Move backward over a balanced expression (`backward-
sexp').
`C-M-k'     Kill balanced expression forward (`kill-sexp').
`C-M-<SPC>'     Put mark after following expression (`mark-sexp').

which i was aware for about a year but never really used. I think they
are FANTASTIC. Previously i thought the extend-selection idea i had
was more powerful, but not really. (the extend-selection idea is
simply backward-up-list followed by mark-sexp)

The keybinding choices are pretty bad though. I now set them thus:

(global-set-key (kbd "M-<up>") 'backward-up-list)
(global-set-key (kbd "M-<down>") 'down-list)
(global-set-key (kbd "M-<left>") 'backward-sexp)
(global-set-key (kbd "M-<right>") 'forward-sexp)
(global-set-key (kbd "M-S-<left>") 'backward-list)
(global-set-key (kbd "M-S-<right>") 'forward-list)

  Xah
  xah@xahlee.org
\xAD\xF4 http://xahlee.org/

  parent reply	other threads:[~2007-12-14 11:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-05  1:33 Help with keybinding to delete between {} lampshade
2007-12-05 10:48 ` Bernardo Bacic
2007-12-05 12:55 ` William Xu
2007-12-05 13:30 ` Andreas Röhler
2007-12-05 23:50 ` Ilya Zakharevich
2007-12-06  6:33 ` Xah Lee
2007-12-06 17:14   ` Xah Lee
2007-12-12  9:20     ` lampshade
2007-12-13  3:59     ` Mike Mattie
     [not found]     ` <mailman.4961.1197518641.18990.help-gnu-emacs@gnu.org>
2007-12-13 10:39       ` Xah Lee
2007-12-13 10:44     ` Mike Mattie
2007-12-13 12:46       ` Mike Mattie
2007-12-13 13:01       ` Peter Dyballa
2007-12-14 11:43   ` Xah Lee [this message]
2007-12-07 16:30 ` Stefan Monnier

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=1654b87e-715a-40eb-96ee-2a0769d1fa58@d4g2000prg.googlegroups.com \
    --to=xah@xahlee.org \
    --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.