theold190 / zaMena

Tiny Far Manager Macros
1 stars 0 forks source link

Brief This is a tiny collections of macroses for FarManager. More info about FarManager you can find on http://farmanager.com. Some other macros are located on http://code.google.com/p/far-macro-library/.

Description BackupFileFromEditor - A macros that creates a copy of a file that is currently displayed in editor. Just press Ctrl+Shift+B and an a copy with .bakX (where X is a number) will be created.

BackupFileFromShell - A macros that creates a copy of a file that is under the 
cursor on a file panel. Just press Ctrl+Shift+B and an a copy with .bakX (where X 
is a number) will be created.

CommentBlock - A macros that wraps/unwraps selected code in "/* */" multiline 
comment. Select lines to comment and type '*' (star) key.

CommentLines - A macros that wraps/unwraps selected code in "//" line 
comment. Select lines to comment and type '/' (slash) key.

GlobalVars - A collection of mini-macroses used by macros. Most of 
them could be used separately from this macros collection.

ShowHideEditor - A macros that allows you immediately to switch between an editor 
and a file panel. Just press Ctrl+Shift+M.

IndentBlock - A macros that allows to do some simple formatting of the 
selected code block. Select block to format (starting with '{' and ending 
with '}') and press 'i' key;

ReopenFile - A macros that allows to re-open in editor a last closed 
file. Open a file in editor, exit with Esc button, then press 
Ctrl+Shift+Z in a file panel to re-open it.

ShiftBlock - A macros that allows to shift selected code to the 
right/left. Select lines to shift and press a Tab/Shift+Tab key combination 
to shift code to the right/left.

TrimRight - A macros that allows to remove trailing whitespaces from 
a selected code block. Select lines to trim and press a Space key.

Installation To install a macros run a GlobalVars.reg and a corresponding .reg from a reg folder. To install all macroses at once just run install.reg file. Restart FarManager and give a try to new macro-feature. Tested on FarManager version 2.0.1777 with "Expand newly entered tabs to spaces" option enabled.

Uninstallation To uninstall all macroses you can run uninstall.reg. Or you can manually modify corresponding section of the registry (using regedit utility).

Testing There are some code examples in a tests folder. You can use them to get an idea of macroses functionality.