I need colorizing content of the "*.zsh" files in mcedit.
With "zsh(env|rc)" regexp rule, only "*.zshenv" and "*.zshrc" files are will be colorized.
With "zsh(env|rc)?" regexp rule, "*.zsh" files will be colorized too.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Set "errdhotfocus" to a higher contrast color combination. Yellow is barely
visible on lightgray. The cursor stands on the the focused hotkey. If the
cursor is an underscore, the high contrast is obviously needed. If the focus
is a full box, it normally inverts both the background and the foreground, so
poor contrast remains poor. Red on lightgray is consistent with other colors
of the skin.
Set "menutitle" to yellow on blue. Otherwise, the title is not
distinguishable from the menu entries. Both "parent" skins, default and
xoria256, use distinctive color for the popup menu title.
Set "editrightmargin" to the same color as the panels. White on blue is
extremely distracting in contrast to black background to the left of the
margin.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Set "disabled" background to "lightgray" for consistency with the dialog
background. The inconsistent background can be seen in the file search dialog
with an empty search string.
The hotkeys in dialogs were impossible to distinguish from other text. Make
them red for consistency with the buttonbar.
Show changed lines in diffs in black on cyan. Blue on cyan is hard to see,
such color combination is not used elsewhere in the skin, which promises
"good contrast".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
vsix files are vscode code plugins and they just zip archives, so
it makes sense to recognize them as alternative zip file extension.
Signed-off-by: Sorin Sbarnea <ssbarnea@redhat.com>
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
Found via `codespell -S
po,doc,./misc/syntax,./src/vfs/extfs/helpers/README.it -L
parm,rouge,sav,ect,vie,te,dum,clen,wee,dynamc,childs,ths,fo,nin,unx,nd,iif,iterm,ser,makrs,wil`
Co-authored-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Kian-Meng Ang <kianmeng@cpan.org>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Ticket #2773: 'include' keyword (for command class def) have no effect
if it was defined before 'Include' keyword (for command def).
Ticket #3742: update comment in mc.ext.ini.
doc: remove mc.ext.ini format description from manual page.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...to prevent leaving wal/shm files after viewing sqlite database.
The problem I often had with viewing .sqlite files with mc is that
exiting the view mode mid-way may leave .wal/.shm files in the database
directory.
This never caused any actual issues, but a bit annoying, since leftover
.wal files are often a sign that the program working with the database
exited ungracefully.
This effectively reproduces mc's behaviour:
/tmp/testsqlite $ rm -f *-wal *-shm && sqlite3 "/tmp/testsqlite/db file.sqlite" .dump | head >/dev/null && ls -1 /tmp/testsqlite/
'db file.sqlite'
'db file.sqlite-shm'
'db file.sqlite-wal'
After the change -- no shm/wal files
/tmp/testsqlite $ rm -f *-wal *-shm && sqlite3 "file:/tmp/testsqlite/db file.sqlite?immutable=1" .dump | head >/dev/null && ls -1 /tmp/testsqlite/
'db file.sqlite'
You can find the docs on immutable mode here:
https://www.sqlite.org/uri.html#uriimmutable
Immutable mode has been supported in sqlite since 2014:
https://www.sqlite.org/changes.html#version_3_8_5
In case user's sqlite installation is older, the mode is just quietly
ignored, so the change is backwards compatible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
DOT is a graph description language, described at
<https://graphviz.org/doc/info/lang.html>. The new syntax file
recognizes the basic language keywords and syntax; known node,
edge, graph, etc. properties; comments; character strings.
The syntax file seems to work well with various DOT files found
in the Linux kernel sources as well as with the MNT Reform 2.0D-4
System Diagram.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Since .endc was defined both as the context end delimiter and a context
keyword, it was not recognized as the former and the control script
context, once started, would never be finished. This issue can be
noticed, for example, in wrong syntax highlighting of the .end command
if it was preceded by a control script.
Fix the issue by making the control script context exclusive and
highlighting the .control and .endc keywords in the default context
instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Add basic support for highlighting Ngspice/SPICE (http://ngspice.sourceforge.net/)
circuit description files syntax. Two main contexts are defined:
- the default context, where the circuit is described,
- the control script context (between .control and .endc).
The default context highlights dot commands, circuit element instance
names and model types. The control script context highlights supported
functions/commands and known variables. Both contexts highlight comments
and line continuation marks.
Other than two FIXMEs, it is a known issue the first line of the file is
part of the default context, while in most cases it would contain the
file title.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
...on systems that have no /bin/cat (like NixOS).
When opening .diff or .patch files mcview invokes /bin/cat. NixOS has no
/bin/cat (the path to cat looks like /run/current-system/sw/bin/cat).
However cat is still in PATH, so replace /bin/cat with just cat. This
should not affect other systems as /bin should normally be in PATH.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The mc's built-in samba library which is used to access data across
smb links is taken from an old samba version.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fixed:
- use of "grey" instead of "gray" (same for "lightgray");
- use of space in keywords;
- typos.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Support various versions of file utility which output is changed from
one version to another:
$ file --version
file-4.26
magic file from /etc/magic:/usr/share/file/magic
$ file mc.1
mc.1: ASCII troff or preprocessor input text
$ file -z -L mc.1.gz
mc.1.gz: ASCII troff or preprocessor input text (gzip compressed data, was "mc.1", last modified: Tue Aug 24 08:17:47 2021, from Unix)
$ file --version
file-5.40
magic file from /etc/file/magic
eccomp support included
$ file mc.1
mc.1: troff or preprocessor input, ASCII text
$ file -z -L -S mc.1.gz
mc.1.gz: troff or preprocessor input, ASCII text (gzip compressed data, was "mc.1", last modified: Wed Aug 18 04:41:29 2021, from Unix)
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fix mc.ext breakage caused by c3848a689c.
While reorganizing /etc/mc/mc.ext, the order of rules was changed in the file,
causing a bug where more general matches (e. g. any gzipped file) are made
before more specific ones (e. g. a gzip-compressed manpage).
Fix this by reverting to the original order of rules.
Signed-off-by: Tomas Szepe <szepe@pinerecords.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Use an empty patter (^$) that doesn't match any file name. In this
case, only the shebang is used to detect syntax highlighting rules for
OpenRC scripts.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>