Any such function or elisp script? I want the equivalent function as vi” sequence in vim.
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.
Try the key sequence C-M-u C-M-SPC (i.e., while holding the Control and Meta keys, press u and Space in sequence), which executes the commands
backward-up-sexpandmark-sexp.Edit:
I made a mistake:
backward-up-sexpdoesn’t exist in standard Emacs. I wrote it exactly because of the problem mentioned in lkahtz’s comment, that the existing functionbackward-up-listwon’t work when point is between double quotes.(defun backward-up-sexp (arg) (interactive "p") (let ((ppss (syntax-ppss))) (cond ((elt ppss 3) (goto-char (elt ppss 8)) (backward-up-sexp (1- arg))) ((backward-up-list arg))))) (global-set-key [remap backward-up-list] 'backward-up-sexp)