
Wie kann man ein Paar XML-Tags effizient eingeben, beispielsweise <tag></tag>
in Emacs?
Ich hoffe auf eine Art Autovervollständigungsfunktion.
Antwort1
Fügen Sie Ihrer .emacs-Datei Folgendes hinzu.
;; 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))
Setzen Sie das Autocomplete-Flag auf „true“.
(setq nxml-slash-auto-complete-flag t)