Содержание
Особенности и преимущества Midnight Commander
- Работа с RPM-пакетами;
- Работа в режимах ASCII и HEX;
- Работа с различными архивами и образами файловых систем;
- Работа с сетевыми файловыми системами Samba, Fish, FTP, SFTP;
- Выполнение операций копирования и перемещения файлов в фоновом режиме;
- Встроенный текстовый редактор mcedit с подсветкой синтаксиса;
- Текстовый режим, основанный на библиотеках ncurses и S-Lang. Это позволяет программе работать как в консоли, так и в различных эмуляторах терминала и через удалённые соединения, например, по протоколу SSH;
- MC поставляется с поддержкой мыши. Мышь подключается, если вы запускаете MC с xterm терминала (эта функция также работает при подключении через telnet или rlogin c xterm) или с Linux консоли при наличии gpm mouse сервера;
- Поддержка многоязыкового интерфейса;
- Поддержка кодировки UTF-8 (начиная с 2009 года);
Files
/usr/share/mc/mc.hlp
- The help file for the program.
/usr/share/mc/mc.ini
- The default system-wide setup for GNU Midnight Commander, used only if
- the user’s own ~/.mc/ini file is missing.
/usr/share/mc/mc.lib
- Global settings for the Midnight Commander. Settings in this file
- affect all users, whether they have ~/.mc/ini or not.
/usr/share/mc/syntax/*
- The default system-wide syntax files for mcedit, used only if
- the corresponding user’s own ~/.mc/cedit/ file is missing.
$HOME/.mc/ini
- User’s own setup. If this file is present then the setup is loaded
- from here instead of the system-wide setup file.
$HOME/.mc/cedit/
- User’s own directory where block commands are processed and saved and
- user’s own syntax files are located.
Syntax Highlighting
mcedit~/.mc/cedit/Syntax/usr/share/mc/syntax/Syntax~/.mc/cedit/Syntax
The file is divided into sections, each beginning with a line with the file command. The sections are normally put into separate files using the
include command.
The file command has three arguments. The first argument is a regular expression that is applied to the file name to determine if the following
section applies to the file. The second argument is the description of the file type. It is used in cooledit; future versions of mcedit may use
it as well. The third optional argument is a regular expression to match the first line of text of the file. The rules in the following section apply if either
the file name or the first line of text matches.
A section ends with the start of another section. Each section is divided into contexts, and each context contains rules. A context is a scope within the
text that a particular set of rules belongs to. For instance, the text within a C style comment (i.e. between /* and */) has its own color. This
is a context, although it has no further rules inside it because there is probably nothing that we want highlighted within a C comment.
A trivial C programming section might look like this:
file .\*\\.c C\sProgram\sFile (#include|/\\\*) wholechars abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_ # default colors define comment brown context default keyword whole if yellow keyword whole else yellow keyword whole for yellow keyword whole while yellow keyword whole do yellow keyword whole switch yellow keyword whole case yellow keyword whole static yellow keyword whole extern yellow keyword { brightcyan keyword } brightcyan keyword '*' green # C comments context /\* \*/ comment # C preprocessor directives context linestart # \n red keyword \\\n brightred # C string constants context " " green keyword %d brightgreen keyword %s brightgreen keyword %c brightgreen keyword \\" brightgreen
context [exclusive] [whole|wholeright|wholeleft] [linestart] delim [linestart] delim
[foreground] [background]
The first context is an exception. It must start with the command
context default [foreground] [background]
otherwise mcedit will report an error. The linestart option specifies that delim must start at the beginning of a line. The
whole option tells that delim must be a whole word. To specify that a word must begin on the word boundary only on the left side, you can use the
wholeleft option, and similarly a word that must end on the word boundary is specified by wholeright.
The set of characters that constitute a whole word can be changed at any point in the file with the wholechars command. The left and right set of
characters can be set separately with
wholechars [left|right] characters
The exclusive option causes the text between the delimiters to be highlighted, but not the delimiters themselves.
Each rule is a line of the form:
keyword [whole|wholeright|wholeleft] [linestart] string foreground [background]
Context or keyword strings are interpreted, so that you can include tabs and spaces with the sequences \t and \s. Newlines and backslashes are specified
with \n and \\ respectively. Since whitespace is used as a separator, it may not be used as is. Also, \* must be used to specify an asterisk. The * itself is a
wildcard that matches any length of characters. For example,
keyword '*' green
keyword "*" green
Important to note is the line
keyword \\\n brightgreen
The possible colors are: black, gray, red, brightred, green, brightgreen, brown, yellow, blue, brightblue, magenta, brightmagenta, cyan, brightcyan,
lightgray and white. If the syntax file is shared with cooledit, it is possible to specify different colors for mcedit and cooledit by
separating them with a slash, e.g.
keyword #include red/Orange
mceditcooledit(1)cooledit
Comments may be put on a separate line starting with the hash sign (#).
A useful hint is to work with as much as possible with the things you can do rather than try to do things that this implementation cannot deal with. Also
remember that the aim of syntax highlighting is to make programming less prone to error, not to make code look pretty.
Running from source
Requirements
These programs and packages are required:
General
- git
- Python 2.7+ (Python 3 is unsupported)
- virtualenv (not strictly required, but highly recommended)
Python packages
- PyOpenGL 3.1.1a1
- PyOpenGL-accelerate 3.1.1a1
- numpy 1.15.0
- Pillow 5.2.0
- cython 0.28.4
- python-xlib 0.14
- ftputil 3.4 (Optional, but FTP server support will be disabled without it)
- pyClark (Optional, but error reporting will be disabled without it)
On Windows, these are also required (Either one works, pypiwin32 is recommended):
- pywin32
- pypiwin32
1. Clone repo
Clone the repo (recursively, to also clone submodules):
git clone --recursive https://github.com/Podshot/MCEdit-Unified
2. Install dependencies
On Linux, these may be installed at the system level with your distro package manager.
If they are not available, you can install them using . In this case, you should set up the virtualenv first, like this:
cd MCEdit-Unified # Enter the repo directory virtualenv virtualenv # Create new virtualenv in "virtualenv" directory source virtualenv/bin/activate # Deactivate by running "deactivate" when done
Note about python-xlib: Some Linux distros do not have version 0.14 of python-xlib. In this case, you should install it with (either in a virtualenv, or after removing the system package).
Debian/Ubuntu
On Debian and Ubuntu, the Python packages may be installed from distro repositories like this:
sudo apt-get install python-opengl python-pygame python-yaml python-numpy python-xlib
The Python packages may be installed using .
Import tool:
The import tool lets you import blocks from different sources: It can place blocks previously saved using the select tool to a schematic.
It can also import an entire level into another level. It will ask you to choose a level or schematic. After you’ve chosen,
the level or schematic will appear in the green box. Although it may take a few seconds to display the
contents of the import, it is fully loaded and can be placed without waiting for everything to render.
As before, you can click to pick the blocks up, and use E R F to rotate, roll, and flip them.
Press ENTER or click Import to construct. Constructions of up to 64 million blocks should take less than a minute. The copy is done once you regain control. You should press Control-S to save your level now. The lighting recalculation for this city took about 3 minutes on a Core i5.
MACRO
To define a macro, press
Ctrl-R
and then type out the keys you want to be executed. Press
Ctrl-R
again when finished. The macro can be assigned to any key by pressing that key.
The macro is executed when you press the assigned key.
The macro commands are stored in section
it the file
~/.local/share/mc/mc.macros.
External scripts (filters) can be assigned into the any hotkey by edit
mc.macros
like following:
ctrl-W=ExecuteScript:25;
This means that ctrl-W hotkey initiates the
ExecuteScript(25)
action, then editor handler translates this into execution of
~/.local/share/mc/mcedit/macros.d/macro.25.sh
shell script.
External scripts are stored in
~/.local/share/mc/mcedit/macros.d/
directory and must be named as
macro.XXXX.sh
where
XXXX
is the number from 0 to 9999.
See
Edit Menu File
for more detail about format of the script.
Following macro definition and directives can be used:
- #silent
- If this directive is set, then script starts without interactive subshell.
- %c
- The cursor column position number.
- %i
- The indent of blank space, equal the cursor column.
- %y
- The syntax type of current file.
- %b
- The block file name.
- %f
- The current file name.
- %n
- Only the current file name without extension.
- %x
- The extension of current file name.
- %d
- The current directory name.
- %F
- The current file in the unselected panel.
- %D
- The directory name of the unselected panel.
- %t
- The currently tagged files.
- %T
- The tagged files in the unselected panel.
- %u and %U
-
Similar to the
%t
and
%T
macros, but in addition the files are untagged. You can use this macro
only once per menu file entry or extension file entry, because next time
there will be no tagged files. - %s and %S
-
The selected files: The tagged files if there are any. Otherwise the
current file.
Feel free to edit this files, if you need.
Here is a sample external script:
l comment selection TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 echo #if 0 > $TMPFILE cat %b >> $TMPFILE echo #endif >> $TMPFILE cat $TMPFILE > %b rm -f $TMPFILE
Brush Tool
The brush tool allows you to «Paint» the world using preset shapes, you can use RFEG to Increase size, Decrease size, rotate and roll this tool. The varied version will randomly distribute the blocks you select based on selected weightings.
Line Brush
Hold Z after placing a brush and click a second point to create a solid line of that brush. Line spacing adjusts how close together brushes are.
The line tool works from the last brushed point, so you can continue from the end of your last line.
Erode
You can also erode the terrain, making it more natural. To use this tool set the size and strength you want and click and drag over the area you wish to erode.
It is recommended to make multiple lower intensity passes for best results. If the brush is still too strong at strength 1, turn up Minimum Spacing.
Flood Fill
This brush will systematically replace all blocks of the same type touching the block you click on. This will go on until you either cancel the operation or it finishes.
The paste brush simply brushes an imported schematic.
Replace and Varied Replace
The replace and varied replace tools replace the block selected in the first slot with the block(s) selected in the lower slot(s).
Miscellaneous
sscanfsprintfapplesoranges
Enter search string(%d,%d,%d) Enter replace stringapples %d oranges %d Enter replacement argument order3,2
It is advisable to use this feature with Prompt On Replace on, because a match is thought to be found whenever the number of arguments found matches the
number given, which is not always a real match. Scanf also treats whitespace as being elastic. Note that the scanf format %[ is very useful for scanning
strings, and whitespace.
The editor also displays non-us characters (160+). When editing binary files, you should set display bits to 7 bits in the Midnight Commander options
menu to keep the spacing clean.
KEYS
In addition to that, Shift combined with arrows does text highlighting
(if supported by the terminal):
Ctrl-Ins
copies to the file
~/.cache/mc/mcedit/mcedit.clip,
Shift-Ins
pastes from
~/.cache/mc/mcedit/mcedit.clip,
Shift-Del
cuts to
~/.cache/mc/mcedit/mcedit.clip,
and
Ctrl-Del
deletes highlighted text. Mouse highlighting also works on some
terminals. To use the standard mouse support provided by your terminal,
hold the Shift key. Please note that the mouse support in the terminal
doesn’t share the clipboard with
mcedit.
The completion key (usually
Meta-Tab
or
Escape Tab)
completes the word under the cursor using the words used in the file.
FILES
/usr/share/mc/mc.hlp
- The help file for the program.
/usr/share/mc/mc.ini
-
The default system-wide setup for GNU Midnight Commander, used only if
the user’s own ~/.config/mc/ini file is missing.
/usr/share/mc/mc.lib
-
Global settings for the Midnight Commander. Settings in this file
affect all users, whether they have ~/.config/mc/ini or not.
/usr/share/mc/syntax/*
-
The default system-wide syntax files for mcedit, used only if
the corresponding user’s own ~/.local/share/mc/mcedit/ file is missing.
~/.config/mc/ini
-
User’s own setup. If this file is present then the setup is loaded
from here instead of the system-wide setup file.
~/.local/share/mc/mcedit/
-
User’s own directory where block commands are processed and saved and
user’s own syntax files are located.
MISCELLANEOUS
sscanfsprintfapplesoranges
Enter search string (%d,%d,%d) Enter replace string apples %d oranges %d Enter replacement argument order 3,2
The last line specifies that the third and then the second number are to
be used in place of the first and second.
It is advisable to use this feature with Prompt On Replace on, because a
match is thought to be found whenever the number of arguments found
matches the number given, which is not always a real match. Scanf also
treats whitespace as being elastic. Note that the scanf format %[ is
very useful for scanning strings, and whitespace.
The editor also displays non-us characters (160+). When editing
binary files, you should set
display bits
to 7 bits in the Midnight Commander options menu to keep the spacing
clean.
Map Editors[]
Map editors alter an existing level’s terrain or other properties, such as player position and time of day. Some of them also let you edit your inventory and generate terrain.
Name | Description | Platforms | Link | Status | Latest Compatible Release | Source available | Programming language | Author |
---|---|---|---|---|---|---|---|---|
BirdCraft |
Converts 1-256 image files into a schematic file 1-256 in height. Similar to SpriteCraft (from which BirdCraft gets inspiration), but with more features and more precise color-to-block assignment abilities. | Inactive | Java Edition 1.8 | No | VB | RapierMother | ||
buildawall |
Buildawall puts a wall around your existing world, creating a psychological and in-game division between old and new. This makes transitions between chunks generated by two different versions of minecraft much more obvious. | Inactive | Java Edition 1.2.5 | Yes | Python | Mike Verdone | ||
CraftMaster |
CraftMaster is a companion app for Minecraft PC Edition that allows you to download and import Schematics and 3D models into your Minecraft worlds, export and share your Minecraft creations on Sketchfab, Facebook and Twitter, and manage/navigate your worlds more efficiently. | Inactive | Java Edition 1.11.2 | No | C++ | CraftMaster Software, Inc. | ||
Creative Mode Plus |
Top-down builder for constructing buildings and dungeons quickly and easily for Minecraft maps. | Inactive | Java Edition 1.4.7 | Yes | C# | MyPace (Caleb Waggoner) | ||
Creeperchest |
General-purpose Minecraft editor. Version 0.0.8 supports a bunch of non-interactive world modifications, editing of multiplayer user profiles and 2D/3D rendering of the world blocks. The plugins containing all the business logic can be reprogrammed right out of the box. | Inactive | Java Edition 1.7.9 | Partial (all plugin code) | C++, homebrew stuff for plugins | Shrinker | ||
MCA selector |
Loads worlds very fast. Can be used to select (filter), edit, delete, export or import chunks. Can also «import selected chunks» and point to a older/newer version of the same world. | active | Java Edition Beta 1.3 through 1.17, and snapshots | Yes | java | Querz | ||
MCEdit |
The first 3D editor. Created to import older levels into the new Alpha levels. Fly around in 3D and select blocks, then copy or export them. Import blocks from schematics or from entire Classic levels. Resize a level by creating or deleting chunks. | Inactive | Java Edition 1.11 (stable)Java Edition 1.8 (unstable) | Python | Currently and formerly codewarrior (David Vierra), was briefly taken over by TKtech during Codewarrior’s sabbatical. | |||
MCEdit-Unified |
This is an unofficial fork of the original MCEdit by codewarrior, but with a focus on 1.8+ compatability and optimization. | Inactive | Java Edition 1.12 (stable) Pocket Edition v0.12.2 alpha (unstable) | Python | Khroki, Ezefe, Trazlander, Podshot, Rubisk, Naor, and many other MCEdit community members | |||
Expands a Standard (or modded level with server-mods) to any size specified. Useful for Pre-generating terrain for mappers, or reducing server load. | Inactive | Java Edition 1.15.2 | Yes, Public Domain | Java | Morlok8k, Corrodias | |||
Amulet Editor |
Currently under heavy development. | In early development | Java Edition 1.12+ Bedrock 1.7+ | Yes | Python | Podshot, naor2013, gentlegiantJGC, BluCode | ||
Euclid Editor |
Currently under development | In development | Java Edition 1.8+ | No | Java | SWinxy, MCContent |
FILES
/usr/share/mc/mc.hlp
- The help file for the program.
/usr/share/mc/mc.ini
-
The default system-wide setup for GNU Midnight Commander, used only if
the user’s own ~/.config/mc/ini file is missing.
/usr/share/mc/mc.lib
-
Global settings for the Midnight Commander. Settings in this file
affect all users, whether they have ~/.config/mc/ini or not.
/usr/share/mc/syntax/*
-
The default system-wide syntax files for mcedit, used only if
the corresponding user’s own ~/.local/share/mc/mcedit/ file is missing.
~/.config/mc/ini
-
User’s own setup. If this file is present then the setup is loaded
from here instead of the system-wide setup file.
~/.local/share/mc/mcedit/
Настройка Midnight Commander
1. Изменение внешнего вида
Нажимаем F9 и открываем меню Options -> Layout:
Здесь можно изменить такие опции:
- Вид панели (Panel split) — Вертикальный/Горизонтальный;
- Отображение Меню (Menubar) — включить/выключить вверху;
- Отображение Командной строки (Command prompt) — внизу;
- Отображение Быстрых клавиш (Keybar visible);
- Отображение Подсказок (Hintbar visible);
- Отображение Заголовка окна терминала (XTerm window title);
- Отображение свободного дискового пространства (Show free space)
Знак X означает, что опция включена.
С помощью меню Options -> Appearance можно изменить скин файлового менеджера:
Цветовых схем в Midnight Commnader множество, можно выбрать наиболее приятную для своих глаз. Мой любимый скин — nicedark.
В меню Right есть возможность указать, что показывать в правой панели:
Я указал Quick view — быстрый просмотр файлов. Это значит, что при наведении на текстовый файл — в правой панели покажется его содержимое. Очень удобно. Также тут можно указать вывод любой другой информации — например информация о файле, дерево каталогов, листинг и многое другое на свой вкус.
Еще несколько интересных опций находятся в меню Options -> Panel options.
На вкладке Navigation включаем «Lynx like motion» — быстрая навигация по папкам с помощью стрелок влево/вправо на клавиатуре.
На вкладке Main options обязательно включаем «Show backup files», «Show hidden files» и «Auto save panels setups» — автосохранение всех изменений в панели.
На вкладке File highlight — включаем «Permissions» (подсветка прав на файлы и папки).
2. Включаем встроенный редактор MCEDIT
По умолчанию, для редактирования файлов в Midnight Commander используется стандартный редактор Linux — nano (или vim). Но у многих новичков могут возникнуть трудности в их освоении, поэтому лучшим вариантом, на мой взгляд, будет использовать простой и понятный встроенный редактор — mcedit.
Для этого переходим в меню Options -> Configuration и ставим X в опции «Use internal edit», после чего нажимаем ОК:
Теперь немного подстроим редактор под себя. Первым делом включаем отображение нумерации строк (ALT + N) и отключаем отображение пробелов в файле конфигурации Midnight Commander — ~/.config/mc.ini:
3. Настройка автосохранения текущей папки в файловом менеджере
Странно, почему в MC до сих пор нет этой важной опции в настройках. Скопируйте скрипт mc-wrapper.sh в папку /etc/profile.d командой:
Скопируйте скрипт mc-wrapper.sh в папку /etc/profile.d командой:
И добавьте в конец файла /etc/bash.bashrc строку:alias mc=’. /etc/profile.d/mc-wrapper.sh’
Перезалогиньтесь — путь к директории теперь будет запоминаться.
Но, этот «фокус» работает только для пользователей, для «рута», к сожалению, не нашел способов. Насколько знаю, тикет по этому багу был открыт.
Построители карт[]
Имя | Описание | Дата | Версия | Платформы | Ссылки | Последняя совместимая версия | Исходный код | Язык програм-мирования | Автор |
---|---|---|---|---|---|---|---|---|---|
Командная строка. Переписанный Cartograph. Официально поддерживаются Windows- и Linux- сборки, также работает на Mac, но требуется компиляция. | 26 мая 2011 г. | 1.9 | Да, BSD | C++ | udoprog (John-John Tedro) | ||||
u10i |
GUI для c10t, включает в себя одиночную и пакетную обработку данных. | 8 июля 2011 г. | 1.0 | Нет | C# | conker87 (Simon Fletcher) | |||
Другая версия Cartograph. Поддерживаются самые последние обновления и некоторые фиксы ошибок Cartograph’а. Добавлены новые возможности, не исключаю GUI и поддержку модов. | 20 ноября 2011 г. | 2011_11_20 | Ещё нет | C++ (Рендерер), VB (Интерфейс) | Gameslinder | ||||
Отображение карты в реальном времени в игре или в браузере. Режимы дневной свет, лунный свет, пещеры, Нижний мир, и Край. Показывает монстров и игроков, находящихся рядом. Серверные и одиночные миры, не требуется серверный плагин. | 12 апреля 2013 г. | 2.5.0 | Нет | Java, DHTML | techbrew (Mark Woodman) | ||||
Командная строка + Windows GUI. Mcmap Live доступна для Mac GUI. Создаёт JPG или PNG картинку на выбор. | 15 ноября 2013 г. | 2.4.2b | Да | C++ | Zahl | ||||
16 августа 2012 г. | 0.48 | (при замене mcmap.exe из поставки на актуальный) | Да | Python/C# | NotTarts/Zahl | ||||
MCMap Live |
Интерактивный GUI, Xray — карты, и поддержка биомов. | 28 марта 2012 г. | 1.5.1 | Да | Objective-C++ | Donkey Kong | |||
13 декабря 2013 г. | 0.11.53 | Да, GPL | Python/C | ||||||
MinecraftWorldMap.com — это веб-приложение, которое позволяет размещать миры с друзьями или обществом. Просто загрузите мир и карта автоматически построится для Вас! | 29 марта 2011 г. | 1.00 | Нет | perl | skeight | ||||
Minetographer |
Интуитивный интерфейс для создания детализированной, зумируемая карта вашего мира. Рабоает на Tectonicus, Minetographer быстр и прост в использовании. | 27 октября 2011 г. | 0.7.7 | Ещё нет | Java | jakester2 | |||
Быстрый рендер, предусмотренный для больших миров. Поддерживаемые платформы Linux и Cygwin. Нет бинарных файлов; может быть построен из исходников. | 29 марта 2012 г. | 1.1.2 | Да, GPL | C++ | equalpants | ||||
Рендерит высококачественные, зумируемые версии карт, просматривается с помощью Карт Google. Только коммандная строка. Для GUI см. Minetographer. |
15 апреля 2012 г. | 2.08 | Да | Java | OrangyTang | ||||
Простой и быстрый инструмент визуализации карт, предназначенный для эффективного обновления очень больших карт «плитками». | 19 июля 2012 г. | 2011-07-19 | Да | Java | TOGoS |
Chunk tool:
When you pick the Chunk tool, the visible selection is
automatically expanded to cover all of the chunks it touches. Press Create to create all missing chunks in the selection, ignoring any chunks already present.
Press Destroy to remove any chunks within the selection. Use Prune to keep all of the chunks in the selection, and delete the ones outside.
Use Repop to mark chunks for repopulation of ores and structures next time minecraft loads the chunk.
All of these will ask you for confirmation because there’s no way to undo them. Use TAB to get a better view for chunk pruning.
Finally, you can press Relight to fix any bad lighting within the selected chunks. If other programs leave your level full of black spots, you can fix it with this.

Эта тема закрыта для публикации ответов.