
<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)