当光标在一个括号上时,如何跳转到成对的括号。很高兴在emacs -nw中工作。
就像Vim中的%一样。
;;在得到@Lindy,@Francesco的提示后,我发现了更多:
C-M-f Move forward over a balanced expression
C-M-b Move backward over a balanced expression
C-M-k Kill balanced expression forward
C-M-SPC put the mark at the end of the sexp.
C-M-n Move forward over a parenthetical group
C-M-p Move backward over a parenthetical group
;; C-M key binding can also be done by --> ESC Control-key
;;And put this to .emacs, it will highlight opening/closing parens:
(show-paren-mode 1)
发布于 2012-03-24 04:00:17
使用C-M-right
和C-M-left
(分别为backward-sexp
和forward-sexp
)转到当前表达式的开头或结尾。这适用于括号对,但也适用于普通单词。
发布于 2015-07-31 09:45:57
正如在emacs wiki (http://www.emacswiki.org/emacs/NavigatingParentheses)中提到的:
在括号内向前移动
https://superuser.com/questions/677516/how-do-i-jump-to-the-opening-or-closing-paren-brace-in-emacs
发布于 2012-03-24 03:56:53
对于圆括号、大括号和括号,只需在上面双击就行了。
https://stackoverflow.com/questions/9845661
复制相似问题