MCedit
From FrugalWiki
Dansk – Deutsch – English – Español – Français – Indonesia – Italiano – Lietuviškai – Magyar – Nederlands – Polski – Português – Română – Slovenský – Suomi – Svenska – Türkçe – Česky – Ελληνικά – Български – Русский – Српски – Українська – עברית – ไทย – 日本語 – 正體中文 – 简体中文 – 한국어
Contents |
MCEdit
Not a standalone program, it is the built-in text editor of Midnight Commander. Can be invoked from Midnight Commander with the Edit command ( F4 ) or directly from the command line with mc -e or mcedit symlink to mc.
Features
- Syntax highlighting ( own simple rules )
- User commands ( shell script snippets )
- User defined key bindings
Installation
Documentation
The User menu ( F11 ) contains commands described in the first found menu file :
- .cedit.menu ( local )
- ~/.mc/cedit/menu ( user )
- /etc/mc/cedit.menu ( global )
Comment / uncomment block
/ Comment / Uncomment declare -A cl=( ['c']='//' ['h']='//' ['pas']='//' ['sql']='--' ['lua']='--' ) c="${cl[%x]:-#}" read s < '%b' [[ "${s:0:${#c}}" == "$c" ]] && e="s,^$c,," || e="s,^,$c," sed -i "$e" '%b'
Trim trailing whitespaces
t Trim Trailing Whitespaces sed -r -i 's/\s+$//' '%b'
To lowercase
l To Lowercase perl -pi -e '$_=lc' '%b'
Links
No dedicated site, the following links refer to Midnight Commander itself :
- http://midnight-commander.org/ Official site
- http://en.wikipedia.org/wiki/Midnight_Commander Wikipedia article
- http://frugalware.org/packages/371 Frugalware package