Подсветка синтаксиса nano

Подсветка синтаксиса nano

Подсветка синтаксиса nano

Посмотрим доступные шаблоны

ls -1 /usr/share/nano/
asm.nanorc
awk.nanorc
cmake.nanorc
c.nanorc
css.nanorc
debian.nanorc
fortran.nanorc
gentoo.nanorc
groff.nanorc
html.nanorc
java.nanorc
makefile.nanorc
man.nanorc
mgp.nanorc
mutt.nanorc
nano-menu.xpm
nanorc.nanorc
objc.nanorc
ocaml.nanorc
patch.nanorc
perl.nanorc
php.nanorc
pov.nanorc
python.nanorc
ruby.nanorc
sh.nanorc
tcl.nanorc
tex.nanorc
xml.nanorc

Добавим их в конфигурацию nano

nano ~/.nanorc
include "/usr/share/nano/asm.nanorc"
include "/usr/share/nano/awk.nanorc"
include "/usr/share/nano/cmake.nanorc"
include "/usr/share/nano/c.nanorc"
include "/usr/share/nano/css.nanorc"
include "/usr/share/nano/debian.nanorc"
include "/usr/share/nano/fortran.nanorc"
include "/usr/share/nano/gentoo.nanorc"
include "/usr/share/nano/groff.nanorc"
include "/usr/share/nano/html.nanorc"
include "/usr/share/nano/java.nanorc"
include "/usr/share/nano/makefile.nanorc"
include "/usr/share/nano/man.nanorc"
include "/usr/share/nano/mgp.nanorc"
include "/usr/share/nano/mutt.nanorc"
include "/usr/share/nano/nanorc.nanorc"
include "/usr/share/nano/objc.nanorc"
include "/usr/share/nano/ocaml.nanorc"
include "/usr/share/nano/patch.nanorc"
include "/usr/share/nano/perl.nanorc"
include "/usr/share/nano/php.nanorc"
include "/usr/share/nano/pov.nanorc"
include "/usr/share/nano/python.nanorc"
include "/usr/share/nano/ruby.nanorc"
include "/usr/share/nano/sh.nanorc"
include "/usr/share/nano/tcl.nanorc"
include "/usr/share/nano/tex.nanorc"
include "/usr/share/nano/xml.nanorc"

На этом все.
Nano будет по заголовку в файле определять его тип и в зависимости от этого подсвечивать синтаксис.

6 комментариев

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *