Also checkout:
-
man nanorc
look for include "syntaxfile"
When trying to find something in the man pages, try, in this case, man -k nano
.
- /etc/nanorc found via
locate 'nanorc'
I currently put my nano usr configuration file in $HOME/.config/nano/nanorc
.
A syntax file can be inline or included.
Summary
The snippet below is part of my nanorc file with an inline highlighting file. I could have easily done include './asciidoc.nanorc' if I had put it in the directory
$HOME/.config/nano/
### Simple asciidoc highlighting
syntax "AsciiDoc" "\.(txt|asc)$"
header "^={1,2}[[:space:]]+.+[[:space:]]+={1,2}$"
# h1
color black,white "^=[[:space:]]+.+[[:space:]]+=$"
# h2
color red "^==[[:space:]]+.+[[:space:]]+==$"
# h3
color red "^===[[:space:]]+.+[[:space:]]+===$"
# .title
color blue "^\.[^[:space:].]+.+$"