cc モードで一致するブレースに移動する組み込みまたはサードパーティの elisp コマンドはありますか?
私は現在(paren-set-mode 'paren t)
、対応するブレースまたは括弧を XEmacs に強調表示させるために使用していますが、ネストされたif
ブロックを含むコードの一部でブレースが画面から外れている場合、対応するブレースにジャンプするコマンドがあると非常に便利です。
M-C-f
andに似ていますが、ではなくM-C-b
for .{}
()
C-M-f
と同様に機能C-M-b
するはずです。{
}
XEmacs 21.5 に big-menubar.el をインストールしました。メニュー項目「モーション」が追加され、そのメニューには次の 2 つのコマンドとキーバインドが表示されます。
対角括弧の終わり CMn
バランスのとれた括弧 CMp の開始
私はそれらを Control-Meta-next および previous と考えています。
また、他にも興味のある move-to コマンドがいくつかあります。これは、実行中のコマンドを示す big-menubar.el からのカット アンド ペーストです (コマンドが何であるかを理解したら、好きなキーに割り当てることができます.. .):
(add-submenu
nil
'("Motion"
["Goto Mark" exchange-point-and-mark (mark t)]
["Goto Line..." goto-line t]
"---"
["End of Balanced Parentheses ( )" forward-list t]
["Beginning of Balanced Parentheses ( )" backward-list t]
["Next Opening Parenthesis (" down-list t]
["Previous Opening Parenthesis (" backward-up-list t]
["Next Closing Parenthesis )" up-list t]
"---"
["End of Balanced Expression" forward-sexp t]
["Beginning of Balanced Expression" backward-sexp t]
"---"
["End of Function" end-of-defun t]
["Beginning of Function" beginning-of-defun t]
"---"
["Next Page" forward-page t]
["Previous Page" backward-page t]
"---"
["End of Buffer" end-of-buffer t]
["Beginning of Buffer" beginning-of-buffer t]
"---"
["Save Current Position..." point-to-register t]
["Goto Saved Position..." register-to-point t]
"---"
["Set Marker..." set-user-marker t]
["Goto Marker..." goto-user-marker t]
["List Markers" list-markers t]
"---"
["Set Goal Column" set-goal-column t]
["Cancel Goal Column" (set-goal-column t) goal-column]))