11 ms·
Micro: Modern and intuitive terminal-based text editor
- edem 6y agoWhy would I use this instead of Emacs?
- asgeir 6y agoI like using it as a prettier version of nano
- tablebookchair 6y agoIt's probably much more intuitive when you come from editors like sublime / atom and similar.
- kazinator 6y ago"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.
- brutt 6y agoPrevious discussion: https://news.ycombinator.com/item?id=15360509 https://news.ycombinator.com/item?id=15360509
- red_admiral 6y agoLooks 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.
- saagarjha 6y agoFrom 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 6y agoWell, 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 6y agoI 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.
- kylebarron 6y agoI'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 6y agoMight 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.
- atemerev 6y agoMicro is my favorite editor, I use it for everything.
- kart23 6y agoLooks 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.
- nicoburns 6y agoMicro 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.
- mercer 6y agoSadly no Vim keybindings plugin ;)
- rooam-dev 6y agoI heard vim supports Vim keybindings out of the box. I may be wrong, I use IdeaVim mostly.
- mercer 6y agoSadly no OrgMode though!
- SanchoPanda 6y agoSure it does! We just have to re-define "the box" to be apt install *
- bscphil 6y agoSeriously, 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?
- fpoling 6y agoSomething like Amp [1] or Kakoune [2] ? As with vim they are modal, but one needs to press less keystrokes and they are more intuitive as they use object_letter -> action_letter, not action_letter -> object_letter model. [1] - https://amp.rs/ https://amp.rs/ [2] - https://github.com/mawww/kakoune https://github.com/mawww/kakoune
- jotaf 6y agoJust to play devil's advocate, these 3 examples don't seem much faster than Shift+(Del,Del,Del), Ctrl+F,string, and F3, respectively.
- imshashank 6y agoThe 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 6y agoMicro 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 6y agoI'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.
- reddotX 6y agomicro > nano
- entha_saava 6y agoWell 1e-6 > 1e-9
- bregma 6y agoNine is bigger than six.
- The_Colonel 6y agoPersonally I'm waiting for the mini.
- dheera 6y agoI'm waiting for the milli, I'm not sure what the mini is.
- karatestomp 6y agoAbout 60x greater, it seems.
- Narishma 6y agoIndeed, 13MB > 0.2MB.
- maitredusoi 6y agoDo 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 6y agoThose 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 6y agoI'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 6y agoThat 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!
- deleted 6y ago[deleted]
- pbsds 6y agoI 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 6y agoI 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 6y agoIf I remember correctly, on osx/macos, the relevant keybinding uses alt-{left,right}. GP might be referring to that.
- pastelsky 6y agoHave 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 6y agoAnd here I would have thought "mu" would have been the preferred short name...
- SanchoPanda 6y agoIf 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.
- deleted 6y ago[deleted]
- MuffinFlavored 6y ago> Built in sublime style multi-line editing Can I use my mouse and keyboard shortcuts like I usually do when I am editing text? edit: nevermind. i thought this was the be-all end-all i am looking for in terms of a modern terminal where I can click/drag stuff with my mouse like I can with a text editor/textarea box in a web browser.
- SanchoPanda 6y agoI had no idea highlighting something and dragging it with the mouse was a thing. It works all over the place from quick testing. This is cray, how have I missed this my entire life?
- ianwalter 6y agoI 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.
- FpUser 6y agoReally nice. I wish I knew about it before.
- caribousoup 6y agoBeware: 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.
- bildung 6y agoHave you tried out ne, the nice editor? Also packaged in Debian for quite a while, has syntax highlighting, ctrl+s saves a file etc.
- zyedidia 6y agoDo 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 6y agoThis 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 6y agoDid 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).
- gravypod 6y agoHas 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-_ 6y agoIt 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
- fmakunbound 6y agoI 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 6y agoKeep 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.
- neves 6y agoExcellent. 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 6y agoIt's not exactly small, for a text editor. It's two orders of magnitude bigger than nano, for example.
- abraxas 6y agoThis looks nice! Has anyone created BRIEF bindings for this editor?
- vngzs 6y agoGreat! 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-pgp-verified-install https://sandstorm.io/news/2015-09-24-is-curl-bash-insecure-p...
- bpiche 6y agoI'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.
- ilaksh 6y agoReminds me of Textadept.