14 ms·
Micro – a modern and intuitive terminal-based text editor
- pkphilip 5y agoThis is really nice! Very easy to use and a very pleasant surprise! Congratulations!
- _def 5y agoTangent: I noticed more and more projects advertising a single executable as a way of distributing their apps. I don't want to judge, it's just another way of doing it, but I'm curious: is this a trend and what led to it? I feel like I missed something.
- marmaduke 5y agoSeems like a trend to me, enabled in part by tool chains like Go’s which make it easy. I like them because using/deploying is simple: put the file somewhere and run it. No apt get runtime library config etc etc to worry about.
- neurobashing 5y agoif I had to guess: things like Docker, K8s, and Lambda. All of them make installing sprawling apps with tons of dependencies really troublesome at best. A single executable with almost no dependencies really simplifies that problem.
- hasmolo 5y agothis feels like the natural evolution if container based deployment. people have gotten focused on a “single thing that works everywhere” to the point that we are back to having binaries include all dependencies instead of making it clear what the host system needs.
- gnuvince 5y agoSingle executable files are very nice because you don't need to run `apt install <14 dependencies>` to try a piece of software, you just try it and if you don't like it, you delete it without any cruft left on your system. Go and Rust are two languages whose compilers produce statically-linked executables and they are growing in popularity, so you should expect to see more and more of these kinds of programs. And as these programs become more spread, I expect that other languages (either existing or new) will make it easier for developers to distribute their projects as single files.
- nrclark 5y agoSlight off-topic, but I wanted to address the above concern. APT, DNF, and many other package managers have an "autoremove" command that will uninstall unused dependencies. So if you did "apt-get -y install $PACKAGE && apt-get -y remove $PACKAGE && apt-get autoremove", you won't have any of $PACKAGE's dependencies hanging around after.
- gnuvince 5y agoTrue. The scenario I was thinking of was `./configure && make && sudo make install` and iterating on all the missing dependencies that the configure script flags.
- TingPing 5y agoGo doesn't support shared libraries. The community likes it...
- theonemind 5y ago“I tend to think the drawbacks of dynamic linking outweigh the advantages for many (most?) applications.” – John Carmack http://harmful.cat-v.org/software/dynamic-linking/ http://harmful.cat-v.org/software/dynamic-linking/
- saagarjha 5y agon.b. John Carmack is a game programmer.
- theschmed 5y agoI'm a bit late to this thread, but I wanted to note: If you are using Ubuntu / Debian / Mint, don't install via "sudo apt install micro". It has been compiled wrong and it launches with a -debug flag which leaves a log.txt file behind every time it is launched. Maintainer is aware but this isn't yet resolved. [0] Alternatives include downloading the .deb file from the Github repo and using the getmic.ro bash script. [1] [0] https://bugs.launchpad.net/ubuntu/+source/micro/+bug/1870939 https://bugs.launchpad.net/ubuntu/+source/micro/+bug/1870939 [1] https://github.com/benweissmann/getmic.ro https://github.com/benweissmann/getmic.ro
- gigatexal 5y agoI am super duper keen to try out any new text editors but I can't move away from vi bindings and the vi mental model. It's done more for my productivity than anything else and I think has reduced or rather pushed back the time when I will eventually get RSI as I can effectively limit the number of key presses to get something done.
- VHRanger 5y agoWhen has the number of key presses seriously been the bottleneck for anyone when developing software Look I like mechanical keyboards and editor setups as well, but let's not pretend it's this great panacea. It just feels nicer.
- chillfox 5y agoSame thing kinda goes for anything on the command line. The amount of commands that are 2-3 characters long really slows down learning and when it comes to it you will often be typing another 80 ish characters after the command name for options and piping anyway.
- avgcorrection 5y agoRSI has got nothing to do with “bottlenecks”. You can get repetitive stress even if you aren’t doing something at full speed or at full intensity.
- xyzzy_plugh 5y agoWhat on earth are you talking about? The whole point of all these tools is to reduce the amount of key presses needed. Why do you think ed -- the standard text editor -- was conceived? I jest but this is kind of the whole point of modern computer interfaces vs typewriters and punch cards. Historically it has _absolutely_ been a bottleneck, and I feel like it's being taken for granted that you can search-and-replace or use sed or your IDE's context-aware renaming/refactoring. Have you even used macros in vim (or whatever)? It's practically a modern editor's raison d'être.
- infinitezest 5y ago
- Aeolun 5y agoJust in case one of the maintainers sees this. Searching for plugins name or description is case sensitive.
- capableweb 5y agoJust in case you weren't aware, the project is open source and hosted on GitHub, where you can also find their issue tracker, if you really want to reach the maintainers: https://github.com/zyedidia/micro/issues https://github.com/zyedidia/micro/issues
- le-mark 5y agoVery helpful response, but generally I think the set of people who refuse to learn vi/vim is orthogonal to the set of people who are willing to go seek support!
- VHRanger 5y agoLove it as a replacement for sublime text to quickly look at or edit various random files
- skrebbel 5y agoAs a Windows native, for years I felt limited when shelling into Linux systems, because all editors felt weird to me. Obviously the solution would be "just learn vim already" but I'm lazy. I settled on nano because it at least shows what shortcuts are available, saving me from having to Google "how to find text in vim" every time. But its shortcuts are weird (to me) and even the descriptions are. UnCut? WhereIs? Huh? Micro really got the UX right for people like me and it made me more happy than I expected. It's now the EDITOR on just about every non-GUI system I have access to and I love it. Thanks, Micro authors!
- rgoulter 5y ago> Obviously the solution would be "just learn vim already" but I'm lazy. Vim keybindings are great. :) But I'd rather people learn vim keybindings out of curiosity rather than necessity.
- johnisgood 5y ago> saving me from having to Google "how to find text in vim" every time Why would you have to do it every time? Sure, if you do it very rarely then you may forget, but I dunno... In any case, the way you search in vim is the way you search in `less`, `mupdf`, etc.
- oblio 5y agoYup. Great, well balanced light editor with almost 0 installation worries. Just copy the binary over.
- nirui 5y agoI started to heavily using vim since the last few months because writing code through SSH is very attractive for my current situation. For me, learning vim is like learning an foreign language, a few hundred words (or few hotkey/:commands for vim) can get you started, but it's not easy to reach the level of native speakers, and some old rules in your language (for example, HJKL keys in vim vs the "natural" arrow keys) will interfere your progress. Maybe I'm going to piss many people off here, but vim is not an user-friendly text editor. An user friendly editor should pop some kind of prompt when I pressed the first g/G key and show me what I could press the next, not telling me to read :help (which probably has the volume of a dictionary at this point). Based on my 2 minutes with Micro and the information I read from it's `help defaultkeys`, the size of it's hotkeys are more healthy and manageable. So that's a plus from me.
- zerr 5y agoEDIT.EXE is pretty intuitive. Pity that it was removed from Windows eventually.
- eismcc 5y agoAt point while on the Windows kernel team, I was working on a port of edit.exe but when I left the team, development stopped. I was initially going for a identical replacement with a replica menu system but behind able to handle large files, modern capabilities.
- jimmygrapes 5y agoedit.com I thought it was
- rashil2000 5y agoThankfully, the author of Yori[0] shell has made a modern port of EDIT called, well, Yedit[1]. [0]: http://www.malsmith.net/yori/ http://www.malsmith.net/yori/ [1]: https://virtuallyfun.com/wordpress/2021/03/03/yedit-the-missing-edit-com-replacement-for-modern-windows/ https://virtuallyfun.com/wordpress/2021/03/03/yedit-the-miss...
- beepbooptheory 5y agoThe things people build to avoid learning vi...
- Meekro 5y agoI love my laziness, and won't give it up. =) I've already switched to this. Installing and configuring it was a lot easier than learning vi would have been.
- emptyparadise 5y ago"If I had asked people what they wanted, they would have said faster emacs."
- legends2k 5y agoNah... they use Emacs server now :P
- quickthrower2 5y agoOr a typewriter with grep support.
- kortex 5y agoI wish people would stop treating vi like it's God's gift to every programmer on earth. I forced myself to use it for two weeks just to see what the fuss is all about and try to push through any bias. So first off I use Dvorak so I have to switch tons of the bindings so I can use reference layouts. My moonlander keyboard already gives me directional movement on home keys. I don't have a ton of things to automate that I cant do in Alfred and my keyboard has over 1000 possible slots for keys and macros, more than I could ever use. Unlike Alfred workflows, the macros are trapped in vim. I have to add a ton of plugins to get anything approaching the experience of Pycharm and now it's just as slow, the auto completion is worse, and it looks like ass. But hey at least I can use it over an ssh connection (gotta transport all of my config first!), as if sshfs is not a thing, not that my work load is all cloud containers so I rarely ssh at all anyways. Micro fills a niche for me where I don't want to leave the terminal and just need to edit a few lines.
- mhd 5y agoFor a while, I recommended the fte editor[1] to people coming in from the Windows/DOS camp, but that went out of development quite a long time ago. Good to have a go-to non-proselytizing replacement that works in a terminal and isn't nano. [1]: http://fte.sourceforge.net http://fte.sourceforge.net
- drran 5y agomc + mcedit is much better for those, who came from DOS camp.
- yakkomajuri 5y agoDefinitely tough to "compete" in this space because locally most people end up going to their IDE of choice for heavier workloads and if you do decide to use a terminal editor, you'd rather have it be compatible with things you'd encounter in the wild (e.g. a remote server, someone else's machine). That being said, this is cool. I've set it as my default editor for the GH CLI to use it for pull requests and the like, let's see how it goes!
- kortex 5y agoThe ergonomics are so much better than vi/vim/nano that it is my go to edit from the CLI tool. Sometimes it's faster to just edit a line than mouse over to my IDE. And yes I think vim has bad ergonomics. It's so much effort to get it configured to work for me. I get way more out of Alfred and my moonlander keyboard with macros that work across the whole OS.
- rgoulter 5y agoA moonlander keyboard makes for an interesting comparison here: It's worth taking time to learn something to get a better experience. Keyboard layering takes some time to get used to (especially if you can already use a standard keyboard), but is worth being able to reduce hand movements. Modal editing takes some time to get used to, but provides a richer navigation/editing experience. Similarly, you can customise your moonlander to the point where it's yours and no one would know how to use your keyboard.
- mixmastamyk 5y agoIt’s compatible with just about everything still maintained. And a simple scp if not installed.
- Severian 5y agoAs another commenter noted, this is a good alternative to Nano (I too need to learn Vim). I've checked this out, and I like what I see so far. Typically my main use for text editors is for log analysis (mainly Sublime Text). This usually means I write a lot of regex for searching. With that in mind, I do see one shortcoming in the choice of Lua as a scripting language. It's not really known for it's text processing abilities. One major shortcoming is that it doesn't have a true regex engine. This is something I use extensively. For most of my use cases, this would require I hack together a native search in the application, and then pipe the buffer to Lua for post-processing. I'm not sure if search/replace pipelines are going to be easy to code in this manner or efficient enough to be worth it. I use Sublime Text because it uses Python and makes this relatively easy. Or if I'm searching over thousands of logs to use ripgrep and just pipe in whatever that way since it can search 10GB in a few seconds with moderate sized regex. Otherwise, I like the approach and the helpful commands for the user! It is definitely nice to be able to stay in a terminal instead of using a GUI to edit.
- johnsea 5y ago> (I too need to learn Vim) well, then start. What are you waiting for? E.g. here: https://danielmiessler.com/study/vim https://danielmiessler.com/study/vim. Don't miss Vim as Language.
- rcarmo 5y agoIf you're fiddling with logs, pick an editor that can handle (theoretically) unlimited file sizes -- which is something that very few mention supporting. vim will do you great stead for what you seem to need.
- Severian 5y agoYeah, buffering in an editor is important. I'll look into Vim a little more.
- Koshkin 5y agoThat’s what I have never understood - why would you want to open a log file in a text editor (when the standard tools of the trade in this case should be an “unbuffered” text viewer, which by design, can handle files of any size, fgrep, and, if you want to generate a report, a stream editor, such as sed).
- kseistrup 5y agoDoes `micro` have an “insert file at current cursor position” now? It didn't when I last tried out the editor, and that was a showstopper for me.
- revscat 5y agoWhy don’t you write a script that does that?
- kseistrup 5y agoPerhaps I don't have the skills for doing that? I gave micro a try because I thought it looks like a nice and somewhat intuitive text editor, but I regularly need the “insert file” function.
- 95014_refugee 5y agoShell out, ‘pbcopy < file’, paste, done.
- mixmastamyk 5y agoCan probably be run with Ctrl+E, aka Cmd, in micro.
- stevekemp 5y agoJust looking at the documentation nothing jumps out, but reading the plugin reference it seems like it would be an easy thing to add. You have access to read a file, you can get the current buffer, so inserting the text must be almost trivial. It seems like an odd showstoppper to have, but if you're tempted to switch writing the plugin might help you get a feel for how good the editor is in other ways.
- atombender 5y agoFor a couple of decades, my go-to terminal-based editor has been JOE (Joe's Own Editor). [1] JOE has everything I need — it's fast, it has syntax highlighting, multiple buffers, etc. Also, it uses the WordStar key bindings, which are the same bindings used by Turbo Pascal and the other Borland IDEs that I grew up with. But Micro looks great, too. [1] https://joe-editor.sourceforge.io/ https://joe-editor.sourceforge.io/
- vanderZwan 5y agoI really appreciate that he ends the page with links to other editors to consider, in case his doesn't fit someone's needs
- mekster 5y agoExcept the listing looks ancient and doesn't bring alternatives like this post's link. You don't use "sed" as a text editor.
- vanderZwan 5y agoPresumably that is because the page is ancient too
- donio 5y agoJOE is where I started my Unix editor journey, the Wordstar bindings were familiar coming from DOS and Borland tools. From there I went on to jed which also had Wordstar support and it gave me a taste for extensibility. Jed's native keybindings were based on Emacs though so I eventually arrived to the real deal and it has been Emacs ever since then. But also learned vi basics along the way of course. :)
- garyrob 5y agoI feel the same way, I use JOE's jstar mode because I fondly recall using Wordstar under CP/M, and it has enough features for basic editing.
- kirillbobyrev 5y agoThis looks nice but I can't what the target audience and intended usage patterns are. It's somewhere between 1. "simple text editor to use on servers/whenever I need to edit something quickly". That place is taken by nano that is easy enough so that people don't have to learn it, or vim for those who mastered it. In this niche it's important for the editor to be ubiquitous enough and present even on the old machines. 2. Regular day-to-day code editor. Micro has _some_ autocompletion, syntax highlighting etc. But for a modern editor to function, it really needs an LSP client implementation. But this seems to not be happening so far: https://github.com/zyedidia/micro/issues/1138 https://github.com/zyedidia/micro/issues/1138 Micro has some features in each bucket (simplicity, ease of usage vs. IDE-like features) but does not seem to really excel at either.
- makeworld 5y agoI use Micro as a better Nano. The syntax highlighting is better, the copy pasting is better, and most of all, the key bindings are the ones I'm used to. I can use Nano fine, but Micro is much more intuitive.
- kortex 5y ago> In this niche it's important for the editor to be ubiquitous enough and present even on the old machines. Why are people still treating this like a deal breaker? It's a static go binary, if I can ssh to it, I can scp micro to it, or more typically just curl the latest release from GitHub into ~/.local/bin (no sudo!). Just like you'd do with your vimrc. Apparently this is controversial.
- kirillbobyrev 5y agoBecause sometimes I can't download binaries from the internet and sometimes... well, I don't have the internet! One scenario for the latter is installing an OS from scratch. One might call me lazy but I don't want to end up learning multiple editors for different scenarios if the benefits are marginal, especially if I can get away with just one!
- mixmastamyk 5y ago
- JasonFruit 5y ago> curl | bash I hate this. I know everyone's doing it, but it's just awful. Read the script, then run it.
- saralily 5y agoyou can do this when the installation is presented this way
- speedgoose 5y agoHow is it different than running a binary you just downloaded?
- deltafourone 5y agoI'm looking for Clion/Pycharm level quality code analysis and features in a terminal form factor. Does this solution exist? Can it exist? Will it ever exist?
- RivieraKid 5y agoI've been using this instead of nano for 2 years and can recommended it.
- throwdbaaway 5y ago1 month in after more than 10 years with nano. Can recommend it as well.
- jftuga 5y agoWindows sys admin here. Micro is nice because it is a single-file, stand-alone executable that has mouse support, macro record/playback and syntax highlighting. (I haven't checked Nano recently). Because of this, I don't mind installing it on servers. It is great for making quick edits to json configs, batch files, powershell, python scripts, etc. Syntax highlighting and line numbering are key. The alternative is editing the file locally and then getting it onto the server which can be challenging for locked down systems, especially Windows Server Core which does not have a GUI environment. Even on my local machine, if I need to make a really quick edit, it is much faster to use this than waiting for VS Code or PyCharm to load. You also stay focused. By this I mean, your eyes don't leave the powershell window that you are currently working in. This allows me to more quickly complete the task at hand.
- andix 5y agoDoes it have a vim mode? :D
- TLLtchvL8KZ 5y agoDoesn't seem to be mentioned yet but at least on my machine, it knows shellcheck is installed and as I save scripts I get red arrows at the side of "problems" and the description, for eg, Quotes/backslashes will be treated literally. Use an array. [SC2089] At the bottom, I find it quite useful although I'm not sure how one would turn it off as I didn't turn it on.
- askonomm 5y agoI wouldn't say something lacking a LSP is modern by todays standards, as that would mean it lacks syntax highlighting, go-to definition, and other basic things for a bunch of languages.
- pxc 5y agoLSP is not required for syntax highlighting, and in most languages global/ctags is good enough for jump to definition LSP is good though
- askonomm 5y agoIt isn't good enough. There's a bunch of new languages coming out all the time, and even ones that are 10 years old (Clojure) aren't supported well in editors without LSP support, like Micro. LSP support allows the language ecosystem to provide the building blocks so that developers could write that in any editor that supports LSP.
- jeddy3 5y agoLSP is definetely not needed (or even widely used?) for syntax highlighting. LSP is not even used for highlighing in vscode, where it originated.
- throwdbaaway 5y agoI have never found the need to use go-to definition, until I started working on some golang codebases. The code organization in these codebases is typically abysmal, with multiple files in the same package participating in N ways nested orgy. Of course, micro is written in golang, and it seems like the author is doing just fine without relying on LSP.
- askonomm 5y agoIf you've never needed to use go-to definition then I assume you never work on anything even remotely large. But even in projects with, I don't know, 10 files, I find go-to extremely useful.
- NelsonMinar 5y agoAwesome! I keep looking for the perfect solution for this. I use GUI editors for real projects but when I need to quickly edit a config file on a remote machine I currently use mg. It's not bad but it doesn't support Unicode. It's also nearing 35 years old now and while that has its advantages maybe something more modern would be better. The main reason I still use it is that it has emacs keybindings which sadly are seared deep into my brain.
- donio 5y agoI use godit as my microemacs. It's written in Go so you get a statically linked executable, easy to cross-compile and it supports UTF-8. https://github.com/nsf/godit/ https://github.com/nsf/godit/
- deleted 5y ago[deleted]
- vesche 5y agoI tried Micro on for size for a few months earlier this year. I like it a lot, but stopped using it over time. Any time I reach for a text editor I kind of muscle memory open vim if it's something quick or VS code if it's a larger project. Micro is like nano re-built for the 2020's. It feels really natural to use with sane key bindings and text selection. I like that it's written in Go and has a nice plugin framework. I might have used it more if a file manager / code tree off to the side was a built-in feature. I found a plugin that could do it, but I had some hassles with it iirc - https://github.com/NicolaiSoeborg/filemanager-plugin https://github.com/NicolaiSoeborg/filemanager-plugin
- mixmastamyk 5y agoRebuilt for the 1980s IBM CUA. :-D
- throwawaybutwhy 5y agoAh ok. The usual editor wars. There's one point that has to be made: software lives or dies (or withers on the vine) due to network effects. In the case of Micro vs Vim vs Emacs it's all about keybindings and the time to learn them. Micro uses CUA [0] keybindings intuitive for most Windows users, while Vim and Emacs (cua-mode notwithstanding) are stuck in the middle of shallow local optima. [0] https://web.archive.org/web/20010107084700/http://publib.boulder.ibm.com/cgi-bin/bookmgr/BOOKS/F29BDG00/CCONTENTS https://web.archive.org/web/20010107084700/http://publib.bou...
- Kessler83 5y agoI'm sure Micro is great, but I doubt it's anywhere even near Vim or Emacs, in any respect. Because it's not "all about keybindings," and claiming that either of those editors is stuck in a local optimum is simply counterfactual. As for living and dying, Vim is 30 years old and Emacs is 45 years old. We'll just have to see how long Micro stays in the game.
- rgoulter 5y agoRight. I think saying 'Vim/Emacs aren't as good as other editors because they're unapproachable to new learners' is like saying 'Linux is a worse OS than Windows because it's hard to use'. -- Sure, you want something to be accessible to everyone. But there's also a benefit to enabling power-users to learn the system. That said, kakoune looks like an interesting demonstration that maybe vim's <action><text selection> commands could be clearer as <text selection><action>.
- Kessler83 5y agoAbsolutely---also, Emacs, Vim and GNU/Linux aren't hard to use. You just have to accept that they're not like Windows and follow the instructions on the screen. The documentation is generally very well written and exists from beginner level to advanced. There are also tons of places where you can go to get help when you get stuck. Imo the whole "hard to use" thing mostly comes from people who feel they are already expert (at something in Windows) and get frustrated when they discover that there are other paradigms in which they are still beginners. So they label their own knowledge as doxa, and anything that doesn't conform to it is labeled "unintuitive," "obscure," "dated," "hard to use" etc. The same mechanism is behind quite a few of the voices claiming GNU/Linux communities are unfriendly or abrasive (i.e. someone gets frustrated upon the discovery that not everyone recognizes them as the expert they think they are).
- walrus01 5y agoThis looks great as a software project. And a good alternative to Nano. But from the website: "curl https://getmic.ro https://getmic.ro | bash" NO! We need to stop getting people comfortable with the idea of just curling random stuff into their shell. Even worse is software that suggests you sudo curl it into bash. What could possibly go wrong? Download and build it yourself. Or download and install a packaged .deb or .rpm or whatever is the equivalent for your platform. Do not just blindly curl into your shell things coming from people you don't know and trust to the level that they are personal friends and you would loan them your house keys or your car.
- jameskeim 5y agoThis is not the same as "sudo curl https://getsomefile.ro https://getsomefile.ro | bash". That is dangerous. While I understand your point, it's really not the same thing. This checks your system for its architecture and then downloads the correct binary to the directory you run it from. I know this because it's very easy to copy the URL, drop it in your browser and read the script. That's what I did before running it. And it is certainly safer than adding some random software repository which is what a lot of instructions suggest.
- Meekro 5y agoWhy is this more dangerous than installing a deb, which can also run arbitrary code as root?
- anlar 5y agoIt is more about streamlined process of package management to which Linux users are used. At least with deb/rpm package I understand where package stuff goes and how to uninstall it (of course, packager could mess up this with arbitrary install scripts). And each 'curl https:// https://' packager has its own idea where his software should be installed. And many of them are not even providing automated way to delete their application.
- walrus01 5y agoa .deb at least went through some cursory level of examination by the people who downloaded the source, built it and are authorized by the debian project to submit new .deb files to the debian package servers. not just any random person can submit a .deb and have it go live on the gpg-key authenticated debian mirrors. https://wiki.debian.org/Packaging https://wiki.debian.org/Packaging https://www.debian.org/doc/manuals/debmake-doc/index.en.html https://www.debian.org/doc/manuals/debmake-doc/index.en.html curl into bash can be as quick as "ooh look shiny new thing on website, let's copy/paste this string of text into my shell"
- Osmose 5y agoMicro is my go-to git commit message editor, especially because it can correctly syntax highlight verbose-mode commit messages (passing -v to git commit will put the diff you're committing below your message as a helpful reminder).
- ChrisArchitect 5y agoAnything new here? Lots of previous discussion: 1 year ago https://news.ycombinator.com/item?id=23334190 https://news.ycombinator.com/item?id=23334190 4 years ago https://news.ycombinator.com/item?id=15360509 https://news.ycombinator.com/item?id=15360509 6 years ago https://news.ycombinator.com/item?id=11516902 https://news.ycombinator.com/item?id=11516902
- rav3ndust 5y agoLove micro and use it frequently in my work. Simple, easy to configure, and sensible keybindings.