For example, \C-c l writes (lambda () ()) and puts my cursor in the first empty parenthesis. I want it so clicking enter jumps to center of second empty parenthesis.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes, there is a way to do what you want, but before jumping through those hoops, perhaps it’d be easier to look at a package that might suit your needs.
Have you thought of trying yasnippet? It basically does what you want, it inserts a template and (upon pressing TAB) will jump you from field to field until the template is filled in.
If you still want to roll your own, you probably should at least look at yasnippet to see how the key bindings are handled.