In the past I've exclusively used vi, but now I want to use Emacs as I've heard it has some useful modes, for example 'font-lock-keywords' mode which is one way to easily
highlight certain keywords in a program's console output. I don't want to mess around compiling specialised text highlighting programs, and they're not in my standard repos. Emacs is much more likely to already be available wherever I need it.
Emacs commands:
- To exit: C-x C-c
- Turn on syntax highlighting: M-x font-lock-mode
Key:
C = Ctrl
M = Meta (Alt)
Thanks to the rest of the web
UPDATE: It turns out font-lock-keywords can easily be implemented in a 3 line bash script. Call it "highlight":
# Usage: tail -f error.log | highlight "error"
RED="$(tput setaf 1)"
RESET="$(tput setaf 7)"
sed "s/$1/$RED$1$RESET/"
But I would still like to see the
Perl debugger integrated into Emacs