From 0e0396222c7b97cd5655def473313931ea0575eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20E=C5=A1ler?= Date: Thu, 13 Dec 2018 10:48:50 +0100 Subject: [PATCH 1/2] add syntax highlighting for /etc/hosts --- etc-hosts.nanorc | 15 +++++++++++++++ nanorc | 1 + 2 files changed, 16 insertions(+) create mode 100644 etc-hosts.nanorc diff --git a/etc-hosts.nanorc b/etc-hosts.nanorc new file mode 100644 index 0000000..ae29864 --- /dev/null +++ b/etc-hosts.nanorc @@ -0,0 +1,15 @@ +## Make /etc/hosts nicer to read, see `man hosts 5` to see a format +syntax "/etc/hosts" "hosts" + +# IPv4 +color yellow "^[0-9\.]+\s" + +# IPv6 +icolor green "^[0-9a-f:]+\s" + +# interpunction +color normal "[.:]" + +# comments +color brightblack "^#.*" + diff --git a/nanorc b/nanorc index 50006ba..47ae7a8 100644 --- a/nanorc +++ b/nanorc @@ -16,6 +16,7 @@ include "~/.nano/dot.nanorc" include "~/.nano/dotenv.nanorc" include "~/.nano/email.nanorc" include "~/.nano/Dockerfile.nanorc" +include "~/.nano/etc-hosts.nanorc" include "~/.nano/fish.nanorc" include "~/.nano/fortran.nanorc" include "~/.nano/gentoo.nanorc" From 77060a0ae83f9780ed548f11a42609d469b443bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20E=C5=A1ler?= Date: Thu, 13 Dec 2018 10:50:46 +0100 Subject: [PATCH 2/2] fix a typo --- etc-hosts.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc-hosts.nanorc b/etc-hosts.nanorc index ae29864..eb8a51e 100644 --- a/etc-hosts.nanorc +++ b/etc-hosts.nanorc @@ -1,4 +1,4 @@ -## Make /etc/hosts nicer to read, see `man hosts 5` to see a format +## Make /etc/hosts nicer to read, see `man hosts 5` to see the format syntax "/etc/hosts" "hosts" # IPv4