Mcedit

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/

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.

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).

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.

Options

Options~/.mc/ini

use_internal_edit
This option is ignored when invoking mcedit.
editor_tab_spacing
Interpret the tab character as being of this length. Default is 8. You should avoid using other than 8 since most other editors and text viewers assume a
tab spacing of 8. Use editor_fake_half_tabs to simulate a smaller tab spacing.
editor_fill_tabs_with_spaces
Never insert a tab space. Rather insert spaces (ascii 20h) to fill to the desired tab size.
editor_return_does_auto_indent
Pressing return will tab across to match the indentation of the first line above that has text on it.
editor_backspace_through_tabs
Make a single backspace delete all the space to the left margin if there is no text between the cursor and the left margin.
editor_fake_half_tabs
This will emulate a half tab for those who want to program with a tab spacing of 4, but do not want the tab size changed from 8 (so that the code will be
formatted the same when displayed by other programs). When editing between text and the left margin, moving and tabbing will be as though a tab space were 4,
while actually using spaces and normal tabs for an optimal fill. When editing anywhere else, a normal tab is inserted.
editor_option_save_mode
Possible values 0, 1 and 2. The save mode (see the options menu also) allows you to change the method of saving a file. Quick save (0) saves the file by
immediately, truncating the disk file to zero length (i.e. erasing it) and the writing the editor contents to the file. This method is fast, but dangerous,
since a system error during a file save will leave the file only partially written, possibly rendering the data irretrievable. When saving, the safe save
(1)
option enables creation of a temporary file into which the file contents are first written. In the event of an problem, the original file is untouched.
When the temporary file is successfully written, it is renamed to the name of the original file, thus replacing it. The safest method is create backups
(2)
. Where a backup file is created before any changes are made. You can specify your own backup file extension in the dialog. Note that saving twice will
replace your backup as well as your original file.
editor_word_wrap_line_length
line length to wrap. 72 default.
editor_backup_extension
symbol for add extension to name of backup files. Default «~».
editor_line_state
show state line of editor now it show number of file line (in future it can show things like folding, breakpoints, etc.). M-n toglle this option.
editor_visible_spaces
Toggle show visible trailing spaces (TWS), if editor_visible_spaces=1 TWS showed as ‘.’
editor_visible_tabs
Toggle show visible tabs, if editor_visible_tabs=1 tabs showed as ‘<—->’
editor_persistent_selections
Do not remove block selection after moving the cursor.
editor_cursor_beyond_eol
Allow moving cursor beyond the end of line.
editor_syntax_highlighting
enable syntax highlighting.
editor_edit_confirm_save
show confirm dialog on save.
editor_option_typewriter_wrap
to be described
editor_option_auto_para_formatting
to be described
editor_option_save_position
save file position on exit.
source_codepage
symbol representation of codepage name for file (i.e. CP1251, ~ — default).
editor_wordcompletion_collect_entire_file
Search autocomplete candidates in entire of file or just from begin of file to cursor position (0)

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.

Редактор

F4 (в редакторе) — поиск с заменой

F6 (в редакторе) — поиск с помощью регулярного выражения

Shift-Del (в редакторе) — удалить блок (и положить его в clipboard)

Shift-Ins (в редакторе) — вставить блок из буфера (работает даже в другой консоли!!!) Можно редактировать два и более файлов на разных консолях и гонять блоки между ними.

Shift+F3 — Начать выделение блока текста. Повторное нажатие F3 закончит выделение

Shift+F5 — Вставка текста из внутреннего буфера обмена mc (прочитать внешний файл)

Meta+i — Переключение режима «Автовыравнивание возвратом каретки», удобно при вставке отформатированного текста из буфера обмена

Meta+l — Переход к строке по её номеру

Meta+q — Вставка литерала (непечатного символа).См. таблицу ниже

Meta+t — Сортировка строк выделенного текста

Meta+u — Выполнить внешнюю команду и вставить в позицию под курсором её вывод

Ctrl+f — Занести выделенный фрагмент во внутренний буфер обмена mc (записать во внешний файл)

Ctrl+k — Удалить часть строки до конца строки

Ctrl+n — Создать новый файл

Ctrl+s — Включить или выключить подсветку синтаксиса

Ctrl+t — Выбрать кодировку текста

Ctrl+u — Отменить действия

Ctrl+x — Перейти в конец следующего

Ctrl+y — Удалить строку

Ctrl+z — Перейти на начало предыдущего слова

Meta+Enter — Диалог перехода к определению функции

Meta+- — Возврат после перехода к определению функции

Meta++ — Переход вперед к определению функции

Meta+n — Включение/отключение отображения номеров строк

tab Отодвигает вправо выделенный текст, если выключена опция «Постоянные блоки»

Meta-tab Отодвигает влево выделенный текст, если выключена опция «Постоянные блоки»

Shift+Стрелки Выделение текста

Meta+Стрелки Выделение вертикального блока

Meta+Shift+- Переключение режима отображения табуляций и пробелов

Meta+Shift++ Переключение режима «Автовыравнивание возвратом каретки»

Теги: bash,linux,mc

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.

OPTIONS

Options~/.config/mc/ini

use_internal_edit

This option is ignored when invoking
mcedit.

editor_tab_spacing

Interpret the tab character as being of this length.
Default is 8. You should avoid using
other than 8 since most other editors and text viewers
assume a tab spacing of 8. Use
editor_fake_half_tabs

to simulate a smaller tab spacing.

editor_fill_tabs_with_spaces

Never insert a tab character. Rather insert spaces (ascii 32) to fill to the
desired tab size.
editor_return_does_auto_indent

Pressing return will tab across to match the indentation
of the first line above that has text on it.
editor_backspace_through_tabs

Make a single backspace delete all the space to the left
margin if there is no text between the cursor and the left
margin.
editor_fake_half_tabs

This will emulate a half tab for those who want to program
with a tab spacing of 4, but do not want the tab size changed
from 8 (so that the code will be formatted the same when displayed
by other programs). When editing between text and the left
margin, moving and tabbing will be as though a tab space were
4, while actually using spaces and normal tabs for an optimal fill.
When editing anywhere else, a normal tab is inserted.
editor_option_save_mode

Possible values 0, 1 and 2. The save mode (see the options menu also)
allows you to change the method of saving a file. Quick save (0) saves
the file immediately, truncating the disk file to zero length (i.e.
erasing it) and then writing the editor contents to the file. This
method is fast, but dangerous, since a system error during a file save
will leave the file only partially written, possibly rendering the data
irretrievable. When saving, the safe save (1) option enables creation
of a temporary file into which the file contents are first written. In
the event of a problem, the original file is untouched. When the
temporary file is successfully written, it is renamed to the name of the
original file, thus replacing it. The safest method is create backups
(2): a backup file is created before any changes are made. You
can specify your own backup file extension in the dialog. Note that
saving twice will replace your backup as well as your original file.
editor_word_wrap_line_length

Line length to wrap at. Default is 72.
editor_backup_extension

Symbol to add to name of backup files. Default is «~».
editor_line_state

Show state line of editor. Currently it shows current line number (in the future
it might show things like folding, breakpoints, etc.). M-n toggles this option.
editor_visible_spaces

Toggle «show visible trailing spaces». If editor_visible_spaces=1, they are shown
as ‘.’
editor_visible_tabs

Toggle «show visible tabs». If editor_visible_tabs=1, tabs are shown as ‘<—->’
editor_persistent_selections

Do not remove block selection after cursor movement.
editor_cursor_beyond_eol

Allow moving cursor beyond the end of line.
editor_cursor_after_inserted_block

Allow moving cursor after inserted block.
editor_syntax_highlighting

enable syntax highlighting.
editor_edit_confirm_save

Show confirmation dialog on save.
editor_option_typewriter_wrap

to be described
editor_option_auto_para_formatting

to be described
editor_option_save_position

save file position on exit.
source_codepage

symbol representation of codepage name for file (i.e. CP1251, ~ — default).
editor_group_undo

do UNDO for several of the same type of action (inserting/overwriting,
deleting, navigating, typing)
editor_wordcompletion_collect_entire_file

Search autocomplete candidates in entire of file or just from
begin of file to cursor position (0)
spell_language

Spelling language (en, en-variant_0, ru, etc) installed with aspell
package (a full list can be get using ‘aspell’ utility).
Use
spell_language = NONE

to disable aspell support. Default value is ‘en’. Option must located
in the section.

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
Menu File Edit

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

If some keys don’t work, you can use
Learn Keys

in the
Options

menu.

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.

Командная строка

ctrl-a — курсор в начало

ctrl-e — курсор в конец

esc-! — выполнить команду с параметрами

ctrl-x, p или alt+a — вставить имя каталога

esc, enter; ctrl-enter — послать текущий объект в командную строку

ctrl-x,t — Вставка всех выделенных объектов в командную строку

esc, tab — дополнение команды

alt-a — вставить текущий каталог в командную строку

Alt-TAB (ESC+TAB) — Крутейшая комбинация для поиска загружаемых файлов (например, вы забыли как правильно пишется: netcfg или netconfig. Достаточно набрать в командной строке net и нажать Alt-TAB — вам сразу покажут что можно запустить, которое начинается со слова net) нажимать два раза!alt-shift-! — вывод результата командыctrl-shift-v — вставка из буфера обмена

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

Minecraft Land Generator

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

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 .

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.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector