mc подсветка синтаксиса?
Добавлено: 2011-01-04 21:51:17
как заставить mcedit подсвечивать .conf файлы так же как и .sh


Кто хочет сделать - ищет способ, кто не хочет - причину
https://forum.lissyara.su/
Код: Выделить всё
ln -s /etc/pf.conf /etc/pf.sh
mcedit /etc/pf.sh
поставил vimunix-admin писал(а):В vim ее включать не нужно, она там по умолчанию...
Код: Выделить всё
# cd /usr/local/share/mc/syntax
# cp sh.syntax conf.syntax
Код: Выделить всё
file ..\*\\.conf$ Configuration\sfile
include conf.syntax
это я и сам уже сделалrmn писал(а):так в чем проблема?
Код: Выделить всё
# cd /usr/local/share/mc/syntax # cp sh.syntax conf.syntax
а вот этого вообще нету, попробовал создать ничё не помогло подсветки нетrmn писал(а):так в чем проблема?
и в /usr/local/share/mc/syntax/Syntax добавляем:Код: Выделить всё
file ..\*\\.conf$ Configuration\sfile include conf.syntax
Код: Выделить всё
-r--r--r-- 1 root wheel 13K 9 дек 15:58 PKGBUILD.syntax
-r--r--r-- 1 root wheel 1,7K 9 дек 15:58 ada95.syntax
-r--r--r-- 1 root wheel 1,0K 9 дек 15:58 aspx.syntax
-r--r--r-- 1 root wheel 9,0K 9 дек 15:58 assembler.syntax
-r--r--r-- 1 root wheel 5,0K 9 дек 15:58 awk.syntax
-r--r--r-- 1 root wheel 3,3K 9 дек 15:58 c.syntax
-r--r--r-- 1 root wheel 9,4K 9 дек 15:58 cabal.syntax
-r--r--r-- 1 root wheel 936B 9 дек 15:58 changelog.syntax
-r--r--r-- 1 root wheel 4,4K 9 дек 15:58 cs.syntax
-r--r--r-- 1 root wheel 20K 9 дек 15:58 css.syntax
-r--r--r-- 1 root wheel 3,8K 9 дек 15:58 cxx.syntax
-r--r--r-- 1 root wheel 18K 9 дек 15:58 d.syntax
-r--r--r-- 1 root wheel 673B 9 дек 15:58 debian-changelog.syntax
-r--r--r-- 1 root wheel 922B 9 дек 15:58 debian-control.syntax
-r--r--r-- 1 root wheel 473B 9 дек 15:58 debian-description.syntax
-r--r--r-- 1 root wheel 370B 9 дек 15:58 debian-sources-list.syntax
-r--r--r-- 1 root wheel 1,2K 9 дек 15:58 diff.syntax
-r--r--r-- 1 root wheel 2,1K 9 дек 15:58 dos.syntax
-r--r--r-- 1 root wheel 11K 9 дек 15:58 ebuild.syntax
-r--r--r-- 1 root wheel 7,5K 9 дек 15:58 f90.syntax
-r--r--r-- 1 root wheel 2,9K 9 дек 15:58 eiffel.syntax
-r--r--r-- 1 root wheel 9,8K 9 дек 15:58 erlang.syntax
-r--r--r-- 1 root wheel 2,3K 9 дек 15:58 filehighlight.syntax
-r--r--r-- 1 root wheel 8,4K 9 дек 15:58 fortran.syntax
-r--r--r-- 1 root wheel 8,5K 9 дек 15:58 haskell.syntax
-r--r--r-- 1 root wheel 35K 9 дек 15:58 html.syntax
-r--r--r-- 1 root wheel 3,0K 9 дек 15:58 idl.syntax
-r--r--r-- 1 root wheel 220B 9 дек 15:58 ini.syntax
-r--r--r-- 1 root wheel 1,6K 9 дек 15:58 j.syntax
-r--r--r-- 1 root wheel 3,6K 9 дек 15:58 java.syntax
-r--r--r-- 1 root wheel 5,0K 9 дек 15:58 js.syntax
-r--r--r-- 1 root wheel 8,8K 9 дек 15:58 latex.syntax
-r--r--r-- 1 root wheel 2,2K 9 дек 15:58 lisp.syntax
-r--r--r-- 1 root wheel 1,2K 9 дек 15:58 lsm.syntax
-r--r--r-- 1 root wheel 6,0K 9 дек 15:58 lua.syntax
-r--r--r-- 1 root wheel 3,1K 9 дек 15:58 m4.syntax
-r--r--r-- 1 root wheel 4,0K 9 дек 15:58 mail.syntax
-r--r--r-- 1 root wheel 2,3K 9 дек 15:58 makefile.syntax
-r--r--r-- 1 root wheel 2,6K 9 дек 15:58 ml.syntax
-r--r--r-- 1 root wheel 6,5K 9 дек 15:58 named.syntax
-r--r--r-- 1 root wheel 5,6K 9 дек 15:58 nemerle.syntax
-r--r--r-- 1 root wheel 7,9K 9 дек 15:58 nroff.syntax
-r--r--r-- 1 root wheel 11K 9 дек 15:58 octave.syntax
-r--r--r-- 1 root wheel 3,9K 9 дек 15:58 pascal.syntax
-r--r--r-- 1 root wheel 9,5K 9 дек 15:58 perl.syntax
-r--r--r-- 1 root wheel 109K 9 дек 15:58 php.syntax
-r--r--r-- 1 root wheel 2,3K 9 дек 15:58 po.syntax
-r--r--r-- 1 root wheel 8,3K 9 дек 15:58 povray.syntax
-r--r--r-- 1 root wheel 8,1K 9 дек 15:58 procmail.syntax
-r--r--r-- 1 root wheel 1,6K 9 дек 15:58 properties.syntax
-r--r--r-- 1 root wheel 9,3K 9 дек 15:58 python.syntax
-r--r--r-- 1 root wheel 5,9K 9 дек 15:58 ruby.syntax
-r--r--r-- 1 root wheel 64K 9 дек 15:58 sh.syntax
-r--r--r-- 1 root wheel 3,3K 9 дек 15:58 slang.syntax
-r--r--r-- 1 root wheel 5,1K 9 дек 15:58 smalltalk.syntax
-r--r--r-- 1 root wheel 11K 9 дек 15:58 spec.syntax
-r--r--r-- 1 root wheel 10K 9 дек 15:58 sql.syntax
-r--r--r-- 1 root wheel 1,1K 9 дек 15:58 strace.syntax
-r--r--r-- 1 root wheel 5,4K 9 дек 15:58 swig.syntax
-r--r--r-- 1 root wheel 1,9K 9 дек 15:58 syntax.syntax
-r--r--r-- 1 root wheel 4,3K 9 дек 15:58 tcl.syntax
-r--r--r-- 1 root wheel 8,9K 9 дек 15:58 texinfo.syntax
-r--r--r-- 1 root wheel 3,6K 9 дек 15:58 tt.syntax
-r--r--r-- 1 root wheel 31B 9 дек 15:58 unknown.syntax
-r--r--r-- 1 root wheel 7,6K 9 дек 15:58 verilog.syntax
-rw-r--r-- 1 root wheel 59B 5 янв 12:08 Syntax
-r--r--r-- 1 root wheel 5,0K 9 дек 15:58 vhdl.syntax
-r--r--r-- 1 root wheel 1,1K 9 дек 15:58 xml.syntax
-r--r--r-- 1 root wheel 353B 9 дек 15:58 yum-repo.syntax
-r--r--r-- 1 root wheel 4,1K 9 дек 15:58 yxx.syntax
Код: Выделить всё
-r--r--r-- 1 root wheel 1,9K 9 дек 15:58 syntax.syntax
Код: Выделить всё
cat /usr/local/share/mc/syntax/syntax.syntax
# Syntax highlighting rules for syntax highlighting rules
# Use \[\] at the end of keywords to suppress their special meaning
wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_.\\[]{}
context default
# Invalid combinations, not highlighted
keyword whole linestart\[\t\s\]whole
keyword whole linestart\[\t\s\]wholeleft
keyword whole linestart\[\t\s\]wholeright
# Combinations below are valid
keyword whole whole\[\t\s\]linestart brightcyan
keyword whole wholeleft\[\t\s\]linestart brightcyan
keyword whole wholeright\[\t\s\]linestart brightcyan
keyword whole whole\[\] brightcyan
keyword whole wholeleft\[\] brightcyan
keyword whole wholeright\[\] brightcyan
keyword whole linestart\[\] brightcyan
keyword whole wholechars\[\t\s\]left brightcyan
keyword whole wholechars\[\t\s\]right brightcyan
keyword whole wholechars\[\] brightcyan
keyword whole define\[\] brightcyan
keyword whole spellcheck\[\] yellow
keyword whole keyword\[\] yellow
keyword whole context\[\t\s\]exclusive brightred
keyword whole context\[\t\s\]default brightred
keyword whole context\[\] brightred
keyword whole caseinsensitive\[\] brightred
keyword whole linestart file\[\] brightgreen
keyword whole linestart include\[\] brightred
keyword whole black black blue
keyword whole red red
keyword whole green green
keyword whole brown brown
keyword whole blue blue black
keyword whole magenta magenta
keyword whole cyan cyan
keyword whole lightgray lightgray
keyword whole gray gray black
keyword whole brightred brightred
keyword whole brightgreen brightgreen
keyword whole yellow yellow
keyword whole brightblue brightblue black
keyword whole brightmagenta brightmagenta
keyword whole brightcyan brightcyan
keyword whole white white
context linestart # \n brown
Код: Выделить всё
# fgrep "include" *
cabal.syntax: keyword whole \[\s\]include-dirs cyan
cabal.syntax: keyword whole \[\s\]includes cyan
cabal.syntax: keyword whole \[\s\]install-includes cyan
erlang.syntax:# include erlang.syntax
erlang.syntax:# include erlang.syntax
erlang.syntax: keyword whole -include brightmagenta
erlang.syntax: keyword whole -include_lib brightmagenta
latex.syntax: keyword whole \\include{*} yellow
latex.syntax: keyword whole \\includeonly{*} yellow
m4.syntax: keyword whole include yellow
m4.syntax: keyword whole sinclude yellow
makefile.syntax: keyword whole linestart include magenta
makefile.syntax: keyword whole linestart .\[\s\t\]include magenta
php.syntax: keyword whole include brightmagenta
php.syntax: keyword whole include_once brightmagenta
php.syntax: keyword whole get_include_path yellow
php.syntax: keyword whole get_included_files yellow
php.syntax: keyword whole restore_include_path yellow
php.syntax: keyword whole set_include_path yellow
povray.syntax: keyword whole #include white
ruby.syntax: keyword whole include magenta
sql.syntax: keyword whole include yellow
swig.syntax: keyword whole linestart %include red/orange
syntax.syntax: keyword whole linestart include\[\] brightred
texinfo.syntax: keyword whole @include yellow
verilog.syntax: keyword whole `include brightred/
+1unix-admin писал(а):В vim ее включать не нужно, она там по умолчанию...
+100 её там нет (по умолчанию)Alex Keda писал(а):+1unix-admin писал(а):В vim ее включать не нужно, она там по умолчанию...
сам ты гонишь, по дефолту там нету подсветки!!!Alex Keda писал(а): ты гонишь
первый попашийся .conf
да хрен с этим дефолтом vim nano и т.д. я вообще ee по привычке набираю
я в vim ещё нумерацию строк добавил
утож, вопрос в том куда?Alex Keda писал(а):куда-то прописать расширение, очевидно)
Код: Выделить всё
cp /usr/local/share/mc/syntax/sh.syntax /usr/local/share/mc/syntax/unknown.syntax