help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Help with keybinding to delete between {}


From: Xah Lee
Subject: Re: Help with keybinding to delete between {}
Date: Fri, 14 Dec 2007 03:43:33 -0800 (PST)
User-agent: G2/1.0

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
  address@hidden
\xAD\xF4 http://xahlee.org/



reply via email to

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