Some suggestions that almost do what you ask:
In lisp code, you can sort-of do what you want, with the sexp movement commands. To get to the beginning of the expression from somewhere in the middle, use backward-up-list
, which is bound to M-C-u
. In your example, that would bring you to the open parenthesis. To move backwards over individual elements in the list, use backward-sexp
, bound to M-C-b
; forward-sexp
moves the other way, and is bound to M-C-f
. From the beginning of an sexp, you can skip to the next with M-C-n
; reverse with M-C-p
.
None of these commands are actually looking at the physical line you are on, so they'll go back or forward over multiple lines.
Other options include Ace Jump mode, which is a very slick way to quickly navigate to the beginning of any word visible on the screen. That might eliminate your need to use line-specific commands. For quick movement within a line, I usually use M-f
and M-b
to jump over words. Holding the M
key down while tapping on b
or f
is quick enough that I end up using that by default most of the time.
Edit:
Forgot one other nice command - back-to-indentation
, bound to M-m
. This will back you up to the first non-whitespace character in a line. You could advice this to behave normally on the first call, and then to back up to the beginning of the line on the second call:
(defadvice back-to-indentation (around back-to-back)
(if (eq last-command this-command)
(beginning-of-line)
ad-do-it))
(ad-activate 'back-to-indentation)