Command Palette, Cheatsheet, Run and Make - New Micro Editor Plugins

I published three new plugins for Micro editor this week

  • Palettero - Command palette
  • Run - Run a file & 'make' the whole project
  • Cheat - cheatsheet for current language

You can install them all today.

Easier Coding

These are plugins for Micro editor, a TUI (text user interface) programmers editor.

Palettero shows a command palette. Press Alt-Ctrl-Space to show the palette, type to fuzzy search, enter to select. Enter to run, or edit the command. Supports all Micro builtin commands and help files. Has a toolbox of addional textfilters. Supports

  • All built-in commands in Micro
  • All built-in help documents in Micro
  • 16 ready made textfilters to automatically modify your selection: split to lines by comma, base64, rot13, remove empty lines, urldecode, hard wrap...
  • Write your own presets with 'editmenu' command

Run Run a file & 'make' the whole project. F5 execute current file, F12 to 'make' project, F9 'make' in background. Supports

  • Python
  • Go (Golang)
  • HTML (show in Firefox ESR)
  • Lua
  • Executable file (shebang "#!")
  • Makefile (build your whole project, also from subdir)

Cheat - F1 shows cheatsheet for current language. If you're editing Python, you get Python cheatsheet. If you're editing Go, you get Golang cheatsheet. Supports

  • Python
  • Go (Golang)
  • Lua
  • Javascript
  • CSS
  • HTML and HAML.
  • and many others...

Jump - Jump to any function, class or heading with F4. Go, Markdown, Python, C... (+40 others). This one I published already in 2021, and it's part of the official plugin channel. You can install it with 'micro --plugin install jump'.

About Micro Editor

Micro editor is a TUI (text user interface) programmer's editor. Micro is quite intuitive even if you're from GUI (graphical user interface) world. Ctrl-S saves, Ctrl-Q quits. Shift-Up and shift-down select. You can indent and deindent selection with tab and shift tab. You can install it with 'sudo apt-get update; sudo apt-get -y install micro'. It's also available for lesser operating systems, such as Windows and Mac.

See also: More articles on Micro-editor.

Screenshots

Run plugin

Run plugin - screenshot

Palettero - command palette

Palettero - command palette - screenshot

Cheat - context sensitive cheatsheets

Cheat - context sensitive cheatsheet plugin - screenshot

Install

You can install them all right now. These instructions are for Debian, but the plugins probably work on any Linux. Prerequisites and recommended packages

$ sudo apt-get update
$ sudo apt-get -y install micro fzf pythonpy git exuberant-ctags

Plugins

$ micro --plugin install jump
$ cd $HOME/.config/micro/plug/
$ git clone https://github.com/terokarvinen/palettero.git
$ git clone https://github.com/terokarvinen/micro-run.git
$ git clone https://github.com/terokarvinen/micro-cheat.git
$ cd $HOME

Try all four plugins

Try Cheat

$ micro tero.py

Press F1 and Python cheatsheet appears in a new tab. Press Ctrl-Q to close it.

Try Palettero Command Palette

Press Alt-Ctrl-Space to open command palette. Type to fuzzy search "search plugin". Select "plugin search jump..." and press enter twice to run it. A bottom split window opens and shows some details of the jump plugin. Press Ctrl-Q to close it.

For any of the "textfilter" commands, select some text with Shift-Up, then run a textfilter to modify it.

Try Run

Write some Python code to your file:

print("Hello, Tero!")

Run it with F5. You'll see the output "Hello, Tero!". Press Enter to close the output.

Run plugin also supports Makefile. You can also compile your project with 'make' when you're editing a file in one of the subdirectories of your project.

Try Jump to Move Between Functions

Write some more advanced Python code

def square(side):
	return side*side

def foo():
	return "foo"

print(square(2))
print(foo())

Press F4. Type "foo" and press enter to jump to function "foo()". Cursor is now placed on the line where the function is defined, "def foo()".

Well done, you have installed the plugins!

Adminstrivia

This article has been updated after publishing.

Micro editor logo is the property of its owner.

Next >> Learn more micro.