<tag></tag>
如何像在 Emacs 中那樣有效率地輸入一對 XML 標籤?
我希望有某種自動完成行為。
答案1
將以下內容新增至您的 .emacs 檔案。
;; associate xml, xsd, etc with nxml-mode
(add-to-list 'auto-mode-alist (cons (concat "\\." (regexp-opt '("xml" "xsd" "rng" "xslt" "xsl") t) "\\'") 'nxml-mode))
將自動完成標誌設為 true
(setq nxml-slash-auto-complete-flag t)