0

Similar to org mode, for taking colorful notes in Emacs, I would like to define some special characters (used in the beginning of the lines) to tell Emacs which colors (foreground/background) should be used for highlighting the entire current line. Is there any script for this purpose? If yes, please let me know how I can use it.

An example of the notes :

# list of operating systems : << highlighted with red
@    Unix              << highlighted with blue
@    Linux             << highlighted with blue
@    Minix             << highlighted with blue
askman
  • 33
  • 1
  • 1
  • 4

1 Answers1

1

You can use highlight-lines-matching-regexp and save settings within the same file (with hi-lock-write-interactive-patterns and hi-lock-find-patterns as described here).

Or you can define your own syntax highlighting if it's worth the trouble.

Juancho
  • 748
  • 3
  • 5
  • the command highlights text just for the first time calling. I mean after adding some lines, not only the new lines are not highlighted but also running the command again has no effect anymore! Do you have any idea how to fix it? – askman Apr 20 '16 at 01:03