Ctrl + Q to quit. Need I say more?
September 13, 2016 4:38 PM   Subscribe

micro is a lightweight, terminal-based text editor inspired by the now-classic pico and GNU nano editors. Compared to its predecessors, micro offers modern conveniences like mouse support, undo, syntax highlighting, split panes, and clipboard integration. Unlike other very serious text-based editors, micro strives to provide a simple "out of the box" configuration and keyboard shortcuts that will be familiar to many desktop users.

Too much? Nano is still actively maintained and adding new features.
posted by schmod (111 comments total) 33 users marked this as a favorite
 
It’s not that I know how to use VI; it’s that I know how I don’t know how to use VI.
posted by Going To Maine at 4:41 PM on September 13, 2016 [15 favorites]


ooh, but this is nice…
posted by Going To Maine at 4:42 PM on September 13, 2016


I don't know who the audience for this is. Anyone who needs to use a text editor regularly is going to need to know vi because that's guaranteed to be on whatever system they're working on. If they're aggressively into customizing and running their life through an editor, they're already using emacs. Folks who are just getting started or not fond of the former two are using pico or nano.

Who is this for?
posted by percor at 4:42 PM on September 13, 2016 [9 favorites]


Me! Its audience is me.
posted by Going To Maine at 4:43 PM on September 13, 2016 [15 favorites]


Sure, I need to know how to use vi, that doesn't mean I don't prefer to use nano for most of what I actually use a text editor for.
posted by Dysk at 4:44 PM on September 13, 2016 [4 favorites]


Just out of curiosity...

What is it you do, and why does this fit your needs in a way the existing text editors do not?
posted by percor at 4:45 PM on September 13, 2016 [1 favorite]


And this sounds interesting toe me, and like it could be even better than nano.
posted by Dysk at 4:45 PM on September 13, 2016


It’s not that I know how to use VI, it's that I don't know how to not use vi. Except by using Vim.
posted by sfenders at 4:48 PM on September 13, 2016 [11 favorites]


Anyone who needs to use a text editor regularly is going to need to know vi because that's guaranteed to be on whatever system they're working on

vim (well, neovim now) is my main work tool, but this is an overrated virtue. you can know enough vi to get by on a bunch of systems and still depend mainly on GUI IDEs or just sublime.

I imagine this is for people like me who bother to set up a really smooth terminal based workflow for themselves, and who don't want to use vi/vim/neovim because every editor/platform with tremendous capabilities is one that you only really retain about 10% of that you use consistently, and the rest is just kind of... there, and a bit guilt-inducing because you're not the equal of your tool.
posted by fatbird at 4:52 PM on September 13, 2016 [4 favorites]


What is it you do, and why does this fit your needs in a way the existing text editors do not?

Oh it doesn't fit me in any special way, since I just use Atom &/or PyCharm on my desktop. Realistically, for development, I'm going to always be using a for-real IDE that has things like autocomplete. VI apparently has these things, but learning how to use them would require me to set myself on fire for several weeks (or rather that’s how it feels); ditto emacs. Nano or Pico might fit the bill, but I've never felt the incentive. When I do have to remote edit, :i, :w,:wq, and :dd are enough to make do. This seems like something that has a decent amount of configuration for editing out of the box and an intuitive syntax. Also, it’s novel - something that tickles my worst instincts.
posted by Going To Maine at 4:54 PM on September 13, 2016 [6 favorites]


Hmm… copying cross-tabs on an OS X terminal session using SSH seems to have some issues. (I suspect I’m copying into the buffer on the remote machine and not my own?)
posted by Going To Maine at 5:14 PM on September 13, 2016


I freaking hate vi and emacs.

Imagine that you are in a certain field of study. Everything in this field takes place in, let's say, English. Except, there's a very important book everyone uses, that's written in Japanese, and you have to be able to read Japanese to be able to use it. Nothing else in the field is written in Japanese, and nothing new is being written in Japanese. In fact, for the purpose of this, we'll say it's a dead language. There's no point to learning Japanese except to read this one book.

And you have to do it! Because nobody will make a translation, or a modern version of the book, that is applicable to all of the situations the old version is useful for. Even though this would be easy, everyone else in the field has already learned Japanese just so they can read the book, and if you complain about this, they sneer at you and call you a noob. There are other books that do the same thing, but you need to all be on the same book to get along. Everyone could just make a quick translation and move over to English at any time, but they won't, for reasons that basically boil down to inertia and arrogance.

That book is freaking vi. NOTHING ELSE IN COMPUTING uses the same bizarre outer space conventions as vi, and there's no reason to learn them, or any good reason vi can't use sane conventions. But it doesn't, and you're expected to use it anyway. Vi is the least approachable program of all time. I've seen people reboot their computers because they couldn't even figure out how to quit.

Oh, I forgot - if you complain enough about the Japanese book, people will eventually point you to another. Except, that book is in Dutch, which barely helps since you can't read Dutch either (although it's easier to learn). Also, the book is a million pages long. That's emacs.
posted by Mitrovarr at 5:17 PM on September 13, 2016 [84 favorites]


I think "zero-configuration" is the big selling point. I can throw this onto a server, and know that I'll have a decent editor if I need to SSH in. I agree that this probably isn't a great fit for use as a "primary" editor, but it seems pretty great if you're working in a terminal.
posted by schmod at 5:19 PM on September 13, 2016 [1 favorite]


Even better, Emacs has a VI mode! "...extensible vi layer for Emacs" (Bwhaaaaaaa unix nerd joke)
posted by sammyo at 5:21 PM on September 13, 2016 [3 favorites]


Vi is the least approachable program of all time.

If you need Unicode support for Japanese you should probably use vim instead.
posted by swift at 5:29 PM on September 13, 2016 [8 favorites]


> there's no reason to learn them, or any good reason vi can't use sane conventions

Modal editing isn't insane or pointless, it's just different. That's like saying sculpture is insane because what do you even do with the paintbrushes and canvas?

Also weirdly I have used vi and emacs for years each (separately of course) in my profession, and also studied both dutch and japanese. I guess I'm your nemesis.
posted by thedaniel at 5:34 PM on September 13, 2016 [26 favorites]


It's not just the modal editing (although I think if it was a good idea, everyone else wouldn't have stopped using it, but whatever). The keys used to do literally anything are not the keys used to do it anywhere else. Unless you have another computer to look it up, you can't access help. You can't quit. You can't do ANYTHING.

I took a bioinformatics course once, where we SSH'd into a linux server to do a little perl programming. I was still having to help everyone with vi by the end. Not once person had learned how to use it without help (I fortunately had some ability banked from messing around from linux a lot when I was younger).
posted by Mitrovarr at 5:39 PM on September 13, 2016 [7 favorites]


I use emacs for heavyweight editing (when I'm going to be in a file or bunch of files for a while). My fingers know the keybindings and I can do things quickly and efficiently, and I know enough of the packages to be able to do fun things with them (and programming elisp, while annoying is doable).

I use vi/vim for quick edits and know enough to do such things efficiently, but don't know it well enough to do the heavyweight editing I do in emacs - but my fingers know enough to do what I want. vi macros - not so much.

Every so often something on some system dumps me into nano and I'm lost. It's supposed to be easy, but just isn't for me. I just want to get out as quickly as possble, set EDITOR to something sane and retry. Another nano? Ewww.
posted by Death and Gravity at 5:44 PM on September 13, 2016


NOTHING ELSE IN COMPUTING uses the same bizarre outer space conventions as vi, and there's no reason to learn them, or any good reason vi can't use sane conventions.

Except for every other editor that offers vi-style keybindings.

Anyway, I guess it must happen, since good lord do users of editors other than vi/emacs bellyache about it every time the topic comes up, but I have literally never seen the users of those editors give other people shit for their tool choice beyond the occasional facetious vi vs. emacs argument. It's always rich in that light to scroll through screeds about how those editors suck a lot.
posted by invitapriore at 5:47 PM on September 13, 2016 [3 favorites]


vi isn't for everybody, and honestly I only use non-vim vi under duress, but the ability to keep my hands on home row for 99% of what I need to do is just incomparable. (I remap Caps Lock to Ctrl so I do Ctrl-[ for Esc.)
posted by kmz at 5:47 PM on September 13, 2016 [6 favorites]


invitapriore: Anyway, I guess it must happen, since good lord do users of editors other than vi/emacs bellyache about it every time the topic comes up, but I have literally never seen the users of those editors give other people shit for their tool choice beyond the occasional facetious vi vs. emacs argument. It's always rich in that light to scroll through screeds about how those editors suck a lot.

Look, I'm not saying vi is a bad tool, exactly. Apparently it's very powerful. But it's incredibly hard to pick up and use to do simple things. And there's really no excuse for it not using standard usage conventions (ctrl-s, ctrl-c, ctrl-v, ctrl-z, ctrl-q, etc.) except that it predated them and now nobody is willing to change it. Because the users already speak vi's weird language and have no thought toward making it easy for new people (as part of computing's general contempt for new users).
posted by Mitrovarr at 5:53 PM on September 13, 2016 [3 favorites]


Modal editing isn't insane or pointless, it's just different. That's like saying sculpture is insane because what do you even do with the paintbrushes and canvas?

Yes, but technically speaking everything is just different. You could get your comments posted on MetaFilter by sending cortex postcards asking him to make the comments. It’s not insane! It’s just different!
posted by Going To Maine at 6:04 PM on September 13, 2016 [8 favorites]


I was learning emacs and vi as a teenager when I should have been doing drugs like my peers.

Weird. I learned emacs and vi as a teenager while doing drugs like my peers. (ADM3a's can be used to warm saki, btw...)
posted by mikelieman at 6:06 PM on September 13, 2016 [4 favorites]


Look, I'm not saying vi is a bad tool, exactly. Apparently it's very powerful. But it's incredibly hard to pick up and use to do simple things.

The trick is to imagine you're on a 300 baud connection doing line editing.
posted by mikelieman at 6:08 PM on September 13, 2016 [6 favorites]


I'm sorry you had brutal text editing experiences with vi and emacs. But you should know that these editors have heavy duty history. These programs both have a solid lineage of 40 years behind them.

And even 20 years ago they had decent help, which was only a keystroke away. It seems like whomever introduced you to them did you a serious disservice by not giving you the tools you need to get yourself to happily editing text.

These programs are for dealing with raw text in the best possible way. I can only speak for vi a little, but the ability to compose a bunch of editing and movement commands together is insanely expressive. I can ramble on forever about Emacs, so I won't. Suffice to say it's extensibility is bar-none. It's a good programming language with a great toolset and an alright editor.

And there's really no excuse for it not using standard usage conventions (ctrl-s, ctrl-c, ctrl-v, ctrl-z, ctrl-q, etc.) except that it predated them and now nobody is willing to change it. Because the users already speak vi's weird language and have no thought toward making it easy for new people.

It was at least 10 years since the birth of Vi (or Emacs) that the 'conventions' you want shipped over to the editor started to really appear. These conventions appeared in vastly different contexts as well—a home computer vs. a monster multi-user unix machine. Why should emacs or VI suddenly start importing the favourite key commands of beginners when these tools are not designed for beginners? That's like asking for every BMX to have training wheels because you want to learn to ride a bike.
posted by jonnay at 6:14 PM on September 13, 2016 [8 favorites]


GNU Moe is what I've been using for the past decade or so, for the same reason of needing actually-sane keyboard shortcuts. F1 for help! It's a miracle!
posted by XMLicious at 6:14 PM on September 13, 2016 [2 favorites]


Look, I’m not saying vi is a bad tool, exactly. Apparently it's very powerful. But it's incredibly hard to pick up and use to do simple things.

The trick is to imagine you're on a 300 baud connection doing line editing.

If only internet connection speeds had improved since the 80s…
posted by Going To Maine at 6:27 PM on September 13, 2016 [1 favorite]


ctrl-s, ctrl-c, ctrl-v, ctrl-z, ctrl-q, etc.

Strangely, most of those do what I presume you would expect in the version of gvim I have on my Windows machine. Except for ctrl-q, which does ... something else. Not so much on linux, where those aren't conventions. I mean if you want to cut and paste something it's obviously more natural to type FIyf.2jP or whatever.
posted by sfenders at 6:29 PM on September 13, 2016


And there's really no excuse for it not using standard usage conventions (ctrl-s, ctrl-c, ctrl-v, ctrl-z, ctrl-q, etc.)

Keep honking
I'm typing M-x smite-newbie
posted by All Out of Lulz at 6:33 PM on September 13, 2016 [11 favorites]


I have literally never seen the users of [via and emacs] give other people shit for their tool choice

Yeah, and I've never much noticed a mixture of nitrogen, oxygen, and assorted trace gases...
posted by Shmuel510 at 6:42 PM on September 13, 2016 [3 favorites]


Ah, the editor wars. I remember my first time bumping into vi in college -- in must have been 1987 -- on a VAX running Ultrics. I was used to Turbo Pascal, which used a Wordstar-like editor. I knew my dad liked vi, he had some fancy pants Sun workstations at the time. I was stunned at how primitive it was, and couldn't believe anyone used still it. Fast forward some ... *does math* ... 29 years later, and I'm a committed vi user, Maybe it's Stockholm syndrome, or maybe it's that vi really does work well, but it's a bit like a guitar -- you have to practice at it, and it can be painful. And I may or may not have written a video game about the battle between vi and emacs, in which you play the role of the hero, vi.
posted by smcameron at 6:45 PM on September 13, 2016 [1 favorite]


XMLicious: "GNU Moe is what I've been using for the past decade or so, for the same reason of needing actually-sane keyboard shortcuts. F1 for help! It's a miracle!"

Eponysterical, since it explicitly does not support UTF-8 (or anything else other than ISO-8859-15. That's not a sane tool in 2016.
posted by Joakim Ziegler at 6:55 PM on September 13, 2016


How is this at large files? Yeah I'm fine with vim on most the *nix I interact with on a daily basis but I appreciate Sublime and Atom for syntax highlighting support for various languages. Trouble is, I not infrequently face large log or output files (in the 1GB neighborhood). Those editors tend to choke. When I was a purely Windows person my go to was UltraEdit. These days I'm using a Mac for work... any recommendations?
posted by WacoKid at 7:00 PM on September 13, 2016 [1 favorite]


So the point of its-not-emacs-or-vi is to be a small binary. So you can shoehorn it into a small system. That's what nano/pico/joe are good at. I like micro but it's pretty maximalist, 8+mb binary for MacOS and things like syntax coloring. OTOH it's also mostly statically linked, which makes it look bigger than it is and has advantages. Dunno.

These days I mostly use mg for my tty editor. It's also very small but has the drawback virtue of having emacs keybindings, which I had burned into my brain as part of my unfortunate youth. I still am hitting Ctrl-b instead of left arrow because I am an old. The addition of mouse support in micro is awfully sweet though. (Of course I use Sublime for real editing; ttys are a 40 year old UI, we can do better now.)
posted by Nelson at 7:01 PM on September 13, 2016 [1 favorite]


So-o-o, whach'all're saying is it's a QWERTY-vrs-Dvorak thang. Think I'll stick with editing system stuff in TextWrangler kthxbi
posted by tspae at 7:07 PM on September 13, 2016 [1 favorite]


vi isn't that tough, especially with the proper clothing.
posted by Wild_Eep at 7:08 PM on September 13, 2016 [3 favorites]


ctrl-s, ctrl-c, ctrl-v, ctrl-z, ctrl-q, etc.

Strangely, most of those do what I presume you would expect in the version of gvim I have on my Windows machine. Except for ctrl-q, which does ... something else.


gvim includes a default .vimrc that sets "Windows compatibility" on. I assume they didn't want to find another keybinding for rectangular selections so they kept ctrl-q for that.
posted by a snickering nuthatch at 7:11 PM on September 13, 2016


[question about who it's for I pasted the wrong part of it]

For people who wish nano were a full-strength editor plus mouse support and stuff, I'm guessing?
posted by atoxyl at 7:23 PM on September 13, 2016


Eponysterical, since it explicitly does not support UTF-8 (or anything else other than ISO-8859-15. That's not a sane tool in 2016.

Insane is how I roll, yo. I just can't live life without the exhilarating rush of tempting fate by editing files in /etc on my server with a tool that's only ISO-8859-15 compliant.
posted by XMLicious at 7:25 PM on September 13, 2016 [2 favorites]


The draw of vi is really when you learn all the shortcuts you never have to pick up a mouse and you can fly across the screen. The down side is that when you don't know all the shortcuts, you want to pitch your computer across the room.
posted by Nanukthedog at 7:29 PM on September 13, 2016 [7 favorites]


I thought for a long time that *nix platforms could use a... Sublime Text (that isn't emacs). But I guess Atom may be that now?
posted by atoxyl at 7:29 PM on September 13, 2016


ctrl-s, ctrl-c, ctrl-v, ctrl-z, ctrl-q, etc.

I mean, you could certainly map these to whatever you want in emacs. You'd have to remap a lot of other things because of that, but thats one of the fun things about emacs, you can rewrite it as much as you want.

(And those changes are fairly portable, in that all you need is to grab your conf file(s) and pull them onto your system and you're back in "your" emacs. For a developer like myself, thats fine. If I needed to log into hundreds of random systems, however, I wouldn't want to get used to any customizations because that would be annoying).

Although I always find it interesting when people learn both vi and emacs (beyond maybe trying them out to see which is a better fit for them). I quickly learned I liked emacs better and by now the only thing I can do in vi(m) is exit, because I'll be faster/better in emacs.

This kind of thing seems more aimed at sysadmin types? Who need some basic program that is on every machine that just works? Not so much for, say, software developers who have just a couple highly customized machines.
posted by thefoxgod at 7:36 PM on September 13, 2016


NOTHING ELSE IN COMPUTING uses the same bizarre outer space conventions as vi

psst... try hitting "j" and "k" while browsing this website, or, say, gmail. (In fairness though, the fact that a lot of sites have secret vi keybindings built-in is more about them being written by secret vi enthusiasts than any kind of convention existing outside of vi.)
posted by whir at 7:57 PM on September 13, 2016 [12 favorites]


After a lot of casting around for a good, free, non-vi/emacs editor with a lot of capability in a low frills package, I finally landed on TextAdept. It sports both a gui and very capable terminal mode, sane key defaults, is configurable in lua, few dependencies with a compact binary, and is cross platform. So far it's holding up better under daily programming use than a number of other candidates.
posted by delicious-luncheon at 8:11 PM on September 13, 2016 [2 favorites]


I use Notepad++, but the secret is, some of that text editor magic has been in Windows since at least 3.1, and works with pretty much any text control, including that in this very post composition window, which I'm using to doublecheck the keys. (You Mac users starting to object, I use Windows as my example because it's what I know, most or all of this is available, in similar form [usually substituting Command for Ctrl] on Mac, and most Linux window managers for that matter.) None of this requires any special editing mode, and I always found them much more intuitive than vi keys, which came about after all because early keyboards couldn't be counted on to have arrow keys:

Ctrl Left/Right Arrow: Go forward/back by a word
Ctrl Up/Down Arrow, or Home/End: Go to beginning/end of line. Some editors (like Word) use these to flip between paragraphs.
Ctrl Home/End: Top or bottom of document
PgUp/PgDown: As you'd expect, page through text rapidly
Shift plus any of these things: Move the same way, but also select (or possibly deselect, if text was already selected) the text between where you were and were you're going. I seriously select text this way much more often than I use a mouse to do it.
Ctrl Z, X, C, V: In order, Undo, Cut, Copy, Paste. Yes, practically every text control in Windows has Undo, and has for decades.
Ctrl A: Select all

On Undo, some programs support larger Undo buffers than one step. Ctrl+Shift+Z, or sometimes Ctrl+Y, will redo undone edits.

And one I learned recently, in many rich text editors, Ctrl+Shift+V will paste raw text without formatting!
posted by JHarris at 8:12 PM on September 13, 2016


We've been dealing with pre-rolled docker containers lately that don't seem to have any known editor installed so we've had to resort to using 'cat' to edit files inside the images.

The process goes like this:
* Run 'cat filename' to shell in the docker image
* Copy output text and paste it to an editor on the host machine and edit it there
* Copy the edited text from the host machine
* Run 'cat <>filename' in the image
* Paste the edited text and hit CTL-d.
posted by octothorpe at 8:14 PM on September 13, 2016 [4 favorites]


I had high hopes for FTE, a terminal-based text editor that uses CUA bindings (like MS-DOS 6 edit), and is mouse-friendly. Unfortunately, its UTF-8 support is almost nil. micro looks pretty cool, but I need menu bars and proper keybindings.
posted by scruss at 8:18 PM on September 13, 2016


we've had to resort to using 'cat' to edit files inside the images.

Ouch. That's like half a step above using a tiny magnetic needle and a very steady hand.
posted by firechicago at 8:22 PM on September 13, 2016 [9 favorites]


I have literally never seen the users of those editors give other people shit for their tool choice.--invitapriore

They usually do it indirectly, like going into a post about some other editor and turning it into a conversation about how great vi is.
posted by eye of newt at 8:23 PM on September 13, 2016 [15 favorites]


I used VI and emacs 20 years ago in grad school (oof). My career went a different way, so I'm absolutely gob-smacked reading this post and realizing people still use VI (and apparently not in in a ironic techno-nostalgic way)
posted by TheShadowKnows at 8:37 PM on September 13, 2016


pico was my primary interface with the internet for at least eight years (Usenet and Pine e-mail, mostly), and now I apparently can't remember the slightest thing about it. Did I really type CTRL-O to save all those years? CTRL-^ to select text? Weird.
posted by straight at 8:37 PM on September 13, 2016


realizing people still use VI

Everyone I know from college who is a programmer still uses emacs or vi. Of course, I graduated 18 years ago, so "kids these days" may be different than those of us who grew up with them in a different age. I've never seen anything better or any reason to change (at least from emacs, which can certainly do all the things I'd want in an IDE).

I wouldn't be surprised if usage is highly correlated with age, as I see lots of younger devs using more web-based tools and GUI IDEs.
posted by thefoxgod at 8:56 PM on September 13, 2016


gvim includes a default .vimrc that sets "Windows compatibility" on. I assume they didn't want to find another keybinding for rectangular selections so they kept ctrl-q for that.

Well, once you stick vi into a gui, it usually does fix most of the problems. However, once you have access to a gui, you also have access to basically anything else.
posted by Mitrovarr at 9:03 PM on September 13, 2016


Vi (and to a lesser extent Emacs) still get a lot of use from a chunk of younger devs. There has been a resurgence.

To bring the convo back to micro, it does have a Lua interpreter (with eval no less!) and macros, so this is more than just another pico/nano. I'll be interested to see where this project goes.
posted by jonnay at 9:03 PM on September 13, 2016


Anyone who needs to use a text editor regularly is going to need to know vi because that's guaranteed to be on whatever system they're working on.

Well THAT's a heck of an assumption.

(that said, I use vim, know how to use it, but don't feel any affinity for it. don't like having to try to convince people to learn it. micro sounds pretty cool. it's for me and the people i work with who don't have time to listen to me try to teach vim to them, which i don't have time for, either.)
posted by destructive cactus at 9:08 PM on September 13, 2016


Interesting that its written in Go. I think of Go as a server language (and so do the authors of Go), so its unexpected to see it in this kind of program.
posted by thefoxgod at 9:09 PM on September 13, 2016 [1 favorite]


Surely this will usher in The Year of the Linux Desktop.
posted by benzenedream at 9:27 PM on September 13, 2016 [3 favorites]


I have literally never seen the users of those editors give other people shit for their tool choice.--invitapriore

It's in that subtle eye roll when we offer to do some simple reformatting job in 30 seconds that the CUA users were going to hire out to a Mechanical Turk army for delivery next month.
posted by straw at 9:44 PM on September 13, 2016 [5 favorites]


To quote a friend of mine from undergrad: "If you're really, really good with vim, your fellow programmers will respect you. If you're really, really good with emacs, your fellow programmers will fear you."
posted by Itaxpica at 10:15 PM on September 13, 2016 [12 favorites]


ed! ed is the standard text editor!

Computer Scientists love ed, not just because it comes first alphabetically, but because it's the standard. Everyone else loves ed because it's ED!
  ED IS THE TRUE PATH TO NIRVANA!  ED HAS BEEN THE CHOICE OF EDUCATED
  AND IGNORANT ALIKE FOR CENTURIES!  ED WILL NOT CORRUPT YOUR PRECIOUS
  BODILY FLUIDS!!  ED IS THE STANDARD TEXT EDITOR!  ED MAKES THE SUN
  SHINE AND THE BIRDS SING AND THE GRASS GREEN!!
posted by vibratory manner of working at 10:37 PM on September 13, 2016 [14 favorites]


There's a practical reason that command line/curses based text editors are still common currency for programming skills: our workflows remain very text based in a broad sense of that term, meaning shell scripted. As IDEs got good, more shell based tools came into play: git, vagrant, docker, kubernetes. It's not that I frequently needed to ssh into a linux server and use vi there; it's that it's very common now to use command line tools to build and deploy my work, at least in the web world, so GUIs feel like thick wrappers around that. I use git in the terminal because using Atlassian's Sourcetree is a frustrating exercise in struggling to understand what command line switches are being applied when I press a button. I look at stdout from a node-driven build process to see if my JavaScript came out correctly. All these things can and are done in IDEs (PyCharm is a fantastic IDE), but it's always coming back to something happening in the shell, even if that's nicely wrapped in a workspace's pane, so I usually start working there anyway because the terminal window is still where I'm most effectively close to my toolchain.
posted by fatbird at 10:39 PM on September 13, 2016 [1 favorite]


The useful question is not how micro compares with vi, but how it compares with gedit, Sublime Text, Notepad++, etc.
posted by splitpeasoup at 10:55 PM on September 13, 2016 [2 favorites]


There's a practical reason that command line/curses based text editors are still common currency for programming skills: our workflows remain very text based in a broad sense of that term, meaning shell scripted.

A corollary to this is that if I'm on some other Unix-like computer, I can install basically my entire environment in a few seconds with a git clone of my dotfiles.
posted by invitapriore at 10:56 PM on September 13, 2016 [4 favorites]


Just out of curiosity...

What is it you do, and why does this fit your needs in a way the existing text editors do not?


90% of my text editor use is editing config files and XML. If I'm opening an editor to find one line and edit it, mouse support seriously helps (no hammering arrow keys repeatedly) and just not having vi or emacs getting in the way of a bunch of quickfire five second operations is a godsend.
posted by Dysk at 11:02 PM on September 13, 2016


Everyone I know from college who is a programmer still uses emacs or vi. Of course, I graduated 18 years ago

I graduated 15 years ago, used emacs etc all through my computer science degree, continued to use pine on my own server as my email client until maybe 8 years ago, and don't know ANY programmers that don't use an IDE... IDEA is finally starting to catch up to where visual studio was 5 years ago!

I do like that emacs's basic cursor manipulation shortcuts (ctrl-a and ctrl-e!) work throughout OS X.
posted by flaterik at 11:04 PM on September 13, 2016


I just want an IDE that will automatically import and understand my emacs config files.
posted by monotreme at 11:12 PM on September 13, 2016


Yeah, when you're just going down three to five lines and a few characters from one end of that line or other, but repeatedly, and not quite the same count each time? Hammering the arrow keys is quicker. A single click where I need it is likely to be quicker still.

You have your workflow, and I have mine. This works for me.
posted by Dysk at 11:22 PM on September 13, 2016


Interesting that its written in Go. I think of Go as a server language (and so do the authors of Go), so its unexpected to see it in this kind of program.

I think of Go as a general application/utility language, really - not low level enough to write an OS (or a fancy 3D game, probably) but enough for the majority of other things.
posted by atoxyl at 11:26 PM on September 13, 2016 [1 favorite]


emacs has in-terminal mouse support, naturally.

No lua out of the box, but I'm sure you can tell it to run a lua script on the contents of a buffer, if that helps.
posted by sebastienbailard at 11:53 PM on September 13, 2016


Surely this will usher in The Year of the Linux Desktop.

2001 (November) was the year I cut over to a Linux desktop. I'm on one now.

And while it's not a desktop, I'm looking at my phone and...
posted by mikelieman at 12:10 AM on September 14, 2016 [5 favorites]


Hey, if you have a spare half hour, run vimtutor in your terminal and (assuming it's installed) pick up a few things.

Vim is a very powerful editor that has many commands, too many to explain in a tutor such as this. This tutor is designed to describe enough of the commands that you will be able to easily use Vim as an all-purpose editor.
posted by Celsius1414 at 12:14 AM on September 14, 2016 [3 favorites]


A corollary to this is that if I'm on some other Unix-like computer, I can install basically my entire environment in a few seconds with a git clone of my dotfiles.

The Dockerfile for my disposable dev environment sticks a local.sh into the /etc/profile.d and pulls from the repo.

'make shell' gets me in there and I'm ready to work.
posted by mikelieman at 12:14 AM on September 14, 2016 [1 favorite]


Not only do I use nano, I cross-symlinked vi and emacs to fuck with the sort of people who might look down on that.
posted by ryanrs at 1:16 AM on September 14, 2016 [7 favorites]


2001 (November) was the year I cut over to a Linux desktop. I'm on one now.

2001 was the year of the Unix desktop, it's just Linux wasn't that Unix. Consumer-facing Linux didn't hit the big time until 2008 when Android came out.
posted by ryanrs at 1:33 AM on September 14, 2016


To each their own. I used nano on servers and Sublime Text on my laptopt for a long time before wrist pain drove me to try something that didn't require moving my hands from the home row so much. My choice was Spacemacs, and I freaking love it.

Spacemacs is Emacs with sane beginner-friendly defaults, consistent, discoverable menu-like keybindings and, wait for it... vi/vim bindings for editing text.

Yes, it requires some learning, but after running vimtutor twice and a couple of weeks of fumbling, I was already productive (after all, most of my code editing time is spent thinking, and my coding speed isn't limited by my typing speed). Three months later, I was wishing I'd done it earlier, but I was still opening Sublime Text for more complex edits, or using the terminal for more complex searches.

I've now been using Spacemacs for 18 months, and I don't remember the last time I needed to use a different editor. I'm never going back. A++ would convert again.
posted by kandinski at 2:19 AM on September 14, 2016 [2 favorites]


Releasing a new text editor is the supreme art of trolling
posted by thelonius at 2:20 AM on September 14, 2016 [14 favorites]


If releasing a new text editor is trolling as an art, providing homebrew instructions and pretending macports doesn't exist is a masterful touch.

(as an emacs enthusiast, mg is my wee terminal editor of choice)
posted by seraphine at 3:24 AM on September 14, 2016


Everyone I know from college who is a programmer still uses emacs or vi. Of course, I graduated 18 years ago, so "kids these days" may be different than those of us who grew up with them in a different age.

Lots of the kids that I work with use vim or at least vi emulation in Sublime or Webstorm. The 24 year old who sits behind me was groaning yesterday about having to do some work in VisualStudio because he hates working in IDEs so much.
posted by octothorpe at 4:30 AM on September 14, 2016 [1 favorite]


35 year vi user here. Back in the days when I briefly flirted with emacs I switched over to using it to read/send email. That was helpful. For the longest time I used mutt with vi as my editor, too - that was a nice setup, though eventually I got so much html mail that it became inconvenient. (E.g. Netscape).

I don't think vi navigation is hard, but I can see why you would think it is unfamiliar.
Avoid using the arrow keys. : is your friend.

Many people use editors for only a few simple things:
Enter text
Overwrite that text
Insert new text into existing text
Search and replace text

For those actions I think most editors are similar, modal / no modal arguments aside.

Finding regular expression patterns, remembering part, editing part, and replacing in one step is a useful editor feature in development, editing data files, and the like, though I'm a fan of Ed, send, and awk, too. Otherwise I tend to create more specialized scripts.
posted by grimjeer at 4:54 AM on September 14, 2016


I find myself using Sublime these days, largely because I inherited a Windows 10 laptop/tablet convertible, and the prospect of jury-rigging in an ancient version of aspell along with the dozen other things that break when emacs is used under a non-POSIX system just made me weep when all I need that little laptop for is minor edits to a static site blog.

My last use of vim was about 10 years ago, when it made grinding through edits to my LaTeX thesis much easier. But for most prose I just need a text window and maybe spellcheck highlighting.
posted by CBrachyrhynchos at 5:22 AM on September 14, 2016


Either vi or BBEdit: GUIs aren't always bad!
posted by wenestvedt at 5:24 AM on September 14, 2016


We've been dealing with pre-rolled docker containers lately that don't seem to have any known editor installed

Intolerable. Find the build engineers responsible and beat them with an organic carrot until they re-roll.

Oh, and I still use pine (alpine). No particular reason I'm not using mutt, just out of long habit. So easy to compose and shoot off emails.
posted by Jubal Kessler at 5:33 AM on September 14, 2016


Emacs for endless fiddling.
Sublime for actually getting any work done.
posted by overeducated_alligator at 5:38 AM on September 14, 2016


the users already speak vi's weird language and have no thought toward making it easy for new people (as part of computing's general contempt for new users)

Here's a nickel, kid.
posted by flabdablet at 6:13 AM on September 14, 2016 [4 favorites]


not having vi or emacs getting in the way of a bunch of quickfire five second operations is a godsend

But, if you spent a couple dozen hours mastering vi or emacs, you could turn those into quickfire three second operations!

(I love Vim.)
posted by paper chromatographologist at 6:21 AM on September 14, 2016 [3 favorites]


The 24 year old who sits behind me was groaning yesterday about having to do some work in VisualStudio because he hates working in IDEs so much.

Kids these days... There's no need to choose between vim and Visual Studio.

Re repetitive cursor motion: think about what you really mean to do. The thought behind what you're doing probably isn't "move down five times, wait, no, four". The thought is probably "move to the next instance of this thing". The more vim motions you learn, the more directly you can translate your intent.
posted by a snickering nuthatch at 6:55 AM on September 14, 2016 [2 favorites]


I think there's a point drifting around here that a lot of these comments are missing, namely, that this is a terminal-based editor. It's not useful to compare it to IDEs, Sublime, Notepad++, etc. because it solves a different problem: you generally can't ssh into a machine a thousand miles away and fire up Visual Studio. A lot of programmers use these tools not just because they were trained on them years ago, but because it's far less frustrating to use the same tool everywhere, local and remote.

Anyway! I took micro for a spin and I fucking love it. It does all the right things for a newbie. I was able to figure out most of the keybindings just by trial and error. This may actually become my new default editor. Two spacebar-actuators up.
posted by phooky at 7:06 AM on September 14, 2016 [8 favorites]


The "Zen" of vi is that you're speaking a language. The initial y is a verb. The statement yy is a synonym for y_. The y is doubled up to make it easier to type, since it is such a common operation.
"Your problem with VIM is that you don't grok VI"
posted by Orb2069 at 7:54 AM on September 14, 2016 [6 favorites]


Oh, thank god. This looks incredible.
posted by The Lamplighter at 7:57 AM on September 14, 2016



Interesting that its written in Go. I think of Go as a server language (and so do the authors of Go), so its unexpected to see it in this kind of program.


I think the connection is Rob Pike. He likes and uses nano. He is also one of the authors of Go.
posted by KaizenSoze at 8:09 AM on September 14, 2016


While we're talking about remote files, if you're an emacs guy and you haven't explored tramp, you need to. It allows for the editing of remote files through a variety of methods including bog-standard ssh/scp.
posted by jonnay at 10:10 AM on September 14, 2016 [3 favorites]


the editing of remote files through a variety of methods including bog-standard ssh/scp

vim
:r !ssh user@remote.server cat /path/to/remote/file
edity edity edity
:w !ssh user@remote.server 'cat >/path/to/remote/file'
:q!

posted by flabdablet at 12:30 PM on September 14, 2016 [4 favorites]


I just came here to say that nano was started by a former colleague/roommate of mine at Plattsburgh State University.

Go Plattsburgh!
posted by jdfan at 1:06 PM on September 14, 2016 [2 favorites]


As someone who has memorized only one VI command (:q!) and uses pico/nano if I have to edit over SSH, I welcome this development.

Not disagreeing that you can probably get to doing really fancy stuff with Vi (or your tool of choice) if you sit down and learn it, but seriously, Vi does absolutely nothing to help the newbie figure it out. Having a tutorial accessed via a completely separate command doesn't count for what I hope are obvious reasons. And I hate modal interfaces, so I mostly continue in my vignorance out of spite these days. :P
posted by Aleyn at 1:30 PM on September 14, 2016 [1 favorite]


don't know ANY programmers that don't use an IDE

Emacs is an IDE, though. I can't think of anything I can do in an IDE I can't do in emacs. It's just not a GUI IDE.

Not sure if the same can be true of vim as I'm less familiar with it.

This is a key difference between, say, micro and emacs. Micro is strictly an editor, while emacs is an editor at base that is more or less infinitely extensible, and has robust support for integrated compilation/debugging, code completion, etc.

So if you are always just editing text (and not writing software), I guess I can see the advantage of using nano/micro/etc as a more focused tool.

I think of Go as a general application/utility language, really

Oh, it certainly can be, I've just usually seen it in backend applications. I mean, the Go homepage currently says: "Go was designed for writing servers", for example :)
posted by thefoxgod at 1:32 PM on September 14, 2016 [1 favorite]


Not sure if the same can be true of vim as I'm less familiar with it.

At least for R, there's a vim plugin that -- together with tmux -- allows you to do tab-completion within vim and to send stuff from a vim buffer into an interactive R session. It is my favorite.
posted by en forme de poire at 5:00 PM on September 14, 2016


At least for R, there's a vim plugin that -- together with tmux -- allows you to do tab-completion within vim and to send stuff from a vim buffer into an interactive R session. It is my favorite.

I've never heard of R, but just read a quick description, and that sounds like a lot of fun! ( What window manager are you using... This sounds like a job for XMonad! )
posted by mikelieman at 5:41 PM on September 14, 2016


Kudos to the poster for their wonderful post about vi.

Oh, wait, what?

That said, ferrealz I'm curious. I just installed BASH for Windows. Last time I tried Linux was OpenSUSE about a year ago exactly. I left it on for about a half a year and then removed it when I realized it was getting in the way of me getting Win10 updates (thanks Windows for being dicks on not testing proper dual boot systems and updates) but more than that, I just wasn't logging in it for any purpose. Not even dicking around much. Now that Bash is out I can play with the console more. I use Nano. I used to use Joe back in the day. Hate vim, tolerate emacs. I think because my earliest email experiences were Pine, maybe I have a fondness for pico/nano. I dunno. But in terms of what I need a text editor for quick edits, it does precisely what I want with quick simple ways to open/save. I don't need a lot of editing power, and if I do i'll just use sublime for programming or a word processor for editing actual larger docs and formatting.

Hope I can apt-get this in b4w.
posted by symbioid at 9:09 PM on September 14, 2016


haha aptget I just wgetted it (and I wasn't even sure it was the right tool since I haven't really used wget in ages) and bam there i have it now after like 5 seconds wget and tarring it... :)
posted by symbioid at 9:15 PM on September 14, 2016 [1 favorite]


I donno if the specific key binding familiarity matters all that much. All editors including the modern ones lack a good help facility. Yes, there is always a way to ask for help, but that's not enough for overcoming habits or creating power users.

If you want to learn vi or emacs, then you do so by printing out a one page cheat sheet and placing it into your field of vision. Appears all the top hits for vi cheat sheets cover only the super basics now, but there were really good fairly dense ones in the past.

If otoh you want folks to use your editor, then you should occupy part of the screen with context sensitive help. Initially, it explains stuff like loading, saving, quitting, navigation, and cut & paste. It'd look kinda like a menu, but clicking does nothing. After the user uses some features the editor replace it with more advanced things, eventually even stuff like running text programs in buffers, etc. There should be way to find features not currently on display of course, but the focus should actually be on teaching the user all the shortcuts.

I doubt one could build a truly powerful fully non-modal editor in the sense that you'll always need some form of command line mode, ala emacs. I'd wager an editor with 3+ modes like vi could be made successful with this sort of help functionality, but probably necessary.

Instead, there might be worth while benefits to making the command line mode itself into a type of buffer, or maybe some very smart history setup where you can browse your previous commands by typing parts of them.

In any case, there are many developers for verbose languages Java that really depend upon completion, and all developers love quick access to reference materials, spell checkers, etc. I therefore suspect any modern editor should lean heavily on a context sensitive completion options, so one should use this for the editor's own command line mode too. You'll need to be able to run stuff like debuggers or interpreters in buffers too, so starting with your own command line mode sounds wise.

Imho, lisp, scheme, etc. are an absolutely horrible choices for a language that a human is supposed to type live. At a syntactic level, you clearly really want a Haskell derivative like Idris, but probably with the type system tweaked for improving type inference, giving better error messages, etc., not the raw power they go for in Idris.

As for editing over a terminal, one should probably launch an ssh session in the editor's buffer and the editor could send over a perl or python script that let it do it's thing remotely, which mostly ends the usefulness of vi-like navigation mode.

In any case, there is nothing really stopping anyone from building a better editor today, but you're task would necessarily be to do better than vi and emacs in every way all at once. To do that, you need to make a few good decisions right from the beginning to get enough power users to help you build the rest. It's likely doable with the right approach to help, but still not easy.
posted by jeffburdges at 3:43 AM on September 15, 2016 [1 favorite]


Imho, lisp, scheme, etc. are an absolutely horrible choices for a language that a human is supposed to type live. At a syntactic level, you clearly really want a Haskell derivative like Idris, but probably with the type system tweaked for improving type inference, giving better error messages, etc., not the raw power they go for in Idris.

To each, their own I guess. I don't see much of a difference between (function a b c) and the more common function(a, b, c); and I cry a bit inside when the standard operations on collections such as reverse and sort mutate the collection, making function chaining impossible without writing more code that cracks open the black box of how collections are referenced vs. copied within the guts of the programming language.

Just for clarification, in emacs the command-line mode is, in fact, a buffer with multiple variations on function completion available.
posted by CBrachyrhynchos at 5:57 AM on September 15, 2016 [2 favorites]


  I use Notepad++, but the secret is, some of that text editor magic has been in Windows since at least 3.1

Those are (basically) IBM CUA keys; MS-DOS edit and qbasic had 'em.

I've never understood the "real users don't touch the mouse" thing. It's really prevalent in the Unix world; see this question How to use the menu bar in terminal emacs? which gets the dismissive answer "[you can't, and] … you'll speed up when going keyboard-only". I don't (can't) touch-type, and can get ideas down plenty fast enough with my mixed-mode keyboard/mouse work.

Tilde seems to be a mouse-capable, terminal-based editor that does Unicode. It's a slightly annoying install, but likely quicker than building a full Go language stack on small non-x86 Linux boxes.
posted by scruss at 7:59 AM on September 15, 2016 [1 favorite]


Actually ML-style languages like Haskell are not f(a, b, c), CBrachyrhynchos, but read like f a b c. These languages were designed by people who wrote plenty of lisp code in past lives and knew the good from the bad there.

In fact, our friendly unnamed operation in f a b c is function application, so f has the type A -> B -> C -> D and f a b c d = ((f a) b) c. There is also low precedence function application $ so that f a $ g b c = f a (g b c), which gives you instant access to the oppose associativity for (). And composition . so that f a . g b = \c -> f a (g b c).

In practice, it's pretty easy both to read and write this way. It seems that the knowledge overhead for such operators is cheap for humans, while interpreting a mass of nested () is hard. Assuming you do not intentionally dive off into pointfree insanity obviously.

I do use the mouse all the time, scruss. I do often find it an impediment to using a program well though. A mouse is reasonable at expressing exactly what the program expects you to express, but once you go into menus it becomes quite clunky. If a program is meant to be use lots, then it's faster over the long term if the mouse cannot complete the operation, only reveal it, and the person must type the command themselves.
posted by jeffburdges at 8:11 AM on September 15, 2016 [1 favorite]


I've never understood the "real users don't touch the mouse" thing. It's really prevalent in the Unix world;

Yeah, anti-mouse bias is a case of shedding a crutch and forever despising it afterwards. I use mouse interaction with neovim in iterm2, and it works well: selects text nicely (i.e., within the buffer, in visual mode, not as screen real estate that captures the gutter as well), locates the cursor where I click, and scrolling is much faster when I need to find something visually because I don't know how many 100s of line down it is.
posted by fatbird at 8:16 AM on September 15, 2016 [1 favorite]


Also to note: on a laptop, the trackpad is now almost always right below the keyboard, so it's far less disruptive to move to it than grabbing a puck, which was a huge part of the switching cost for small tasks.
posted by fatbird at 8:17 AM on September 15, 2016


Actually ML-style languages like Haskell are not f(a, b, c), CBrachyrhynchos, but read like f a b c. These languages were designed by people who wrote plenty of lisp code in past lives and knew the good from the bad there.

Sure, but we're talking about editor extension languages and the ML family is limited to yi as far as my last tour. I'm skeptical that ML notation is that much more readable above a certain level of complexity without equivalent chunking of function calls.
posted by CBrachyrhynchos at 8:53 AM on September 15, 2016 [1 favorite]


I gave micro a try on OS X and couldn't get Shift-Down to work for selection. I'll try it out on Linux when I get home. Seems promising but feels like it needs some polish.
posted by CBrachyrhynchos at 10:32 AM on September 15, 2016


mikelieman: "This sounds like a job for XMonad!"

If you want to try XMonad or a tiling window manager, I HIGHLY recommend trying i3 first. It ships with a good default configuration that's pretty straightforward to learn (but print a copy of the keyboard shortcuts!), and has a configuration style that's very hackable and approachable.

Not many tools get that balance right. micro seems to scratch that itch for me.

(BTW, yesterday, I was simultaneously using Webstorm/IntelliJ, vim, Sublime, and micro. I can make a spirited defense for my reasons to use each one for the thing I was doing at the time. At some point, I'll probably drop Sublime in favor of Atom or VSCode.)
posted by schmod at 10:47 AM on September 15, 2016


CBrachyrhynchos: "I gave micro a try on OS X and couldn't get Shift-Down to work for selection. I'll try it out on Linux when I get home. Seems promising but feels like it needs some polish."

Are you using iTerm? I've found that the default OS X terminal has occasional issues with curses/fullscreen apps.
posted by schmod at 10:48 AM on September 15, 2016


Ah, that did the trick.
posted by CBrachyrhynchos at 11:12 AM on September 15, 2016


Oh huh I guess there is a Linux version of Sublime Text. Probably has been for a while but I didn't know that somehow. I pretty much exclusively interact with Linux via remote shell (no X, I mean) so it's not that relevant to me actually - was just thinking about it as I mentioned earlier.
posted by atoxyl at 12:28 PM on September 15, 2016


« Older The attention of readers is not, she says "a...   |   an ecological catastrophe Newer »


This thread has been archived and is closed to new comments