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>
Added feature for the mcdiff for the bidirectional merge.
With F15 mcdiffviewer merge left panel to right panel direction.
original patch by Gergely Szasz <szaszg@hu.inter.net>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
added bind "MergeOther" into mc.keymap.default, mc.keymap.emacs.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
This commit makes a few improvements in default bindings:
* use chm_http text-mode handler for CHM files;
* play sounds only from videos in text mode;
* use pdftotext -layout -nopgbrk switches;
* try to use elinks before links for HTML;
* soffice2html text-mode handler for SXW files;
* wvHtml text-mode handler for doc files;
* xlhtml text-mode handler for XLS files;
* ppthtml text-mode handler for PPT/PPS files;
* open=view+pager fallback (noX) for PostScript, PDF, OD[PST] and DVI;
* standarized $DISPLAY checks.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Syntax file properties.syntax used very dark color for keys (cyan is
almost invisible on default MC background), and bright color for
delimiters (yellow), which made highlighted file difficult to read.
Change keys color to yellow.
Change delimeters color to bright cyan.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
added bindings 'ScrollLeft', 'ScrollRight' for scroll long filenames in panel
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
some code & typo fixes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* LZMA is now considered unsupported and outdated, let's get rid of it.
* There's no p7 archiver format, let's change it to "7z".
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Until 4.7 '/' was forward and '?' backward search.
In current releases both keys are bound to ViewSearch
so one must manually choose Backwards option in the dialog.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Added a few common file types to filehighlight.ini, namely
* 7z, ace to archives
* flac, ape, wma, wmv, 3gp to media
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
The following example breaks highlighting to the end of file:
local a = "\\"
local b = 1
...
Added escape handling for simplest cases both for
single-quoted and double-quoted literals:
'\\', '\n' (and similar), '\d', '\dd', '\ddd'
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Seems that the previous patch was incomplete. Especially the "Delete file?" dialog
sucks because the colors of the Yes and No buttons are the same, it's only the mouse
cursor that shows which one is active.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
When reorganizing skins, two values in the sand256 skin got lost: the
header is boring black instead of interesting red, and the header in
viewer/editor is not highlighted.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
ctrl-x shortcut is used in default keymap twice:
* as shotrcut for WordRight action (see 0908c8baea);
* as prefix for extended keybindings.
To fix the second issue, shortcut for editor.ExtendedKeyMap is
unassigned now because extended shortcuts are unused in editor in
default keymap.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
added new extfs plugin - gitfs
used prefix [git] for identification as a #changesetfs
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
added actions for mark files in the panel by shift-left/shift-right
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Most of keybind names are changed to unify that names.
Details see in doc/keybind-migration.txt file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Added doc/keybind-migration.txt file to describe new keybinding names
used in mc.keymap.* files in 4.8.x series.
Cosmetics: reordering of keymap section declarations to provide identical
order totally in the source tree.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
added rules for misc/macros.d/*. in the process of installation, example scripts will be copied into share/mc/examples/macros.d
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
some fixes
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
and one more fix
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
added action CK_Mark_Word to the mark current word
changed double-click the mouse handler of the editor
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
...for .so libraries and ELF objects.
.so libraries have the higher priority of extansion handling over ELF
objects.
Added -C -D options to nm utility for .so libraries.
Added -C option to nm utility for ELF objects.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
New keybinding "PanelSmartJumpUp" for the jump to the parent directory if command line is empty. Not defined by default.
This binding maybe used for bind 'Backspace' as hotkey for 'cd ..' (only if command line is empty).
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Including wrong separator ',' instead of ';' in /etc/mc/mc.keymap and /etc/mc/mc.keymap.default
(commit b1bd2e2673) causes that mcedit ignores not only ctrl-h and
1;1Cctrl-d keys but also ordinary delete and backspace! This makes mcedit mostly unusable.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
RPMLint shows the following warnings:
mc.i586: W: conffile-without-noreplace-flag /etc/mc/Syntax
mc.i586: W: conffile-without-noreplace-flag /etc/mc/mc.lib
mc.i586: W: conffile-without-noreplace-flag /etc/mc/mc.charsets
First step: install Syntax into /usr/share/mc instead of /etc/mc.
This also fixes the impossibility of editing of system-wide Syntax file
in mcedit under root (menu Options->Syntax file->System Wide).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Midnight Commander's color/skin engine often reuses the same color definition for multiple elements on the UI.
This unnecessarily limits the possibilities when playing with colors.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* fixed include? keyword
* fixed $ in the end of regexps
Valid highlighting of regexps can't be done with syntaxcolor.
Ruby uses '/' to divide numbers and for defining regexps.
Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com>
Added new viewer keybindings instaed of hardcoded keys:
- for move to top and bottom of file;
- for horizontal scroll by 10 columns.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Initial step: added description for A1 and C1 keys.
A1 and C1 keybindings are applied to WTree, WInput and WPanel widgets.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>