2

How to enable HTML tag pair highlighting mode in Ergoemacs.

I'm using the Ergo- version of Emacs on Windows 7 -- i.e., Ergoemacs.

I found a thread that deals with a similar issue -- i.e., sgml and xml tags:  Emacs matching tags highlighting

The suggested solution in that other thread was to use a library called hl-tags-mode.el, which is located at the following Github link:

https://github.com/deactivated/hl-tags-mode/blob/master/hl-tags-mode.el

I copied that hl-tags-mode.el library to my .emacs.d/ folder and pressed Alt-a hg-tags-mode -- Emacs gives me a message that states "No Match".


In the end: I let go of ergoemacs and the following steps worked:

  1. Download emacs-24.3-bin-i386.zip from the web
  2. Unzip to d:\emacs-24.3\
  3. Download hl-tags-mode.el to D:\emacs-24.3\site-lisp\
  4. Add

(require 'hl-tags-mode) (add-hook 'sgml-mode-hook (lambda () (hl-tags-mode 1))) (add-hook 'nxml-mode-hook (lambda () (hl-tags-mode 1)))

to C:\Users\Name\AppData\Roaming.emacs

Start up emacs and open an html file and voila! matching tags are highlighted

Community
  • 1
  • 1
  • Did you follow the instructions on lines 26, 27 and 28 of the source code? https://github.com/deactivated/hl-tags-mode/blob/master/hl-tags-mode.el *To use hl-tags-mode, add the following to your .emacs*: `(require 'hl-tags-mode) (add-hook 'sgml-mode-hook (lambda () (hl-tags-mode 1))) (add-hook 'nxml-mode-hook (lambda () (hl-tags-mode 1)))` If you did that, how about trying a virtually blank `.emacs` file (with only the above settings) and only that one particular library to see whether it works without any other potential conflicts in your user-configuration (e.g., other libraries, etc.) – lawlist Apr 10 '14 at 23:26
  • I assume you also read the part in the library (at lines 21 and 22) which states: `hl-tags-mode is a minor mode for SGML and XML editing that ;; highlights the current start and end tag.` Thus, you may need to do some modifications to that source code to be able to use it with `html`. – lawlist Apr 10 '14 at 23:34
  • Please review my edits to your initial question -- hopefully, it now states more clearly your intended question, and it may help to reduce negative reputation points and/or votes to close your question because the issue is not clear. If you feel that I have misinterpreted your question, please feel free to edit it again to your liking. – lawlist Apr 10 '14 at 23:49
  • 1
    @user3521285 Just to make sure you are aware of it: StackOverflow allows you to [answer your own question](https://stackoverflow.com/help/self-answer) (and even accept the answer after 48 hours). So you might want to consider moving the solution you added to your question to an actual answer. – itsjeyd Apr 23 '14 at 16:06

0 Answers0