
Micro: Modern and intuitive terminal-based text editor - ingve
https://micro-editor.github.io/
======
SanchoPanda
If you are a sublime person, micro is your terminal based editor. Built in
sublime style multi-line editing, built in super simple plugin management,
intuitive tabs and splits, keyboard shortcuts you are familiar with, clipboard
works across apps, shifting the current line up or down one line at a time
visually (bubbling I think it's called) etc.

Features that require plugins in sublime also come standard and are incredibly
useful, like using it as part of a pipeline or my single favorite editor
feature of textfilters, like the sublime filterpipes plugin. Meaning if I know
how to do something using a regular cli tool, you just do that without having
to do it in some new way. For me that means I can use Micro as an interactive
front end for xsv for giant csv files of questionable provenance which require
some hand fixing as well as some large scale transformation.

Since 2.0, the stability on enormous files has also been off the charts great.
It will open and be ready to work on 1gb+ text files faster than wc can tell
you how long they are.

Anyway, as you may have noticed, I am an enormous micro fanboy, sorry not
sorry.

~~~
ianwalter
I don't see it (other than the color scheme). It doesn't come with a file
manager or typeahead for the command interface. I've already hit a
showstopping bug just trying to save a file. It's been a while since I was
actively using Sublime but it doesn't feel like it at all.

It looks promising though. I would love for it to become feature-rich and
replace the mess that is vim.

~~~
thayne
> I would love for it to become feature-rich and replace the mess that is vim

I'll admin vim has problems, but unless it supports vim-style keybindings and
modal editing, it's not going to replace vim (there is an issue for that
though
[https://github.com/zyedidia/micro/issues/643](https://github.com/zyedidia/micro/issues/643))

~~~
daeluk
Hey if I may suggest a different editor to you then:
[https://github.com/martanne/vis](https://github.com/martanne/vis) It is vi
like and combines modal editing with a cool regex command language (based on
sam) and multiple selections. I've been using it as my daily driver for about
two years now and it's been just great so far.

~~~
thayne
vis looks really interesting. It looks like it has a lot of potential, and
fixes a lot of my gripes with vim (like non-posix regexes), but both the core
application and the ecosystem don't seem very mature yet. I'll definitely give
it a try, and maybe contribute but I'm doubtful I'll be able to use it as my
main editor.

~~~
daeluk
That's definitely a fair point. I just like to point it out to people, since
it's flying under the radar quite often. I think it has a lot of the right
ideas about what text editing should look like, and there are plans for some
really exciting stuff in further develpment (like a client/server architecture
and a language agnostic rpc interface).

------
kylebarron
I've used micro for years and I love it because it's feature-ful on local and
remote servers without needing to learn vim or emacs. And much more user
friendly than nano. I've recommended it to a few dozen people

~~~
giancarlostoro
Might give it a try. Been using ne or Nice Editor when I cant be bothered with
any of the usual ones. I have used them all and know enough to move around at
least. It all depends on the system I am on.

The one benefit Emacs has always had is you can configure it once and edit
files over SSH on any system. Not many other editors have this level of
editing.

------
caribousoup
Beware: micro sometimes inserts invisible characters into your files. I never
figured out why, and it seemed to only be on Debian.

I lost 2 days to troubleshooting weird problems, until less revealed some
configs had little droppings of random text sprinkled throughout. I opened
them with micro and everything looked fine... then I opened them with nano and
I could see and remove the extra characters.

Micro has a great user interface, really. I wish that I could use it, but I
don't think it's wise and I will stick with standard nano for quick edits.

~~~
zyedidia
Do you remember what version that issue happened on? Were you using unicode
characters or a non-UTF8 encoding? That sounds like an annoying issue and it
would be great to fix it.

~~~
caribousoup
This was in 2018, not sure which version. UTF-8 across the board.

I don't remember the details, unfortunately. I think there was a pattern to
it, like they were control characters or something. But it silently inserted
them, and they were not visible within the editor, but they were visible in
nano/less/etc.

~~~
zyedidia
Did they just appear as space characters, or did they actually not take up any
cells in the editor? Currently some non-displayable characters are rendered as
spaces, which is not ideal. I will look into displaying non-displayable
characters in a special way (perhaps as `^@`, similar to how Vim does it, or
with �, which is meant for this purpose).

~~~
caribousoup
I think they were appended to the end of each line, so unfortunately that
would make it non-obvious that something was there. If they were rendered as
spaces that would explain not being able to see it. Displaying them as � would
be an improvement.

Again, this was awhile ago, but I don't think they were single characters, it
was a sequence of characters.

~~~
superchink
Is it possible that it was a matter of changing the line endings? Some
applications can be quite sensitive to different line endings… sounds
suspiciously like that?

[https://en.m.wikipedia.org/wiki/Newline](https://en.m.wikipedia.org/wiki/Newline)

------
pbsds
I have a love-hate relationship with `micro`:

When it works i love it. I have used it as my go-to editor for at least the
last 2 years for quick edits and remote development. It is distributed as a
static binary you can put in your `~/.local/bin`, making it is easy to install
on systems you don't have admin access to. It has decent syntax-highlighting,
lots of themes, easy to configure and has a very gentle learning curve. I'd
say micro is a better alternative to nano for beginner, with the exception
that nano works better in more limited terminals like putty and cmd.

However, at times it simply stops being able to access the X clipboard. It
doesn't support code folding. And after longer sessions it seems to run out of
space on the LUA stack. (Some lua calls don't properly clear the stack when
done it seems, though I haven't seen this yet on v2.0). I bring with me my
keybindings everywhere, since they seem to have swapped around CTRL and ALT
for word navigation and for moving lines of text, (This decision might be due
to limitations in some terminal emulators). There is also a history of
inactivity of the main author, leaving many PRs ignored for long stretches of
time. Some are over a year old and has seen no feedback from the main author.

~~~
omegabravo
I just tested it, and it uses ctrl+left, ctrl+right to navigate words - which
is the same on most interfaces of linux and windows. I'm not sure if it's
reversed for you, or you're expecting the opposite behaviour

~~~
tomsmeding
If I remember correctly, on osx/macos, the relevant keybinding uses
alt-{left,right}. GP might be referring to that.

------
vngzs
Great! Maybe this will serve as an introduction to terminal editors for people
who otherwise stray from the more advanced variety (Emacs, Vim).

But I wish people would stop distributing apps via `curl | bash`. It has a
number of pitfalls[0] beyond security (there's a case to be made that it's no
worse than the alternative on that metric), like the potential to execute an
incomplete script download. We should encourage people to download the script
first, or at least wrap logic in a shell function and verify a GPG signature
on the payload.

[0]: [https://sandstorm.io/news/2015-09-24-is-curl-bash-
insecure-p...](https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-pgp-
verified-install)

------
saagarjha
From the about page:

> As the name indicates, micro aims to be somewhat of a successor to the nano
> editor by being easy to install and use in a pinch, but micro also aims to
> be enjoyable to use full time, whether you work in the terminal because you
> prefer it (like me), or because you need to (over ssh).

Personally, as someone who uses nano a fair bit, this really doesn’t hit many
of the reasons why I use it in the first place. It’s much less “standard” and
depends on a language that is not readily available on preinstalled on many
platforms (like it or not, C is everywhere and comes “for free”). I’m not
seeing many additional features compared to nano, either. And a bit of a
personal preference: nano’s keybindings sorta match readline/Emacs/Cocoa, so
it works a lot better with my muscle memory.

~~~
zaarn
Well, you don't need to install a compiler for it if your distro ships it (and
there is a fully static binary that should just work right about everywhere)

~~~
saagarjha
I use computers I can’t install a Go toolchain fairly often, either because I
don’t have permission to do so or Go isn’t really supported for the platform.

~~~
em500
No need to compile it yourself, for most common platforms you can download
static binaries:
[https://github.com/zyedidia/micro/releases/tag/v2.0.4](https://github.com/zyedidia/micro/releases/tag/v2.0.4)

~~~
saagarjha
That list is sadly a bit short :(

~~~
jagger27
Genuinely curious what’s missing.

~~~
saagarjha
I sometimes need to do work on niche and/or cursed platforms: iPhone, Linux
2.something for MIPS, a semi-functional Linux reimplementation, … Finding a Go
toolchain for these is not easy, if it exists at all, but one for C with the
right set of libraries (as far as I am aware, just ncurses?) if it didn't
already ship with the OS or was available in some prebuilt form is not nearly
as hard.

------
nicoburns
Micro is excellent as a git commit editor. You don't have to leave your
terminal, and you have full mouse support if you want to go back and change
something.

------
kart23
Looks nice. Being able to use the mouse to select and navigate text is huge
for new and old terminal users. Theres a huge gap between nano and vim, and
this is a good fit. Good defaults are important for first impressions and
keeping users, and micro seems to be fully aware of that.

------
neves
Excellent. Exactly what I wanted: a small static editor that I can leave in my
home dir and use in any weird docker image or small server. Common commands
like ctrl-s to save, and no modes.

~~~
Narishma
It's not exactly small, for a text editor. It's two orders of magnitude bigger
than nano, for example.

~~~
idbehold
To be fair, it should be three orders of magnitude bigger.

------
pastelsky
Have aliased micro to `mi`, so I don't have any excuse to use vi / nano over
it. And frankly, it's just works — syntax highlighting, intuitive shortcuts,
good input controls.

~~~
mbreese
And here I would have thought "mu" would have been the preferred short name...

------
red_admiral
Looks great! It seems to me like it's somewhere along the path from nano to
vim/emacs, possibly at a sweet spot where there's a niche in the market.

------
maitredusoi
Do you know if it exists a perfect combination of vim + nano?

As a vim first user, that is what my wait is now only for.

Hope that some days someone creates "milli" that combines both ;)

~~~
Icathian
Those two tools seem very different, I'm not sure what a combination of them
would be. Would it be a modal editor? Would it support the shell functionality
vim has? Would it allow plugins? It's like asking about the perfect
combination of a bike and a plane.

Serious question, btw. I'm genuinely curious what you think a combination
would look like.

~~~
SanchoPanda
I'll take a crack at it. It would be vim under the hood but big changes to the
defaults in favor of first time users over experienced users to allow using it
for basic features wihout knowing ANY of the eccentricities or history of
terminal based editors or even modal editors. As a starting point, think evim
defaults which smothly allow you into regualr vim when you are ready or feel
like it.

Vim does things that I can't imagine many other editors doing, and the pletora
of less obvious features like editing over ssh, vimdiff, TOhtml, print to PS,
etc are just lovely.

Many would never learn those features at all, and power uers would be less
likely to develop, but that seems like a starting point.

As a bonus for all you experienced vimmers, if you want to feel the real
excitement of learning how to use an untuitive new tool, like back when you
were green, open up easy vim in a terminal.

    
    
        vim -y
    

Now exit after writing something.

~~~
Icathian
That makes sense to me. I only picked up vim a couple years ago and just bit
the bullet and bought Practical Vim because I was drowning. Easier defaults,
or a 'beginner mode' seem like a perfectly reasonable evolution.

Thanks!

------
gravypod
Has someone built an LSP frontend for this editor? I'd be really interested in
it since I mainly use nano but I'd like to add auto completions.

~~~
_-david-_
It doesn't look like it, but there is an issues asking for it:
[https://github.com/zyedidia/micro/issues/1138](https://github.com/zyedidia/micro/issues/1138)

------
brutt
Previous discussion:
[https://news.ycombinator.com/item?id=15360509](https://news.ycombinator.com/item?id=15360509)

------
mercer
Sadly no Vim keybindings plugin ;)

~~~
bscphil
Seriously, though. I do like the simplicity and the overall approach, support
for the mouse, and so on. I would use this. But I don't know if I can give up
mode based editing... need to delete 3 lines? d3d. Search with /string. Get
the next result with n. It's just so much faster than learning a million
modifier keys. Maybe there's room for something in between this and Vim?

~~~
jotaf
Just to play devil's advocate, these 3 examples don't seem much faster than
Shift+(Del,Del,Del), Ctrl+F,string, and F3, respectively.

~~~
danieldk
They are easily reachable from the home row. Thus less finger/arm movement.

~~~
jotaf
It depends what you call the "home row" and where you keep your fingers.

If you expect to use these shortcuts (typically with the outer fingers of your
hands) your hands will rest at a slightly higher position in your keyboard,
with the pinkies near Esc and Del, and the thumbs near the spacebar. (Other
fingers over the letters.)

I guess it depends on what you've trained yourself to do.

~~~
mercer
I don't think I've seen anyone with their fingers stretched out or diagonal
like that as a 'home row' position, though. It makes much more sense to
'default' to having your hands somewhat straight and on the keys you're likely
to press more regularly (the (center) letter row).

------
fmakunbound
I was intrigued by what it meant by "modern", but I read the description and
didn't find anything. Anyone have an idea of what that was?

~~~
diehunde
Keep in mind they refer to modern for a terminal-based editor, not editor in
general. Have you used any other term-based editors? They lack most of micro's
features unless you install tons of plugins and extra configuration.

------
FpUser
Really nice. I wish I knew about it before.

------
imshashank
The big questions, should I invest time in learning a new CLI tool?

I am not sure what is the use of Micro that I can't already do.

Do we really need an editor inside the terminal? My current setup vim +
sublime.

~~~
sprash
Micro is more suited for people that are used to the Windows/Notepad-CUA
workflow (Use Ctrl-C for copy Ctrl-V to paste, Shift-Arrow to select, etc.)
and want to use that workflow inside the terminal instead of a full blown GUI
application.

If you are already learned how to use vim Micro doesn't make much sense.

~~~
em500
I'd think people used to Windows/Notepad/CUA editors would be most comfortable
with the venerable Midnight Commander editor (mcedit).

The main issue is probably that Windows editors rely heavily on modifier-arrow
combinations. It's quite fiddly to get them all to work correctly inside the
various terminals, and there is not much that a application running inside a
terminal can do about that.

------
bpiche
I've been using this for a few years as my primary text editor. It does such a
good job at adapting modern VSC/sublime macros to a terminal.

------
atemerev
Micro is my favorite editor, I use it for everything.

------
abraxas
This looks nice! Has anyone created BRIEF bindings for this editor?

------
ilaksh
Reminds me of Textadept.

------
reddotX
micro > nano

~~~
entha_saava
Well 1e-6 > 1e-9

~~~
bregma
Nine is bigger than six.

------
edem
Why would I use this instead of Emacs?

~~~
tablebookchair
It's probably much more intuitive when you come from editors like sublime /
atom and similar.

~~~
kazinator
"Intuitive" means knowing something without having learned it anywhere; it
doesn't matter where you come from.

There used to be a very popular, though shamefully ignorant phrase going
around decades ago that "the only intuitive interface is the nipple; all else
has to be learned". Maybe people still spread this, but I haven't heard it in
a very, very long time. Whoever came up with it clearly didn't know about the
latching difficulties that newborns can have, and how we have full blown
breastfeeding clinics to help moms.

