Emacs: Xah HTML Mode
xah-html-mode is a emacs major mode for HTML.
[see HTML Tutorial]
- xah-replace-pairs.el Emacs: xah-replace-pairs.el
- xah-get-thing.el Emacs: xah-get-thing.el
- xah-css-mode.el Emacs: Xah CSS Mode
- htmlize.el v1.55 or later, by Hrvoje Niksic https://github.com/hniksic/emacs-htmlize
Put the file
Put the following in your emacs init:
(add-to-list 'load-path "~/.emacs.d/lisp/") (require 'xah-html-mode)
How's it different from default HTML mode?
- xah-html-mode has keyword based coloring. If a word is not colored, it is not a valid HTML5 or CSS word. (This way, it's easy to spot typos.)
- xah-html-mode tag completion is much convenient to use, and contains all HTML5 keywords. Emacs default html mode is from around 1990s.
- xah-html-mode has large number of commands for working with HTML.
- xah-html-mode particularly features working with programing language source code. Easily embed source code, html syntax color it, or extract and edit the code in a buffer, similar to org mode's babel features. [see Emacs: Org Mode, Programing Language Code Markup]
• Syntax coloring based on exact keywords. If it's not colored, it's not a valid tag.
• Press Tab to insert html tag. They wrap a tag around text selection. If there's no selection, then decided smartly on word/line/block. When current selection or position is empty, it'll place your cursor in between the inserted tag.
• Convert lines to list.
• Convert text to table or reverse.
• Command to html syntax color computer language source code.
• Command to edit source code in a separate buffer.
Similar to org babel feature.
• Remove HTML tags:
• Extract URL in a text selection.
• Htmlize keyboard shortcuts notation
• Replace region text to HTML entities or Unicode equivalent.
[see HTML Entity List]
• Change inline image tag and image file name.
here's major features am working on
• Add HTML validation feature. Possibly on-the-fly.
• Make it a complete HTML syntax aware editor. So that it's impossible to create invalid HTML.