1

I'm trying to get a hang of lispy for editing and navigating Lisp code.

My assumption is that most of the keymap choices are made to offer convenience in practice. Some practical tasks involve more than one keystroke to accomplish and there are examples in the docs.

I am wondering if there is a recommended way to get out of the following situation. Consider the following code:

(format "%s|")

| indicates the current location of the point.

What I want to do is to add another argument after the string I'm in.

From inside parentheses, braces, or brackets - I can exit the list by pressing either ] or ). I can move point before the surrounding list by pressing [.

It appears that from inside a string I can't get out of using modifier keys - either by moving over words and characetrs, or by moving up the list with C-M-u (lisp.el considers strings as lists in this regard).

I would assume this to be a common situation and I'm wondering if there is a recommended way to get out of it.

2
  1. The simplest answer is to use C-f, since you're at the end of the string anyway.

  2. If you're not at the end of the string, M-o might be useful, since it also exits the string (beside of making it one-line).

  3. In my own config, I bind <return> to lispy-alt-line. This function will exit the string or list and insert a newline.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.