Show Menu
Cheatography

micro editor Keyboard Shortcuts by

Short descriptions of some types of govt.

micro editor

micro editor

Readme

Official site: https:­//m­icr­o-e­dit­or.g­it­hub.io

Installing under Windows:
scoop install micro
choco install micro

Plugins: https:­//m­icr­o-e­dit­or.g­it­hub.io­/pl­ugi­ns.html

Prebuilt binaries for different platforms:
https:­//g­ith­ub.c­om­/zy­edi­dia­/mi­cro­/re­leases

Help

What is micro?
It's a modern intuitive terminal text editor.
How to install it in mac?
brew install micro
How to install it in linux with snap?
snap install micro --classic
How to install it in openBSD?
pkg_add -v micro

Docume­ntation

Commands

quit
Quits micro
save filename?
Saves the current buffer. If the filename is provided it will 'save as' the filename.
replace "­sea­rch­" "­val­ue" flags
Replace search with value
replaceall "­sea­rch­" "­val­ue"
This will replace search with value without user confir­mation.
show option
shows the current value of the given option.
vsplit filename
opens a vertical split with filename. If no filename is provided, a vertical split is opened with an empty buffer.
hsplit filename
same as vsplit but opens a horizontal split instead of a vertical split.
tab filename
opens the given file in a new tab.
tabswitch tab
This command will switch to the specified tab. The tab can either be a tab number, or a name of a tab.
log
opens a log of all messages and debug statem­ents.
plugin install pluginName
installs the given plugin.
plugin remove pluginName
removes te given plugin
plugin list
lists all installed plugins.
plugin update
updates all installed plugins.
plugin available
list plugins available for download (this includes any plugins that may be already instal­led).
plugin search pluginName
searches for the given plugin. Note that you can find a list of all available plugins at github.co­m/m­icr­o-e­dit­or/­plu­gin­-ch­annel.
reload
reloads all runtime files.
retab
Replaces all leading tabs with spaces or leading spaces with tabs depending on the value of tabsto­spaces.

Options

Options
Default Value
Descri­ption
autoclose
true
automa­tically close {} () [] "­" ''. Provided by the autoclose plugin
autoindent
true
when creating a new line use the same indent­ation as the previous line.
autosave
false
micro will save the buffer every 8 seconds automa­tic­ally. Micro also will automa­tically save and quit when you exit without asking.
basename
false
in the infobar, show only the basename of the file being edited rather than the full path.
colors­cheme
default
loads the colors­cheme stored in $(conf­igD­ir)­/co­lor­sch­eme­s/o­pti­on.m­icro, This setting is global only.
cursorline
true
highlight the line that the cursor is on in a different color (the color is defined by the colors­cheme you are using).
eofnewline
false
micro will automa­tically add a newline to the file.
fileformat
unix
this determines what kind of line endings micro will use for the file. UNIX line endings are just \n (lf) whereas dos line endings are \r\n (crlf). The two possible values for this option are unix and dos.
ignorecase
false
perform case-i­nse­nsitive searches.
indentchar
 
sets the indent­ation character.
infobar
true
enables the line at the bottom of the editor where messages are printed. This option is global only.
linter
true
Automa­tically lint when the file is saved. Provided by the linter plugin.
keymenu
false
display the nano-style key menu at the bottom of the screen.
mouse
true
whether to enable mouse support
plugin­cha­nnels
contains all the channels micro's plugin manager will search for plugins in.
rmtrai­lingws
false
micro will automa­tically trim trailing whites­paces at eol.
ruler
true
display line numbers.
savecursor
false
remember where the cursor was last time the file was opened and put it there when you open the file again.
savehi­story
true
remember command history between closing and re-opening micro.
saveundo
false
when this option is on, undo is saved even after you close a file so if you close and reopen a file, you can keep undoing.
scrollbar
false
display a scroll bar
smartpaste
true
should micro add leading whitespace when pasting multiple lines? This will attempt to preserve the current indent­ation level when pasting an unindented block.
softwrap
false
should micro wrap lines that are too long to fit on the screen.
statusline
true
display the status line at the bottom of the screen.
matchbrace
false
highlight matching braces for '()', '{}', '[]'
syntax
true
turns syntax on or off.
tabsize
4
sets the tab size to option
tabsto­spaces
false
use spaces instead of tabs
termtitle
false
defines whether or not your terminal's title will be set by micro when opened.

Keybin­dings

Bindings
Command
Bindings
Command
^Q
Quit
F4, F10
Quit
^G
toggle Help
F1
toggle Help
^S
Save
F2
Save
^Z
Undo
^Y
Redo
^F
Find
F3, F7
Find
^N
FindNext
^P
FindPr­evious
MouseW­heelUp
ScrollUp
MouseW­heelDn
ScrollDown
Esc
Escape
MouseM­iddle
PasteP­rimary
Alt-a
Start of line
Alt-e
End of line
Alt-f
WordRight
Alt-b
WordLeft
                           
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Sublime Text 2 Windows Keyboard Shortcuts
          Wikipedia Cheat Sheet
          mpv Media Player Keyboard Shortcuts

          More Cheat Sheets by pryl

          ne (nice editor) Keyboard Shortcuts
          Types of Governments Cheat Sheet
          Sorting algorithms Cheat Sheet