Next: , Previous: , Up: Elemental Movement   [Index]


6.5.5 Moving by S-Expression

CommandKey BindingPurpose
forward-sexp‘C-M-f’Move forward by sexp
backward-sexp‘C-M-b’Move backward by sexp
‘<ESC> C-d’
up-listMove forward out of one level of parentheses
backward-up-list‘C-M-u’Move up out of a list
down-list‘C-M-d’Move down into list
just like ‘up-list’, but with a negated argument
forward-list‘C-M=n’Move forward to next list ‘(..)’
backward-list‘C-M=p’Move backward to previous list
‘sexp’

is a Lisp term that covers a wide range of commands that operate on balanced expressions.

balanced expressions

can span multiple lines; can consist of:

strings

are balanced expressions that begin and end with ‘"’ or ‘'’.

brackets

are balanced expressions that have defined open and close characters:

  • ‘[ ]’
  • ‘( )’
  • ‘{ }’
  • ‘< >’