How to make sp-next-sexp or sp-forward-sexp never go up?
If I do a navigation command in one direction, I prefer that doing the opposite command always get me back to where I started, or at least somewhere on the same sexp I started on. sp-next-sexp and sp-forward-sexp (and their backwards equivalents) break this principle because they sometimes jump up and out of the current level. I'm sure some people like this behavior, but it would be nice if there was an option to control it.
In particular it makes it hard to reuse muscle memory from forward/backward word/symbol for forward/backward sexp.
(sp-forward-sexp &optional ARG)
Move forward across one balanced expression.
With ARG, do it that many times. Negative arg -N means move backward across N balanced expressions. If there is no forward expression, jump out of the current one (effectively doing ‘sp-up-sexp’).
(sp-next-sexp &optional ARG)
Move forward to the beginning of next balanced expression.
With ARG, do it that many times. If there is no next expression at current level, jump one level up (effectively doing ‘sp-backward-up-sexp’). Negative arg -N means move to the beginning of N-th previous balanced expression.
Hi. There are sp-forward-parallel-sexp and backward variant which loop on the same level, so at the end of the list it jumps after the first item. It wouldn't be hard to either copy them and change them to stop at the end or add another function or some configuration to behave that way.