Skip to content

Jasspa's Microemacs fork - Text editor with GUI and terminal mode, with syntax highlighting, folding, outlines, abbreviations, own extension language, calendar, games, notes, ...

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
license.txt
GPL-2.0
COPYING

mittelmark/microemacs

Repository files navigation

MicroEmacs             

Extensible Terminal and GUI text editor with Emacs feeling coming as a small, single file executable for Windows, Linux and MacOS.

This is a fork of Jasspa MicroEmacs forked from https://github.com/vitalyster/microemacs.

It contains the following changes:

  • improved terminal mode for suspend-emacs with using alternative terminal buffer (thanks to Steven Phillips)
  • fix for frame resize on X11 if the font changes (thanks to Steven Phillips)
  • easier addition of own user templates with interactive template selection using the command "insert-template"
  • easier font-selection on X11 and easier resize on X11 (Mac and Linux) and Windows
  • so font size increase and decrease using Ctrl-Plus and Ctrl-Minus keys
  • more schemes (themes) Ayu Light and Dracula
  • Markdown mode (folding, template file, syntax hilghlighting, outline in item list, embedding Tcl, Python, R and Dot code in fences with syntax highlight)
  • AppImage for easy install o Linux systems
  • example fonts Chivo Mono, Ubuntu Mono and Courier Prime for better display on X11
  • Linux, Windows, Darwin 20, 21, 22 builds using Github actions
  • Windows builds using cross compilation on Ubuntu with Github actions
  • fix for str_errlist[errno] by replacing it with strerror(errno) on Linux x64 Fedora with gcc 10.3
  • fix for hang on error bug if using the -n command line switch
  • updates on documentation

New important macro commands (see the internal help pages - version v09.12.22):

  • change-font-size can be done as well with key bindings C-Plus and C-Minus
  • X11 only
    • change-font-bold
    • change-font-courier
    • change-font-lucida
    • change-font-type
  • execute-region - for macro development
  • insert-template - easier definition of user templates

Here the Ayu Light theme which is defined in the file schemeal.emf

Here the popular "Dracula" theme which is defined in the file schemedr.emf.

See the folding feature for Markdown, in the image below (Dracula theme) the section build is folded by the indicated three dots:

Compilation

Debian Systems

If you prefer to compile the code yourself here are the required commands for a Debian or Debian derived system like MX Linux, Linux Mint or Ubuntu system:

### install packages
sudo apt install git build-essential libz-dev libxt-dev libncurses-dev
### fetch repo
git clone https://github.com/mittelmark/microemacs.git
cd microemacs
###  builds  mecw  (mew  -  X-Windows)  and  mec  (terminal) executables
make  me-bin 
### builds the bfs executable for making stand-alone me
make bfs-bin     
### makes stand-alone exes with embedded macrofiles (mec-linux.bin/mew-linux.bin)
make me-bfs-linux 

Red Hat Systems

Here the steps required to compile the editor on Red Hat compatible systems like CentOS or AlmaLinux, For Fedora builds replace yum with dnf:

### install make, unzip, gcc
sudo yum install make zip unzip gcc
### download last github code
wget https://github.com/mittelmark/microemacs/archive/refs/heads/master.zip
unzip master.zip
cd microemacs-master
sudo yum install zlib-devel
make bfs-bin       ## build the bfs executable to create standalone ME
sudo yum install libXt-devel ncurses-devel
make me-bin        ## build mecw (mew) and mec executables
make me-bfs-linux  ## build standalone bfs-executables
./mew-linux.bin -V ## check executable
cp mew-linux.bin ~/bin/me ## installiing `me -n` (runs console version)
### for more fonts
sudo yum install xorg-x11-apps ## xfontsel
sudo yum install xorg-x11-fonts* ## Lucidatypewriter and Adobe courier fonts

If you do not want to build these executables yourself you can just download pre-build executables (see below).

Download Prebuild MicroEmacs Executables

There are stand-alone single file executable build for the following platforms (if not mentioned otherwise the build platforms are 64 bit machines):

  • Linux
    • Antix 23 (32bit)
    • Ubuntu 16 (32bit)
    • Ubuntu 18
    • Ubuntu 20
    • Ununtu 22
    • Fedora 30
    • Fedora 38
    • AlmaLinux 8.9 and 9.4

Ubuntu builds should be usable on Debian and derived distros, such as Linux Mint or MX Linux compatible. AlmaLinux builds should be CentOS and RHEL compatible. Fedora builds can be probably only used on Fedora without problems.

  • macOS
    • macOS 11
    • macOS 12
    • macOS 14
  • Windows

Build for other platforms might be provided if requested using the issues link on this repository. The AppImage should work on most Linux platforms.

Release 2024-03-29 (v09.12.23):

OS Platform (X)-Windows Binary Terminal Binary
Linux AppImage AppImage Run AppImage with -n option
Ubuntu 16 (32bit) mewb.zip mecb.zip
Antix 23 (32bit) mewb.zip mecb.zip
Ubuntu 18 mewb.zip mecb.zip
Ubuntu 20 mewb.zip mecb.zip
Ubuntu 22 mewb.zip mecb.zip
Fedora 30 mewb.zip mecb.zip
Fedora 38 mewb.zip mecb.zip
AlmaLinux 8.9 mewb.zip mecb.zip
AlmaLinux 9.4 mewb.zip mecb.zip
macOS macOS 11 mewb.zip mecb.zip
macOS 12 mewb.zip mecb.zip
macOS 14 mewb.zip mecb.zip
Windows Win32/Win64 mewb.zip mecb.zip

Installation of these executables is easy. Make them executable on Unix platforms and move them to a folder belonging to your PATH variable. Windows users should just copy them as well to such a folder.

Release 2023-10-31 (v09.12.21):

Just download an executable for your platform which matches as closely as possible your operatig system. For instance for Fedora 39, you download the binaries for Fedora 38. On Unix systems you make the file executable (chmod 755 filename) and rename it for instance to me, then copy it to a folder belonging to your PATH. Therafter you can run the me executable. The first thing you have to do is to select the right keyboard configuration after starting your first session. Choose teh menu entry "Tools -> User Setup" and then "Keyboard" the Start-Up tab.

The executables linked above come with an embedded American dictionary. To use other dictionaries download the dictionary files for your language from the relase page: https://github.com/mittelmark/microemacs/releases: and place tese files in your personal user folder ~/.jasspa on Linux for instance. Then use "Tools -> User Setup -> Language settings" to switch the dictionary.

BFS executables

The BFS executables can be used to extract the binary and the macro files from the MicroEmacs executables and to build you own executables with other dictionary files, other user templates, or additional macro files. So you can customize your MicroEmacs version.

Here an example on how to do so:

### get the German dictionary files
wget http://www.jasspa.com/spelling/ls_dede.zip
### extract the arcive from the file me-linux.bin
bfs -x jasspa me-linux.bin
### add new spellings
cd jasspa/spelling
unzip ../../ls_dede.zip
### create the new file
bfs -a me-linux.bin ./jasspa -o me-linux2.bin
### test the terminal
MEPATH="" TERM=rxvt ./me-linux2.bin -n

Pros and Cons of Jasspa MicroEmacs

  • Pro:
    • simple single file install
    • small and fast 1-4 MB!! memory footprint
    • support for Linux, MacOS and Windows
    • almost same usage in terminal and GUI mode
    • menu access to use command File, Edit etc commands A-f, A-e in GUI mode or "esc =" in terminal mode
    • internal interactive help system
    • distraction free coding, no popups, no annoying updates - just you and the editor
    • Emacs like shortcuts
    • CUA windows key-bindings as fallback for total newbees
    • standard menu entries on top for beginners who do not yet know all the key bindings of Emacs
    • easy to extend, the file USER.emf is your friend
    • different color themes can be used and changed easily
    • sophisticated macro programming language
    • easy to configure file templates and snippets
  • Cons:
    • No unicode! It is a MICRO-Emacs!
    • No softwrap! Use Esc q for paragraph wrapping! Or use the wrap buffer mode

Links

Build

I currently build on Fedora ad Ubuntu using the file src/linux32gcc.gmk. Other Makefiles you should take from https://github.com/ipstone/microemacs/tree/master/src

To build switch into the src directory and then run the Makefile for your plaform. On my Linux machine I did:

cd src && make -f linux32gcc.gmk

Which then produces in the folder .linux32gcc-release-mecw the required executable.

I as well cross compile on my Linux systems for Windows. You can do the same assuming that you have installed on your Linux system the mingw32 gcc compiler and the required tools. The you can do this:

cd src && make -f win32mingw.mak CC=i686-w64-mingw32-gcc RC=i686-w64-mingw32-windres
cd src && make -f win32mingw.mak CC=i686-w64-mingw32-gcc RC=i686-w64-mingw32-windres BTYP=c

Which then produces in the folder .win32mingw-release-mew and -mec the required executables.

If you place the file zlib1.dll and eventuall the file dssp-0.dll in the same folder as the executable that file should be run using wine directly on a Linux system. To check the executable on Linux using wine you do something like this:

MEPATH=Z:/home/username/workspace/microemacs/jasspa/macros wine ~/path/to/mew32.exe

You can as well create an alias to shorten the command line.

Terminal issues

Menu access

The menu access is usually available using the F1 key, but sometimes this does not work as it is already bound by the terminal to some other function. As an alternative you can use the key binding "Esc =" to access the main menu on top.

Backspace key

The backspace key for some terminals is not mapped to delete the last caracter, you might use instead C-h to delete the last character.

Color issues

As the capabilities of Terminals differ widely MicroEmacs starts usually in black/white mode in the terminal. You can set this to color mode by selecting the "Tools -> User Setup -> Platform" Termcap option. If this does not work you might in addition declare the terminal type before starting me like so: TERM=rxvt me -n given me is you executable that could be as well defined as an alias in your .bashrc file for instance like this:

### .bashrc
alias mec="TERM=rxvt me -n"

Windows Terminal

I usually recommend the Msys2 environment for developers if they have to use the Windows operating system. As the provided Windows build is a native Windows build, the console version of Me09 must be started via the cmd Terminal on Windows. You should use in this case an alias like this in your .bashrc

### add this to your .bashrc
### we assume that you copied the windows executables
### to the bin folder in your msys HOME
function me {
    if [ $1 == "-n" ]; then
        ## running terminal version
        shift 1
        cmd //C `cygpath -wa ~/bin/mec-windows.exe` "${@}"
        
    else
        `cygpath -wa ~/bin/mew-windows.exe` "${@}" &
    fi
}

For cygwin like environments like MobaXterm the following did work:

### add this to your .bashrc
function me {
    if [ $1 == "-n" ]; then
        shift 1
        MPATH=`cygpath -wa ~/bin/mec-windows.exe`
        MPATH=`echo $MPATH | sed 's.\\\./.g'`
        # MobaXterm fix
        if [ ! command -v conin &> /dev/null ]
        then
            # no conin try this
            cmd //C $MPATH "${@}"
        else
            conin cmd /C $MPATH "${@}"
        fi
    else
        ~/bin/mew-windows.exe "${@}" &
    fi
}

In case you are interested there might be a chance to create "native" Cygwin and Msys builds. Please create an issue a the Github page.

Original README

Here the link to the original Jasspa MicroEmacs README.

Links

License

MicroEmacs is released with the GPL, see the file license.txt and COPYING.

EOF

About

Jasspa's Microemacs fork - Text editor with GUI and terminal mode, with syntax highlighting, folding, outlines, abbreviations, own extension language, calendar, games, notes, ...

Topics

Resources

License

Unknown, GPL-2.0 licenses found

Licenses found

Unknown
license.txt
GPL-2.0
COPYING

Stars

Watchers

Forks

Packages

No packages published