9 ms·
As a vim and emacs user, I don't give nano any hate. I'm surprised when programmers use it, sure, but that's because if my profession was going to require edit
by fouric 5y ago
As a vim and emacs user, I don't give nano any hate.
I'm surprised when programmers use it, sure, but that's because if my profession was going to require editing text files for hours a day (which it does), I would be happy to trade a steeper learning curve now for a less unpleasant job experience later.
I totally understand why non-programmers don't use it. If your job does not involve you editing text files for hours a day, then nano (or a graphical editor - gedit, kedit, notepad?) is inarguably a better choice for you than emacs or vim - the effort involved will probably never pay off.
ed users: you have my respect, which I will dispense from a distance.
- blueblob 5y agoYeah, how could you hate on anyone who uses the standard text editor?[0] [0] https://www.gnu.org/fun/jokes/ed-msg.html https://www.gnu.org/fun/jokes/ed-msg.html
- bear8642 5y agoyou joke, but ed is great if have tiny change to make given compiler output simply just to how fast it loads
- kstrauser 5y agoI got a local login on a machine so busted that I couldn't mount /usr, meaning I couldn't read /usr/share/terminfo, meaning no screen editors would work. I knew just enough ed that I was able to fix /etc/fstab and bring the system up. I wouldn't wanna use it every day, but it has its time and place.
- donio 5y ago"busybox vi" is another option in these situations when that's available. It will happily run in a blank chroot. Everybody should know a little ed though, it's not that hard.
- kstrauser 5y agoIt was on a server that didn't have busybox installed. Also, can busybox vi work without access to termcap or terminfo?
- yjftsjthsd-h 5y agoHonestly at that point, unless your fstab is really big, I'd just `cat /etc/fstab` and then `cat >/etc/fstab <<EOF` and very carefully retype it (I mean take a backup first of course).
- kstrauser 5y agosed is also a friend in these situations.
- cicero 5y agoI used to use ed when all I had was a single terminal screen/window and a compiler error message. Ed doesn't clear the screen, so you can still see the message. Vi or emacs would clear the error message away. Of course, in a multi-window situation, the compiler output is usually in one window or pane and the editor in another, so this is moot now.
- xfer 5y agoThis is what i used to edit configurations in plan9 console if you don't have graphics support(over serial console) or to fix issues before starting rio. It is surprisingly pretty decent experience.
- zitterbewegung 5y agoIts more like using the right tool for what you actually want to do. 0. Use cat and output to a file to really quickly make a new file from your clipboard or from the web 1. Nano is great for editing config / text files quickly and the learning curve is really low due to a more modern design. 2. vim can be reliably found everywhere on nearly any unix machine but the learning curve is much higher initial learning curve vim has more customization than vi and has basically replaced vi on modern installations of unix 3. emacs has out of the box has a learning curve less than vi but can't be found everywhere and you probably have to install it but it also has a large amount of extendability. the initial learning curve is a bit low but then it gets higher and higher. It also has multiple versions and a GUI and a package manager.
- bityard 5y ago> due to a more modern design nano is a clone of pico, the text editor for the pine email client, so "modern" is definitely a matter of some interpretation here. :)
- gbear605 5y agoIt’s more similar to modern text editors, but yes it’s definitely more of a precursor
- fouric 5y ago> Nano is great for editing config / text files quickly emacsclient makes it just as easy to edit a text file extremely quickly with Emacs as to open a new vim or nano in place. > emacs [...] initial learning curve is a bit low but then it gets higher and higher Emacs's difficulty is, for simple editing cases that you could use nano for, only a little bit more difficult than nano, and certainly easier than vim - no modal editing, and you can learn the essential shortcuts (save, undo, open, close) in very little time. I don't agree that the learning curve increases - more complex things require that you learn more about Emacs, sure, but my experience has been that it's about as easy to go from beginner to intermediate Vim knowledge as it is in Emacs, if not slightly easier due to the latter's better design and documentation. > emacs [...] can't be found everywhere TRAMP has been around for two decades now, making this largely irrelevant - https://news.ycombinator.com/item?id=26982916 https://news.ycombinator.com/item?id=26982916
- marcodiego 5y agoMore than that, Benno Schulenberg, nano's main developer, is actively against changes turn nano into anything close to a mini-IDE. He rejected patches that could nano have code completion from external tools, multi-pane/screens, source code navigation and many others. I respect his lead, but that discourages contribution. Disclaimer: I'm a very sporadic nano contributor.
- ponow 5y agoIn other words, Schulenberg doesn't want nano to slide on a slippery slope towards emacs.
- sixstringtheory 5y ago> that discourages contribution I wouldn’t say it does so across the board. Rather, it filters contributions to only encourage those of the kind they desire. There’s also the question of whether they even want “more contribution”. The less features, the less maintenance burden… Less maintenance burden, easier for fewer people to accomplish the work… Fewer people means less coordinating effort. Simplicity seems to lead to a virtuous cycle here.
- tommica 5y agoGotta respect that, he seems to have a vision, and keeps it in focus. Nano as a simple text editor is a blessing.
- Ekaros 5y agoI personally prefer nano over vi, ed or emacs. But when I do some programming or bigger work I use proper IDE like Visual Studio Code or Eclipse. It's decent enough for times when you want to do something quick on cli. And then spend rest of the time with graphical IDEs...
- noir_lord 5y agoSame - I use nano for quick edits on remote boxes or locally but for programming I use intellij. I totally get why people use vim (and emacs) in fact I use vim for one specific thing I can not do in intellij (highlight closing parens in docblocks - intellij doesn't do it and if you are writing annotations it's a major pita that it doesnt).
- kijin 5y agoSame here. I like nano because it's a simple and intuitive editor that doesn't do much (though it does have some surprisingly powerful features once you know the shortcuts). I already have a full-blown IDE running on another screen and I don't want to spend any energy trying to stay on top of another one. In other words, I would not use nano as my primary editor, but it's perfect as a secondary. If I need to edit more than a few lines, I'll just load up the file on my usual IDE.
- Avery3R 5y agoI wouldn't call vs code an IDE, it's closer to a text editor
- PandawanFr 5y agoWith all the extensions available, you can get pretty close to a full IDE
- potta_coffee 5y agoVSCode has intellisense, debugger, console, etc. It definitely fills a niche between a text editor and an IDE, IMO.
- jejones3141 5y agoOne thing I've found nano useful for: git commit messages. If the commit file is empty, that cancels the commit. Nano will tell me how many lines it actually wrote, so if I have second thoughts I can cancel with certainty. Nano may well not be unique in that regard, but I tripped over another editor that saved what I thought was an empty file as a single line with just the EOL character.
- jolmg 5y agoYou can have a bunch of comments and empty lines, even with spaces, and git will still abort if you don't have anything else in the commit message. An EOL/newline character shouldn't cause the commit to continue.
- hiq 5y agoI rarely write commit messages until they're ready, so I usually :q! when I realize I actually don't want to commit just yet.
- MayeulC 5y agoI like to quit vim with a non-zero return value in some exceptional cases. git and most other tools will interpret this as "something bad happened" and won't do anything further :cq
- garyrob 5y agoPersonally I use jstar (a configuration of Joe) because in the 80's I used WordStar and I like using the same key combos. :) But that's for small editing tasks. For coding I use VSCode or a JetBrains product.
- unixhero 5y agoCheck out jed!
- cicero 5y agoUpvote for mentioning WordStar. I only used it some in the Texas A&M computer lab. I went from my dad's Apple II, to a Commodore 64 I bought in college, to a Macintosh after I graduated. None of them were WordStar platforms, but I remember it was very popular in the CP/M and MS-DOS world before WordPerfect took over.
- garyrob 5y agoYeah, my programming OS was CP/M
- ChrisClark 5y agoYeah, for quick edits I prefer nano. Might just be because I grew up with edit on DOS, and Out of the vi, emacs and nano it was the closest and I just stuck with it. Any programming I do is in Jetbrain IDEs. But I saw a comment here long ago that says it's worth learning vim keybinds, even if you never use vim. Because you can be sure, no matter what IDE or editor you end up using, someone has created a vim keybinds plugin. You can have the same keybinds across everything. I've never gotten around to learning though.
- Arnavion 5y agoMeh, that vim keybinds thing is an exaggeration. Using arrows keys for moving the cursor, holding down Ctrl for jumping words, holding down Shift for selection, etc is even more consistent across editors, and doesn't even need any plugins.
- ChrisClark 5y agoI was more thinking of the benefits of vim-style, the advanced controls for moving and jumping around according to code structure. Not just jumping a word at a time, but jumping to a character, deleting a word, sentence, block, etc. Those are not always standardized across editors.
- Arnavion 5y agoDeleting a word - Ctrl-Delete. Deleting a line - Shift-Delete. Jumping to a character, deleting a block - while vim does have bindings for these, I've never found myself using them. For the latter especially, moving to the start of the block and then selecting to the end of the block is better to me just because it lines up with my eyes scanning the thing I'm planning to delete. With vim I would have to pause and double-check what I'm about to delete anyway, and if it doesn't fit in one page I'd have to move around to inspect it anyway.
- CivBase 5y agoI've always been surprised by nano's ubiquity since it comes across to me as a very niche application. It's a highly-accessible, bare-bones text editor... for a terminal, where the overwhelming majority of users will be "power users" who will likely value the additional features made available by vim or emacs. It's not a bad tool. I just seems to be designed for a very small demographic.
- umvi 5y agoLinus Torvalds said he might switch to nano for his daily driver[0] >[Text editing is] all done in a traditional terminal, although I don't use 'vi'. I use this abomination called "micro-emacs", which has absolutely nothing to do with GNU emacs except that some of the key bindings are similar. I got used to it at the University of Helsinki when I was a wee lad, and I've not been able to wean myself from it, although I suspect I will have to soon enough. I hacked up (a very limited) utf-8 support for it a few years ago, but it's really showing its age, and showing all the signs of having been written in the 80's and the version I use was a fork that hasn't been maintained since the mid 90's. > University of Helsinki used it because it worked on DOS, VAX/VMS and Unix, which is why I got introduced to it. And now my fingers are hardcoded for it. I really need to switch over to something that is actually maintained and does utf-8 properly. Probably 'nano'. But my hacked-up piece of historical garbage works just barely well enough that I've never been really forced to teach my old fingers new tricks. [0] https://www.tag1consulting.com/blog/interview-linus-torvalds-linux-and-git https://www.tag1consulting.com/blog/interview-linus-torvalds...
- reidrac 5y agoI used joe for a while, basically because it was installed at the Uni's labs (and because I had used WordStar on DOS). vi (or vim, can't remeber) was misconfigured with terrible defaults, so basically I got used to joe. It was very hard to force myself to stop using it and learn vi!
- emondi 5y agoWouldn't modifying some GNU emacs shortcuts to his liking be easier than mantaining that editor?
- powersnail 5y agoProductive people are just lazy in a different way.
- kdtsh 5y agoOne of my colleagues is a old Unix hacker (one of my favourite things to do is get him ranting about his least favourite OS of all time, HP-UX 8.x). I have wondered before what editor he uses, and once when I peeked over his shoulder I saw that it was MicroEMACS. At the time I thought it might be a neat GNU Emacs clone with a smaller footprint, but no, it’s nothing of the kind. Old habits die hard.
- tpoacher 5y agoI think your opinion simply reflects a degree of ignorance of nano's actual capabilities, rather than a genuine surprise at human behaviour. If anything, your comparison to gedit/notepad (notepad??? seriously???) makes that much clear. Honestly I don't mind vim, but I prefer nano. And I spend 24/7 coding in my terminal. Nano covers all my needs and then some. And while you should absolutely not switch vim to nano if you enjoy vim, I would totally encourage you to play around with nano a bit more. You may be positively surprised at what you find.
- sedeki 5y agoJust to be clear: are you coding in nano all the time in that 24/7 terminal session? But there is no syntax highlightning etc? To edit config files, sure. But most of the time spent? I prefer nano too; trying to learn vim. But my coding happens in either Qt Creator or VS Code.
- qtoxic 5y agoHow does this have anything to do with Nano 5.7?