mplayer is not currently actively developed and some people have long
switched to MPV - use it as a fallback for "mplayer -identify" command.
Also, give the user a hint about mplayer/mpv in case none of them is
installed.
Signed-off-by: Yury V. Zaytsev <yury.zaytsev@moneymeets.com>
ClosesMidnightCommander/mc#134:
* `file -b` prints class file version, which `javap` doesn't by default
* `javap`'s stderr should be suppressed as it may print `_JAVA_OPTIONS`
if this variable is set
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
* Asterisk and underscore contexts don't play well with lists or
words containing underscores. And given that markdown files
could contain not only ASCII text, it is better to be conservative
in detecting contexts.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
If the file is not compressed and DECOMP is empty, it should be replaced
by *nothing*, not an empty argument. Broken in the following commit:
becc0d01d0
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
The bug: in skin files, the "[editor]" section's "window-state-char" and
"window-close-char" (whose values, as the name implies, are single
characters) are parsed as color fg+bg+attr, and an ncurses/slang
colorpair is allocated for each.
The bug fix: move "window-state-char" and "window-close-char" keys from
"[editor]" section to "[widget-editor]" one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
According to the LISP users this file extension can only be
seen in old projects and nowadays it's much more common in
the computer graphics applications for the OpenCL programs.
This is a part of work related on adding OpenCL syntax highlight
to mcedit. See tocket #3690 for the details.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Based on existing cxx.syntax file with some extra keywords added.
Colors could be tweaked a bit still, and perhaps list of keywords
and built-in types could be extended further, but it should be a
good starting point already.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This is an initial support of GLSL syntax highlight for mcedit.
Keyword and and built-in function lists are based on glsl-mode.el
from emacs (which is originally written by Xavier Decoret and
Jim Hourihan).
Supports GLSL 4.5.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* odp / ods / odt: ODF documents
* xls: not a database, consistency with xlsx
* rb: Ruby program
* xq: XQuery program
* svg: Scalable Vector Graphics format
* tiff: alternative extension for Tagged Image File Format
* xcf: GIMP format
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Save space and fix rpmlint warning found by OBS Framework
(build.opensuse.org).
mc.x86_64: W: files-duplicate /etc/mc/mc.keymap /etc/mc/mc.default.keymap
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
`$*` must be quoted unless it's a command
`%*` must not quoted (already quoted)
1) quoting fixes
2) indentation fixes
3) `while` replaced by `for` loops
4) header comment (taken from source code)
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Add msg, debug, validpgpkeys, changelog, checkdepends, epoch, buildflags, upx
and remove force keyword according to current PKGBUILD man.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Remove [\s]* from patterns. Assume that PKGBUILD-specific variables
must start from linestart. (Usualy they do.)
[\s]* cause conflicts on 'install' keyword for example when install
command highlighted as PKGBUILD-specific variable.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* Support for "long" strings/comments.
* Fixed Syntax.in to recognize both "#!/path/to/lua" and "#!/usr/bin/env lua".
* Fixed langauge name (it's "Lua", not "LUA").
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Support for puppet manifest highlighting was kindly
provided by Sergey Zhuga, original is here:
https://github.com/scrill/puppet-syntax-mcedit
Mr. Zhuga agreed with inclusion in mainstream MC:
https://github.com/scrill/puppet-syntax-mcedit/issues/2
Reasons to favor puppet syntax over pascal for .pp files:
---------------------------------------------------------
I will not argue whether in 2014 pascal is still being used or not,
and to what extent. I would like to point out that whoever is using
any variation of pascal for any serious development, is probably not
using 'mcedit' as an IDE. Instead, this development activity is
probably situated in nice, fully-featured graphical IDE.
Platform wise, judging by the weekly download statistics of FreePascal
at SourceForge, at this moment more than 80% of all downloads are for
Windows environents. On the other hand Midnight Commander is Linux
based. Considering this in combination with speculation from the
previous paragraph, there seems to be only a small chance that 'mcedit'
is being used as an editor of choice for pascal development.
On the contrary, puppet currently certainly does have wider audience
amongst sysadmins, who regularly use Linux. Puppet master requires a
server (usually) and quite a few sysadmins edit files directly on
servers that act as puppet masters for puppet development
environments.
When accessing these servers remotely, mcedit comes very handy for
quick edits here and there. Also keep in mind that puppet files are
normally not very large. Therefore actual IDE would be an overkill and
'mcedit' does the job quite ok, but syntax highlighting would be
much appreciated.
To sum it up:
If we speculate about the *actual* usage of 'mcedit', I do believe that
a wider audience would benefit by having .pp files highlighted by
default with puppet syntax definition instead of pascal syntax
definition.
The 'file' utility determine the file type differently:
till file-5.16 - Java Jar file data (zip)
since file-5.17 - Java archive data (JAR)
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Change "black" and "white" to "rgb000" and "rgb555" when it's rendered
in bold, because the legacy 16 colors change their actual color in
addition to going bold in most of the terminals which is undesired.
Second, there was some unintended difference between the two gray skins
in the file type colors.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Current php.syntax (Utopic 3:4.8.12-1) gets confused with embedded HTML or DOCTYPE statements with strings.
Here's a suggested patch to fix it.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* Consistent indentation: All skins use now 4 spaces (the default of
mcedit). This makes it easier to copy-paste sections from one skin to
another, while maintaining consistency.
* Spaces around the '=' sign. The version with spaces is more
readable, especially around double line characters.
* Make the order of the sections consistent across all skins.
* In [menu], swap the order of "menusel" and "menuhot" to make the
order consistent with the [dialog] and [error] sections.
* Add the missing "helptitle" to sand256 skin. This is the only
functional change.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The "topmiddle" and "bottommiddle" characters are defined incorrectly
in many skins. This is because the correct definition wouldn't work
with S-Lang build. The only place these characters are used is the
diffviewer if either the +/- signs or the line numbers are shown,
enabled by pressing S or L. The correct definition of these characters
currently show up as 'v' and 'w' characters.
The fix makes the diffviewer use tty_print_alt_char() as it is being used
in other parts of the code, and hence it fixes the bug.
It also fixes the skin definitions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fix inconsistency of the arrow's direction in the panel header line
across skins.
Change default value of "sort-sign-down" from "," (comma) to "." (dot).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Add 'shell/i/.zoo' to detect zip archive using .zip extension
in addition to 'type/i/^zip\ archive'.
Thanks ctmp1 <gvlatyshev@gmail.com> for the original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Most applications require the line number to precede the filename,
with apparently 'vim' and 'mcedit' being the only exceptions
(they accept both possible orders). E.g. 'emacs +10 /etc/services'
opens that file at line 10, but 'emacs /etc/services +10' simply
ignores the line number.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This patch fixes syntax highlighting for files in .config directory
(I was wondering why my rc.lua file in ~/.config/awesome is highlighted
as 'Java File' while in /etc/xdg/awesome it was highlighted correctly).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
From ticket #3044: mc.lib typo: linenog
mc.lib has a typo. "less=%filename +%linenog" instead of "+%lineno"
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Only following colors can be used in 16-color skins:
black, red, green, brown, blue, magenta, cyan, lightgray.
Following colors are replaced in 16-color skins:
white -> lightgray
yellow -> brown
brightgreen -> green
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
MC already has its own half-ready trick: when pasting with Shift-Insert,
using the X11 extension, the newline ("Enter" as mc calls it) with the
Shift modifier pressed gets converted to a "Return", and in the editor
the Return character inserts a non-indenting newline. This makes pasting
better in terminals not supporting bracketed paste, however, it has some
problems that this commit addresses:
* Shift+newline gets this special treatment, but Ctrl+newline gets
dropped. Hence e.g. when pasting in Gnome-terminal with Ctrl+Shift+V
all the newlines will be missing. This commit adds the same
non-indenting newline behavior to Ctrl+Newline and Ctrl+Shift+Newline.
* The code forgets about Tab that also needs special treatment:
- Most terminals send \e[Z on Shift+Tab, this is not handled by MC
at all, moreover it causes a hang for about a second. This commit
teaches this sequence to MC. This is especially useful when no X11
is available, because there Ctrl+Tab is identical to Tab, so the
backwards tab feature is not available. With this commit Shift+Tab
becomes a backwards tab too on all terminals that emit \e[Z.
- When pasting to the editor, Shift+Tab, Ctrl+Tab and Ctrl+Shift+Tab
should all insert a tab for the same reason mentioned at the newline.
- It would look inconsistent in the keymap files to have logical code
such as "backtab" instead of "shift-tab" and friends, hence get rid
of KEY_BTAB and use KEY_M_SHIFT | '\t' instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
modarin256: a moderate-dark-independent 256-color skin for Midnight Commander.
This skin is using colors independent from the default 16 terminal colors,
i.e., no matter how the 16 standard colors are configured, the appearance
of Midnight Commander will not be affected.
There are 4 variants of this skin:
modarin256
- default skin, no standard colors used.
modarin256-defbg
- like modarin256, but using the default background color for core, editor,
viewer, menu and popupmenu backgrounds, for use with (semi-)transparent
background colors.
modarin256root
modarin256root-defbg
- like the other two skins, but for the root user, with red colors used
instead of green colors for things like select/focus/statusbar etc.,
to keep reminding the user that mc is running as root.
Fallback skins for 16-color terminals (poor man's skins):
modarcon16
modarcon16-defbg
modarcon16root
modarcon16root-defbg
- like everything running in a 16-color terminal, these skins look ugly
and are no subsitute for the 256-color versions. As some terminals don't
support using dark gray as background color, i used a black background
and adjusted the remaining colors accordingly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
ogginfo should be shown for MC_EXT_FILENAME like other cases.
Using MC_EXT_SELECTED handles filenames with spaces incorrectly.
Signed-off-by: Alessio Ababilov <ilovegnulinux@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Widely used java web application .war archives are are .jar archives
which is essentially a zip archive with manifest file being the first
entry.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The Jal is a programming language used in PIC microcontrollers.
The lkr files determines how the gplink program works. The gplink
is part of gputils and creates PIC microcontroller program.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* Added support of .asm file extention
* Added support of .hh file extention
* All file extentions for source files now case insentetive.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>