![](/img/trans.png)
[英]How do I configure emacs for editing HTML files that contain Javascript?
[英]How do I jump to the matching tag, when editing HTML in Emacs?
假設我正在編輯一個非常長且混亂的HTML文件。 將光標置於打開標簽處,是否可以跳到其關閉標簽?
並且,如果您使用的是sgml-mode
或其衍生版本(例如html-mode
):
sgml-skip-tag-forward
是``sgml-mode.el''中的交互式已編譯Lisp函數。
它必然
Cc Cf
要么
Cc <right>
並綁定到菜單欄:
<menu-bar> <sgml> <sgml-skip-tag-forward>`
從emacslisp:
(sgml-skip-tag-forward arg)
跳至標簽結尾或匹配的結束標簽(如果存在)。 使用前綴參數arg,重復此arg次。 如果在結束標記之后返回t。
假設您使用的是nxml-mode:
C-M-n runs the command nxml-forward-element, which is an interactive
compiled Lisp function in `nxml-mode.el'.
It is bound to C-M-n.
(nxml-forward-element &optional ARG)
Move forward over one element.
With ARG, do it that many times.
Negative ARG means move backward.
...如果您使用的是網絡模式,則 Cc Cn將從開始標記跳轉到相應的結束標記。 該模式還具有一些其他功能(代碼折疊,自動關閉HTML標記等),這些功能可能值得一看。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.