37 ms·
Modern terminal-based text editor
- JasonSage 9y agoI wonder what the target audience is for an editor like this is. Most folks who use Vim/Emacs seem loyal to their editor and are not in much need of alternatives. Those who don't have plenty of graphical ones—Sublime, VS, Atom.
- moosingin3space 9y agoThe target audience is people who casually use the terminal (probably over ssh) and need something simple to edit a config file with. This comes with all the basics that people expect from a graphical editor like Notepad++ and comes with familiar keybindings from CUA applications. I could see something like this being very useful for that use case.
- discreteevent 9y agoThat's actually a big market. People coming from vim will wonder what would you use it for when vim is so much more powerful. But this is a godsend to users who are used to gui editors. If they want something that behaves like every other editor and IDE they use there is very little available. In particular I don't know of any terminal editor that comes as a single binary and uses standard keystrokes like micro.
- marssaxman 9y agoI wrote an editor which more-or-less matches that description: http://www.github.com/marssaxman/ozette http://www.github.com/marssaxman/ozette I've never expected nor done any work to attract users other than myself, so there are a handful of rough edges I've never bothered to polish, but I have in fact been using this thing full-time for several years. Perhaps I wouldn't have written it if micro had existed back then.
- mixmastamyk 9y agoCool, any screen shots? Would like to see the tabs with a few files open.
- marssaxman 9y agoThanks for your interest. I've added a couple of screenshots to the readme. I usually run ozette in a terminal filling one monitor, with 2-3 files open. It works fine with more, but you just can't see much of their contents; still, seeing the edges of the other files in a stack behind the active tab somehow helps my sense of spatial navigation. It's funny how life works. There is nothing especially sophisticated about this bit of code, it has many little bugs I've never bothered to fix, and I'd design it completely differently if I started now. Still, though: after thirty-plus years writing code, I've gotten more actual use out of this little tool than anything else I've ever written. Judging by the ratio of hours spent writing it to hours spent using it, nothing else even comes close, not within an order of magnitude.
- kbenson 9y agoThe reason they don't use those standard keystrokes is because for a terminal there is a much older standard that takes precedence regarding control characters. What's ctrl-z do? Background, or undo? It's nice for undo, but losing backgrounding capability is crippling if you use it.
- kpil 9y agoSolution. Add an additional unix control key to all keyboards. Maybe actually instead of caps-lock. I think I've solved all my keyboard related problems know.
- kps 9y agoThe solution adopted by Unix-era GUIs, and the Macintosh, was to use a different key for GUI shortcuts rather than overloading Control. X11 generically calls it ‘Meta’, USB calls it ‘GUI’, Sun had Diamond, etc. It was only Windows that botched it, and the this-is-finally-the-year-of-Linux-on-the-desktop-trust-me-this-time crowd who slavishly imitate it while ignoring Unix experience.
- gh02t 9y agoFunny enough, I use the Win key on my keyboard effectively as a 'meta' for all my shortcuts in i3. It was the only key that wasn't doing anything.
- mixmastamyk 9y agoIt’s rare to need to background a console editor, and many can run commands themselves in the background. Combined with tabbed and split terminals not much if anything is lost.
- kbenson 9y ago> It’s rare to need to background a console editor, LOL. My experience with an average of 5-6 backgrounded vims *per each named tmux session" which I use to keep track of different source files I'm working on goes against this. Sure, I can use vim's windows, but I don't want split screen usually (I'll use the other terminal I have open if I do). I don't use tmux's windows either really. It's more a way to preserve session when changing workstations (these are remote terminals), and preserve against network drops. I use each tmux session as a contained work environment for the most part. I do all my software development using vim on a remote server, and have for most of the last two decades. I've worked with numerous other developers that work similarly for professional projects, personal projects, or both. Let's just say that there might be people that use the combined features of terminal applications, terminals, and remote connections in ways that you might think were rare, but actually have large following and leave it at that. :)
- deathanatos 9y agoWindows doesn't have sshfs, do they? If it did, you could just mount the remote, and use whatever UI editor you want. I do this with gvim (but on Linux)
- arnvidr 9y agoI would imagine replacing the simpler editors, like nano.
- apk-d 9y agoComing from a Windows background, Vim/Emacs are alien to me and Nano feels underpowered and weird. For lightweight text editing, this appeals to me much more at first glance.
- worldsayshi 9y agoI would really like to see a fully featured terminal based editor that is built with modern keybindings in mind. I've given Emacs a solid chance but ended up switching to Atom (weird keybindings and configuration that kept breaking made me leave in the end). I like most things about Atom. The package system. How it's configured and navigated. But there's a simplicity (and memory footprint) of the terminal based UI that is missing to really make it the perfect editor (for me).
- dcre 9y agoI use Atom for most of my work, but sometimes it's more convenient to edit a file on the command line.
- wry_discontent 9y agoI'm a pretty hardcore Emacs user, and I'll just come right out and say it: I hate Emacs. However, the only thing I hate more than Emacs is anything else. I tried to move to Atom, because I've heard good things, I read you could extend it in JS and that sounded good to me. The difference between customizing Emacs and customizing Atom could not be more night and day in my experience. Emacs is like a living thing, as crazy as that sounds. I feel the urge to make a slight customization to a key (which happens often) I just ask Emacs what function the key is executing and either wrap it in a custom function, or advise the function. I usually write and eval these customizations in the scratch buffer. Meanwhile, Atom makes me restart to get any changes detected. There wasn't any live documentation system that I could find (which is something I can't fathom not having now). Emacs, in terms of customization, is simply light years ahead of absolutely everything else. It's absurd to me that we're still stuck with it because seemingly nobody who wants to make a text editor has learned the lessons it has.
- shalabhc 9y agoOver at howl.io we're building an editor that's live editable like emacs. You can eval snippets of lua or moonscript code and they take effect immediately.
- soapdog 9y agoIs the windows 10 version stable yet?
- SPBS 9y agoI'm curious, then what makes you hate Emacs?
- Blackthorn 9y agoI'm not him, but I have the same opinion. Emacs doesn't play super well with others. You can do a lot of things in emacs, but you can't do emacs in other things. On the occasions that I'm writing Java, I find IntelliJ to be super awesome. But I get annoyed because the editor in IntelliJ is not emacs. I'd like to be able to do things I can do in emacs in IntelliJ. Realistically, that means replacing the IntelliJ editor with emacs, but at the moment that isn't really possible. Some things you can use emacs for, like editing web forms (I used to do that with an extension in Firefox), but emacs is really not so great at being used in other programs. As far as emacs itself, the somewhat crappy GUI rendering precludes creating an IntelliJ like experience.
- gabrielgoh 9y agoWhen working over ssh, its handy to have a text editor for making small edits here and there. I'm very excited about this editor!
- brianon99 9y agoAgree. Though micro looks very good as a light weight editor for programmers, arguably better than vim in some way, it cannot move (neo)vim users like me away. Borrowing Linus Torvalds words on why he is using micro-emacs, "My fingers cannot be retrained."
- jtokoph 9y agoI use VSCode for 99% of my work but I have EDITOR=micro for quick edits and for all of my git message writing. I don’t want to load a vscode session just for a quick commit message, but I want longer free form than you can achieve with “-m”. I also bind save and quit to a single key combo for quickness.
- tscs37 9y agoHardcore ex Nano user here. I prefer Nano nowadays since it has more sanity in key bindings and Works quite well as a replacement for Nano.
- kronos29296 9y agoDo you use nano instead of nano? Is it typo?
- tscs37 9y agoYeah a typo. I'm slightly sick and wasn't quite awake at the time. I filled an issue regarding that but the maintainer seems absent.
- atilaneves 9y agoEmacs _is_ a graphical editor. You have to type `emacs -nw` to make it run in the terminal under usual conditions.
- solidsnack9000 9y agoOne use case would be a fallback editor for junior developers. It's still important to have syntax coloring for things like config files, JSON files, editing shell scripts and writing Git commit messages; and you can't always use the IDE for these things: * The IDE can be too slow to start. * Maybe it's not working today. * Maybe it's not on the server. Vim addresses nearly all the requirements -- it's reliable; it's easy to use as $EDITOR, to be called by other CLI tools; and it offers great syntax coloring and editing options. It's just that it's too confusing. The old joke about developers shutting off the computer to quit...
- BenjiWiebe 9y agoPlease. Nowadays vim tells you how to quit. If you press control c, it clearly explains how to exit. I learned vim a few years ago, and immediately figured out how to exit it (just do what it says!) and by now it's my main editor and I love it.
- solidsnack9000 9y ago> Nowadays vim tells you how to quit. If you press control c, it clearly explains how to exit. I'm not sure whether I am happy or sad that it does that now.
- antjanus 9y agoRandom request but I'd love to see a video of someone using it. That's what sold me on VIM and on Emacs: just seeing someone power use it and love it.
- petepete 9y agoNot for this editor, but here's a really impressive introduction to Kakoune, another small but excellent app https://github.com/mawww/kakoune https://github.com/mawww/kakoune https://vimeo.com/82711574 https://vimeo.com/82711574
- deltaprotocol 9y agoThis. I'm a loyal Emacs user (used Vim a couple years before migrating to Emacs and always kept it around) but I must confess: I'm in love with kak. It's not Emacs (although it is powerful) and will probably never be (even more so to a lisper) since it doesn't try to. But it is easy and minimal, which gives me some pause after long Emacs hours. I was very impressed to find that it has some degree of integration with tmux and with ranger, both tools that I love, to do window splitting and file management respectively. So clever and such a strong setup for a newcomer! I don't really feel it as a competitor and I still do work in Emacs, but it became my default terminal editor and my fallback $EDITOR. Knowing vim made things a lot easier and everything that I discover about it feels like an improvement. Highly recommended.
- sevensor 9y agoI'll second that too. 19 years with vi / vim, and it took kak less than a week to win me over.
- rippsu 9y agohttps://www.youtube.com/watch?v=OSq59QmdmC8 https://www.youtube.com/watch?v=OSq59QmdmC8
- girst 9y agoSo...the look of Vim/Emacs without their advanced editing features? (sorry for being so negative; this page really could benefit from a demo video)
- hultner 9y agoThis is what i gathered as well? Maybe an alternative for nano-users? I’m not sure which space this editor tries to fill. Non the less fun project and always interesting to see new terminal based applications.
- marcosdumay 9y agoAre there nano users out there? It's an ok editor to throw in the face of an unsuspecting random person, much better than both vi and emacs. But it's an absolutely horrible choice for constant usage.
- perryprog 9y agoI use what I get, if I have a nice config with Vim, I'll use it (badly, but it works well for me). Most of the time I'm happy with nano, assuming it's a one time edit thing like /etc/hosts, or I'm copy-pasting something into a file.
- kylek 9y agoSort-of-offtopic but this irks me >>easy to install (it's just a static binary with no dependencies) For some definition of "install". No deb/rpm/snap
- movedx 9y agoIt's written in Go, which compiles down to a statically linked binary. It's very easy to install: you download it and run it. If you're on macOS, the latest version can be installed via brew.
- pantalaimon 9y agoWhich is actually really nice for a non-standard editor like this. If you are on another computer and want to use it, just download a single file and run it, no need for root.
- half-kh-hacker 9y ago> Download binary for your architecture > Put somewhere in your $PATH, I use /usr/local/bin/ > You're done. Otherwise, your package manager'll probably have it, I know that Homebrew does as well as the AUR.
- gumby 9y agoAn RPM with one file in it???? That would be more work than simply scp'ing the binary across.
- dm319 9y agoCompiled Go is great, as long as it makes its way into the repositories at some point.
- Lazare 9y agoThis looks like it's aimed at being a better nano, not a better vim. I like it a lot; I wouldn't be sorry to see it take off and get included in OS X, major linux distros, etc. Because right now if you don't want to use vi/vim, your only reliably available option is nano, and nano is a terrible editor.
- emeraldd 9y agoHave you ever tried JOE? It's what I used prior to vim ... https://en.m.wikipedia.org/wiki/Joe%27s_Own_Editor https://en.m.wikipedia.org/wiki/Joe%27s_Own_Editor
- pantalaimon 9y agoI find JOE much more awkward to use than nano. micro on the other hand feels a lot more like Sublime Text for the terminal. I like it. :)
- ino 9y agoI like Nice Editor or ne. This one, micro, looks interesting. I’ll give it a try.
- jhallenworld 9y agoWhat's awkward about JOE?
- anthk 9y agoJOE has jpico (nano like) jstar (wordstar) and jmacs (emacs) keybindings.
- mixmastamyk 9y agoI’ve always wanted something like the old DOS edit or turbo vision editors with CUA key bindings, to the point where I maintained my own for several years around 2000. On Linux “ne” is not a bad choice, though I’d like an upgrade. Remembered why I didn’t stick with it now, it doesn’t have menus and there was a bug that has been fixed, will try again.
- ColanR 9y agoFrom the github repo: > 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).
- freshhawk 9y agoJust in case people are still making decisions about needing to use an editor because you are doing something over ssh. Learn about sshfs! Use your preferred editor (or any program) locally for files you have ssh access to. It's not the right solution for everything, but for me it is for most things.
- bobajeff 9y agoThat's a very good solution for accessing files remotely. However there are some environments where only a terminal and ssh client is available or useable (eg. Embedded devices). In addition sometimes you need to run things from the server.
- Spivak 9y agoYou don't even need sshfs. Both VIM and Emacs support network transparent file editing. :e scp://user@remote.tld/path/to/file C-x C-f /scp:user@remote.tld:/path/to/file But the real magic on Emacs is using dired remotely.
- jholman 9y agoI had to chuckle. On the one hand, this comment is brilliant, because it's a concise piece of esoteric information. High signal-to-noise! And even though I won't remember the details, I suspect that next time I have a use for this information, I'll remember enough to google it. On the other hand, if vi or emacs is the editor you want to use, you're almost certainly not the person who chooses their editor based on trying to figure out the least painful editor that'll work over SSH and will now be relieved to use micro (rather than one of those annoying options that's already there). Though maybe that was the joke. In which case, ya got me. Zing!
- feiss 9y agoStop complaining it doesn't look like a replacement for Vim/Emacs: > 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 https://micro-editor.github.io/about.html https://micro-editor.github.io/about.html It it pretty neat. Congrats to the author :+1:
- 1_2__4 9y agoPeople are mentioning (not complaining) that it's not a replacement for vim/emacs because the discussion is on a web site largely frequented by software professionals. Toy tools are not well-regarded here, nor should they be. It's like complaining on a site oriented towards construction workers to stop comparing something to pro-grade tools and just bask in the wonder of someone making a slightly better Craftsman ratchet. Cute idea and maybe worthwhile, but not especially relevant to professionals.
- sneak 9y ago> Common Keybindings > Micro's keybindings are what you would expect from a simple-to-use editor. Formed one idea. then, from the FAQ: > Does micro support Vi keybindings? > No, if you want to use Vim then use Vim. Well then.
- gaius 9y agoee is the best minimalist text editor.
- merlincorey 9y agoFor those unfamiliar, `ee` is the Easy Editor, shipped with FreeBSD.
- deathanatos 9y agoThen there is ed, man! !man ed: https://www.gnu.org/fun/jokes/ed-msg.html https://www.gnu.org/fun/jokes/ed-msg.html
- xelxebar 9y agoI know this is a joke, but in the past I've tried using ed just for kicks. Is actually quite illuminating. That was right around the same time that I realized that sed and grep are packaged ed functions. If you're interested at all in Unix history, if recommend playing around with it some. It can be surprising how much ed shows its influence on conventions and standards to this day.
- u801e 9y agoNot only that, but there's also ex which was an improved version of ed. ex later got a visual mode called vi. In vim, you can run it in ex mode with the -e parameter. You can also enter ex mode using Q or gQ depending on your vim configuration.
- xelxebar 9y agoYeah! The whole history of vim is sort of what kicked off my interest in Unix history! For those not familiar with the story of how Ken Thompson came to write ed, there's a short fun read here: https://www.bell-labs.com/usr/dmr/www/qed.html https://www.bell-labs.com/usr/dmr/www/qed.html I do ocassionally end up in ex mode if I need to run a few vim commands back to back. I'm curious if there are other reasons to use it though.
- IncRnd 9y agoI have it installed, and it's fine for quick file edits. It's also been mentioned a few times here on hn. https://news.ycombinator.com/item?id=12388654 https://news.ycombinator.com/item?id=12388654 https://news.ycombinator.com/item?id=14427473 https://news.ycombinator.com/item?id=14427473 https://news.ycombinator.com/item?id=13735395 https://news.ycombinator.com/item?id=13735395 https://news.ycombinator.com/item?id=13636239 https://news.ycombinator.com/item?id=13636239 https://news.ycombinator.com/item?id=13633578 https://news.ycombinator.com/item?id=13633578 https://news.ycombinator.com/item?id=13300940 https://news.ycombinator.com/item?id=13300940
- matt_wulfeck 9y agoWe need a better cross-platform terminal! Not editor. The current state of cross-platform terminals is fairly poor. Other than Alacritty[0] there hasn't really been any new innovation here. [0] https://github.com/jwilm/alacritty https://github.com/jwilm/alacritty
- evmar 9y agoActually, I collect new terminals as a hobby and the list is pretty long: https://github.com/evmar/smash/wiki/Related-projects https://github.com/evmar/smash/wiki/Related-projects
- matt_wulfeck 9y agoWhat do you recommend for cross-platform, easy to use, nice-looking terminals?
- molotovbliss 9y agoTermius.com I've come to enjoy, it is an electron app but has been reliable on Android, Ubuntu, Win7 & chrome (although chrome app is going away) on Ubuntu it does leverage snap like this editor.
- chmike 9y agoI have termius on my iPad and I don't find it very convenient to use. It lacks a bar with quick access to many special keys we use often.
- copperx 9y agoAgreed. And if someone mentions hyper.js I'm going to throw my laptop out the window.
- jhallenworld 9y agoI think we need a standard which allows terminal application to be as featureful as full gui applications. And then get all the most common terminal emulators to follow it. Terminals have been slowly improving. Bracketed paste is now universal (I pushed this into xterm). Micro is using shift-arrow for selection. JOE uses Ctrl-Arrow, because when it was implemented, Shift-Arrow did nothing on most terminal emulators. So here's an example (pet peeve): in Micro (and JOE with mouse mode enabled), you can select text while holding the mouse key down. If you move the mouse out of the frame, it should autoscroll to keep selecting more text. Unfortunately terminal emulators send no codes when you move out of the frame. (I submitted a patch to fix this for xterm, but still not in...)
- tomxor 9y agoLooks interesting. Linux way seems to be snap or source... but snaps give this error after install: micro snap-confine has elevated permissions and is not confined but should be. Refusing to continue to avoid permission escalation attacks I've never used snaps before anyone know why this is? I used the classic mode like it says in the readme [edit] ... nevermind, apparently snap just commonly does this with everything, great first experience with snap, back to apt.
- trespasserw 9y agoSeems you're on Debian. ATM, confinement doesn't work there, though they promise to fix it soon (https://github.com/snapcore/snapd/wiki/Distributions#debian https://github.com/snapcore/snapd/wiki/Distributions#debian).
- mamcx 9y agoThis look great, but miss something I like about nano and the old freepascal editor. It not show the menu! Remember the keybindings is anoyning when you use several tools, or when you are triying to fix something and now need to look at the help to remember what to do. That is the most infurating thing about vim (ie: How the hell I close this stupid thing!)
- adamy 9y agoExtremely good text editor. Highly recommend. Other people think it's vim and then they think I'm a better programmer than I actually am.
- nickelbox 9y agoHow strong is this bias? There are plenty of bad programmers who use vim (usually not well, though).
- type0 9y agoIt's a great editor,not everyone needs the superpowers of vim, the best part is that it's very easy to customize since Go is a very readable language (not on the level of Python but still).
- ajarmst 9y agoOr just use tmux with whatever non-windowed terminal editor you already use.
- jdlyga 9y agoMicro is very good. I've been using it for a few months as my default Git commit editor, and it works wonderfully.
- keithnz 9y agoThis is nice. It's not going to replace Vim for me, but it's definitely a nice quick editor, being cross platform is great.
- tombh 9y agoI always mention https://github.com/tombh/novim-mode https://github.com/tombh/novim-mode when this topic of 'normal' terminal-based editors come up. I very much agree with the sentiment of Micro here - I'm very much of the Sublime/Atom ilk, but I also love living in tmux and my editor taking up minimal resources. So in the same way that you can introduce `vim-mode` into browsers (a la Vimium), you can introduce conventional `non-vim-mode` into Vim. Vim already has so much support for plugins, perhaps unprecedently so, then we can take advantage of that without creating a whole new editor.
- douchescript 9y agoNice! But hey, rebinding control-z to redo in the examples? How’s that for terminal convention compliance?
- turboladen 9y agoWhat exactly does “modern” mean here?
- fithisux 9y agoIt saved the day when browsing large files. I recommended it to my co-workers. It is written in Golang. Big plus. Just a recommendation, csvlint, which is another Golang tool also is very useful.
- CrowderSoup 9y agoThis certainly looks cool. I usually use vim on the command line but that's only for quick and dirty editing.
- fiokoden 9y agoA modern cli editor for linux is sorely neede and most welcome. The old editors are both powerful and arcane.
- stevedonovan 9y agoSimilar idea, but done in C: Hisham 'htop' Mohammed's dit editor. Use it for all my quick-in-out edits.
- xmrsilentx 9y agoI still haven't paid for sublime text...
- eecc 9y agoI understand how rewriting the wheel to thoroughly learn a new language can be exciting, but please avoid the “betterism”. No, just because you’ve rewritten something in go doesn’t mean it’s better, it’s just a case of building your little space where you can claim cred.
- AsyncAwait 9y agoFair point, but it might be better, so without comparing nano to micro yourself, it's hard to judge them, but it's true that 'better' is very subjective.
- ssijak 9y ago"Micro's number one feature is being easy to install (it's just a static binary with no dependencies) and easy to use." Ok after reading that one sentence I just closed the page. Why would I want an editor whose number one feature is "easy to install"? Like any other editor is hard to install by the way.
- rkangel 9y agoThe main reason that Vi is the tool I use to edit config files is that I know for certain that Vi will be available on any normal Linux platform I'm dealing with - nothing to install. Any new text editor isn't going to have the benefit - Vi has a 40 year headstart. Making it easy to run it standalone, without needing loads of dependencies (and therefore without needing to be in a package manager) makes it a much more useful tool. I could just SCP it across into my home directory and run it to do my work.
- cup-of-tea 9y agoVery ignorant comment. Many people work across multiple machines (hundreds) which they do not own and cannot spend time "setting up" on each one. "Easy to install" means one can start editing with it in seconds. Do you really think compiling a local copy of emacs or vim on some strange machine counts as "easy to install"?
- closeparen 9y agoWhy? I can see working on a handful of remote machines, because it's easier to set things up manually vs. set up a configuration management system at small scale. Otherwise you're editing Puppet manifests in a local text editor. What's the use case for editing files on hundreds of different machines?
- ssijak 9y agoCompiling vim? Where do you not have Vim by default? Or could not install it with the default systems package manager? I seriously did not ever login into a system that does not had vim installed, excluding windows obviously, but how many of us have windows servers to manage..
- danmaz74 9y agoI would suggest that, to replace nano, the #1 feature missing is: always show the most used keybindings at the bottom, just like nano does. IMHO the top feature of nano is that you don't need to remember commands and keybindings at all, the most important things you need are always reminded to you.
- tenryuu 9y agoI have to say that is actually the main reason why I would be using nano. I know the basic commands for vim, as well as some extended keys for nano (save), but nano really helps for being able to not spend time outside of development to find keys for critical functions. Micro does have a help option, which is haven't really read, only briefly checked out the exe a few hours ago. I wouldn't call it critical, but it really speeds up the learning process, or for users thst only use the program once in a blue moon (because GUI)
- madmax108 9y agoWe keep hearing about network effects in social media networks, but as an Engg who works with multiple systems (personal, work, EC2, EMR, etc etc.) I do feel that when it comes to text editing tools as well, there is a network effect that comes into play. The only reason for me to switch to a different editor is if a majority of the systems I use have it preinstalled. Which means barebones vi/vim is still my best bet. My personal .vimrc is modified for my daily workflow, but doesn't stray too far away from barebones vim so that I always feel "at home" no matter which system I am on. I've tried moving away to different editors, but find myself comign back to vim fairly quickly just because it is available everywhere!
- fouc 9y agoHas anyone ever thought that the MS-DOS editor was one of the best CLI editors for complete beginners? I've always been disappointed that *nixs never ended up with something similar to edit. I suspected that irssi replaced ircii in a big way due to sane defaults, ease of configuration and a dash of color and I wondered if nano could've been replaced by similar principles.
- pjmlp 9y agoMy favorite MS-DOS editor back in the day was Q.
- moxious 9y agoAt first I was going to agree with you, but I think this largely may be an artifact of where and how you started (and me too). Text-based console editors I think are fundamentally unintuitive and make you learn a lot of different bizarre keystrokes that don't really map onto easy mnemonics or have much actual meaning, so I do kinda wonder if one set is better/worse than another.
- chaoticmass 9y agoI agree. I have found mcedit (midnight commander's editor) comes very close in ease of use and has a lot of power user features. Vim snobs will turn their noses at it, but I find it very comfortable to use for editing code. It is my main editor.
- gkya 9y agoThe source code for this is a really nice read, I just read the whole cmd/micro/micro.go like some prose. But one thing jumped at me: if err != nil && !strings.HasPrefix(err.Error(), "function does not exist") I wonder why most modern languages don't provide symbols a la Lisp or keywords a la Ruby, which would allow the above comparison to be a pointer comparison instead of a stribg one. Edit: add the missing "don't" before "provide symbols".
- chrisseaton 9y agoHow could it be a pointer comparison? It's checking that the string has a prefix, not that the strings are equal.
- throwanem 9y agoThe prefix check in this case is used as a means of typing the error, which many Lisps do via symbols.
- codebeaker 9y agoA string check for an error type in a typed language is a shortcut/laziness really. There's more complex ways (which are less elegant) to typecast the error type into a "concrete" type and figure out if it's really the issue you are looking for. In Go error is an interface type that is expected to implement the `Error() string {}` method. That makes it quite trivial to implement a ErrFunctionDoesNotExist type which wraps the native "error" types returned by the lower down functions, and compare against it with a type assertion. Doing this a lot gets really old, however so maybe the author took a shortcut. If that's the case, at least it's greppable. For what it's worth there's a technique in use throughout the Go stdlib which embues the `error` type with extra methods which allows you to check the specific fault with a url.Parse9), for example https://golang.org/pkg/net/url/#Error https://golang.org/pkg/net/url/#Error
- kazinator 9y ago> I wonder why most modern languages don't provide symbols a la Lisp. Because their implementors don't know WTF that is.
- mapcars 9y ago>modern >terminal-based Such a funny oxymoron.
- jokoon 9y agoCan't terminals capture mouse clicks? Does it work over SSH? I know it's the main feature that bothers me. I also wonder if you can have all highlighting features an editor like ST3 has.
- protomikron 9y agoIt depends on the terminal - e.g. xterm supports mouse, but AFAIK the maximum height/width is limited (see `stty size`).
- cdevs 9y agoFor teaching a noob how to edit in commandline nano is always a go to for me. I often use vim if I want to show someone some code and don't want to look like a idiot fumbling for a mouse. If I'm on a long stretch of programming I prefer sublime for awesome multicursor functionality and prettier text than a terminal. Haven't tried this micro but if the config is easier to learn than the rest then that's a obvious plus.
- WillyNourson 9y agoWow the Snap install is > 80MB ..; for a console based text editor...
- kutkloon7 9y ago"Does micro support Vi keybindings? No, if you want to use Vim then use Vim." Kthnksbye
- masukomi 9y agocan someone explain to me how this has mouse support? I thought mouse selection / click information simply wasn't passed from terminal emulators to the apps running within them. I get how it works in something like MacVim but how is it that this has it but AFAIK vim and emacs haven't been able to add mouse support in the terminal in 20+ years of development even though both support it in the gui versions?
- Koshkin 9y agoHello from 1995: http://www.linuxjournal.com/article/1136 http://www.linuxjournal.com/article/1136
- freshhawk 9y agogvim -v (and set mouse=a) from the terminal and emacs xterm-mouse-mode are both at least 10 years old. I'm not really familiar with it since I'm not big on the mouse but I believe it all comes from the GPM (general purpose mouse) server, at least that is what ncurses mouse support is based on.
- elzi 9y agoOne thing micro does very well is scrolling like GUI editors. It doesn't move the cursor with the scroll, and it will 'snap' back to where the cursor was if you begin to type. Always hated how other terminal based editors move the active cursors down/up on scroll.
- chaoticmass 9y agoOne small missing feature I noticed is when I have my cursor over a parens (or bracket, or brace) it does not highlight the matching parens.