10 ms·
An Atonement of Nano
- junon 6y agoThe author assumes that disregard of nano as inferior and not up to the daily task is somehow "elitist". It reads as though the author has been personally afflicted by its lack of use, which seems like a strange stance to hold. I'm not required to like, laud, or advocate for every piece of software. Conversely, I'm allowed to not like things as well. I didn't know it had these features, sure. But... so what? I don't use nano, I don't like when things default to it as an editor, and I'd rather not have it on my system because it's just extra bytes used up on my disk. If that makes me elitist, then so be it.
- MaxBarraclough 6y ago> I don't like when things default to it as an editor I strongly favour Vim myself, but I don't blame anyone for using Nano as a default editor. If the goal is to make a program (or distro) as approachable as possible then Nano is a sensible choice, much more so than Vim or Emacs.
- junon 6y agoSure, I never argued against that.
- Jiocus 6y ago> I don't like when things default to it as an editor Then, let things know what editor you prefer; $ export EDITOR='vi'
- junon 6y agoWhat makes you think I don't do this?
- iruoy 6y ago> I'd rather not have it on my system because it's just extra bytes used up on my disk I'm assuming you're talking about your development system/workstation. Why would 2MB matter? It has no dependencies that aren't installed by default in every distro.
- junon 6y agoBecause I don't like having cruft. It's simple.
- trabant00 6y agoIf you like nano use nano. There's nothing there though that can replace the modal editing of vim or the hackability of emacs.
- nicolas_t 6y agoI wish most distros didn't default to nano. I like vim, I liked when that was the default, now it's such a pain running something like visudo and getting nano.
- wffurr 6y agoIt's easy to change the default. It's a lot harder to teach every user how to exit vim.
- jtvjan 6y agoTry using the `select-editor' command. If you don't have that, you can also try setting $EDITOR and $VISUAL in your bashrc.
- swiley 6y agoDefaults in most distros need to be sane and just work. You can change this by just copying your $shellrc with EDITOR=vim.
- bifftastic 6y agoThis article is genuinely difficult to read due to the lack of capital letters. It shows a lack of consideration for the reader.
- toyg 6y agoI honestly hope this comes from using some accessibility tool like dictation software. Otherwise it’s honestly a childish thing to do - and in that case I fully expect the retort will be something like “I know people complaining about this are just pedantics, I use it as a filter to decide who I should pay attention to”. I’ve seen similar attitudes before. Occasionally someone will hide behind dyslexia, which begs some questions, but I just don’t have the medical training required to assess the veracity of such claims. Also, trying to evangelize a tool while being a weirdo is not going to help your case.
- bifftastic 6y agoThat is a good point in general about dictation software or other accessibility issues. Not likely to be the case for an article about a text editor however. The filter to decide who to pay attention to works both ways...
- swiley 6y agoWow I didn't even notice until I read this comment.
- wizzwizz4 6y agoIt's a lack of consideration for tradition. nano is spelt all lowercase, and starts sentences a lot; I think it'd be harder to read if sentences alternated between initial capital and initial miniscule.
- toyg 6y agoThat’s just silly. Most tools are spelled lowercase and just get capitalized in proper English when required. Facebook is not capitalized in the logo, for example. It’s just being awkward for the sake of it.
- domano 6y agoI just use VSCode over ssh for everything outside my local host. The support in Code for ssh is awesome and maintained by Microsoft AFAIK.
- swiley 6y agoThat requires a closed binary which (iirc) you copy automatically to all your remote machines. Encouraging the use of closed dev tools felt weird in 2019 but after 2020 it's IMO irresponsible.
- Philip-J-Fry 6y agoIf I'm programming I'll use a graphical IDE, preferably something by Jetbrains or at a push VS Code. If I'm logging onto a server to change something small I'll use nano. I don't have any reason to learn vi or emacs. I never have to do anything that requires me to need anything more than nano. If there ever is that requirement then it's gonna be hosted somewhere else and deployed to the server anyway, so I'll edit it on my machine in my ideal IDE.
- marcodiego 6y agoDisclaimer: I'm a gnu nano contributor. It makes me happy seeing nano being considered this way. Some of the features cited in the article were developed, improved, influenced or implemented by me; mainly macros and external commands. It is possible to use the linter combined with macros as a "go to implementation" or "go to declaration"[1]. I think it is also possible to do the same so it can get completions from external commands. I'd like to improve nano enough to make it a good IDE, but its main developer is against it. [1] https://lists.gnu.org/archive/html/nano-devel/2018-05/msg00073.html https://lists.gnu.org/archive/html/nano-devel/2018-05/msg000...
- bayindirh 6y agoOh hey, I'm primarily a Vi user, but I respect and love nano. It's the first editor I try on any system I'm not familiar with. I'd also argue against growing nano to a good IDE, because I think nano is in perfect form for its name and role. Maybe there can be a fork (maybe called micro) which contains the features you want to see in nano.
- vanderZwan 6y agoFYI, Micro already exists, it's implemented in Go https://micro-editor.github.io/ https://micro-editor.github.io/
- SaraPolson 6y agoI am a student and I have problems writing my essays and it takes a very long time. I want to advise you on the service https://www.a-writer.com/term-papers/ https://www.a-writer.com/term-papers/ Professionals work there, they are always in touch, they exactly fulfill the requirements and, most importantly, they use real sources, and not stupidly download from the Internet. Save your time - try it.
- bombcar 6y agonano is the first thing I install on any machine I have access to. I don’t use editors from the command line long enough to learn vi or emacs and I know how to quit nano (and it reminds me if needed). And the colors are nice now, too.
- rgoulter 6y agoIMO, nano does seem like the terminal equivalent of notepad. The key value proposition being that it's easy to use without having to learn how to use it, especially compared to what you have to learn for vi/emacs. - Most of the time you won't need to be editing files in the terminal, so it's a good 'emergency' tool just in case you need to. TBH, I wasn't aware of sophisticated features like automatically commenting/uncommenting. But I think putting effort into memorising those is less useful than putting effort into learning at least the basics of vi or emacs. -- There should be no shame in using nano.. I just can't agree that it's worth putting time in to memorise those keybindings. Though now I wonder why there isn't a VSCode-equivalent (emphasis on "works out of the box" and "easy to use") for the terminal.
- wffurr 6y agoSpacemacs or SPF13 are kind of like that.
- tomtomtom777 6y ago> Though now I wonder why there isn't a VSCode-equivalent (emphasis on "works out of the box" and "easy to use") for the terminal. The terminal is effective because you can combine all kinds of tools together. Or as some say, the shell is the IDE. If you're searching for a single application that performs all these tasks out of the box, there is no longer sufficient benefit in using the terminal. A terminal variant of VSCode would be inferior to the GUI variant.
- mtrycz2 6y agoThere was a Sublime-Text-equivalent for the terminal, but I cannot remember its name for the life of me.
- forgotpwd16 6y agohttps://github.com/slap-editor/slap https://github.com/slap-editor/slap ?
- bradley_taunt 6y ago
- nezirus 6y agoIn my opinion, mockery was never about Nano itself, but about standards. Vi(m) is everywhere, it is a standard (you may like it or not), so please learn a few basic commands, and you'll be able to use it when necessary. What's next? "I don't like cp command, so I will always install thismagicommand on my servers..." /rant on Having nano as a default crontab editor (on some distros) does not win popularity contest with more experienced admins, quite the opposite.
- jusssi 6y agoI think many of those who advise against nano have bad experiences from earlier times when it didn't properly support UTF-8 and EOL-diversity, resulting in broken files. I personally use vim (as my console editor), but the feature set I can actively use without referring to documentation probably doesn't exceed by much what nano could do.
- GrayShade 6y agoInserting hard line breaks when word wrapping is quite annoying too, and that's the default. I've seen a lot of people break config files because they didn't start it with -w.
- Denvercoder9 6y agoThe default has been changed in nano 4, and hard wrapping is now off by default.
- zepearl 6y agoQuestion: When "hard wrapping" is off and I move the cursor to the right beyond the screen, then the line on which the cursor is gets moved to the left - ONLY that line. Is there a way to have the other lines move as well to the right? Reason: sometimes I want to compare what I'm editing with what is present at the same position in the rows above/below - moving the cusor up/down to have those contents displayed is a bit annoying... . Thx
- tpoacher 6y agoI find that a bit annoying too. My solution is to fire the same file and line using `less` on a parallel window (e.g. in byobu) with the -S enabled (which I have enabled by default) which allows you to scroll to the right instead of wrapping the text. You can then edit the line in nano, and refresh (with Shift+R) as appropriate in less to compare with the lines above.
- 6y ago
- ClumsyPilot 6y agoSometimes I wonder why linux isn't more popular. Then one of our interns calls me cause they are stuck in Vim and I remember.
- phowat 6y agoFor all the issues that (rightly so) affect the popularity of linux, I don't think this one is high on the list. This is something that can be figured out in a single google query.
- wizzwizz4 6y agoIf you know what Vim is called, yes.
- phowat 6y agoI just tried this very naive query: https://www.google.com/search?hl=en&q=linux%20editor%20opened%20how%20to%20close https://www.google.com/search?hl=en&q=linux%20editor%20opene... And the first hit teaches how to close vim. No need to know what is called.
- wizzwizz4 6y agoYou're assuming they know it's an editor.
- wcarey 6y agoA wonderful use case for nano is introducing students who have never used a command line before to unix. You can teach a classroom of students to edit files in nano productively in a single 45 minute class period, which means that an introduction to programming class can move very quickly into actual programming. If your goal is to have student produce a working program on day one of class, nano is a godsend. By then end of a semester, the students will be running into the ceiling of nano as an editor and you can tell them about other more featureful editors.
- enriquto 6y agoI don't understand your argument here. You do not need to use a terminal-based editor when you work on the command line. You can run "gedit file.txt" just like you do "nano file.txt" and it will work as well. I guess this may be even easier for newcomers, wouldn't it? Until you start editing files remotely through ssh, and then they will understand why the obvious thing (calling a graphical program from the command line) may not work as expected.
- ThaDood 6y agoI think the point may have been that nano is a safe assumption to be on most any GNU/Linux machine where as gedit might not be and that nano has all of the commands listed on the screen for quick reference. For example when I was taking my sysadmin class we used CENTOS which did not have gedit since it did not have a GUI. We used VI instead, but I learned nano was good for simple fixes and I did not have to google the method of saving and exiting.
- jonfw 6y agoFor an entry to programming class, I'm not sure why you would forego a GUI though. For context, I just got my cs degree a year ago and most of my classmates only know a terminal as that bottom pane in vscode If you want people to get up and running quickly, either require vscode or have people program in one of those browser based IDEs
- SeeDave 6y agoI like nano and prefer how it navigates text to vim. If vim works for you then great but... nano is just fine for me!
- deleted 6y ago[deleted]
- gelo 6y agoI use nano all the time for production linux services. Its simple, effective and works really well in a shell session over a satlink connection. The key combinations make it a lot easier to not f*k up in those kinds of sessions.
- physicsguy 6y agoNano is a great tool for people who aren't used to using command line tools. I unashamedly used it for ages before switching to Vim. I always recommend it to people who are new to doing work on Linux remotely.
- tpoacher 6y agoIronically, it's an even better tool for people used to using command line tools!
- GavinAnderegg 6y agoI’m now a Vim user in the terminal, but while growing up on mid-90s Slackware I used `joe`. I really figured that little editor out, and it was surprisingly feature rich. Still shares a fond place in my heart. In the late 90s/early 2000s I started encountering Unix machines that weren’t my family’s 486. I found that `joe` really wasn’t installed anywhere, so I endeavoured to figure out `vi`. This worked well as it was often the default editor on the systems I was attaching to. Some systems used `pico`, and later `nano`... and I found that annoying. Fast forward a few years, and `nano` seemed to be the default everywhere. At first I found this very irritating, but over time I’ve come to realize that many have the same sort of feelings about `nano` that I did about `joe`. No, they’re not super-extensible mega-editors, but they’re fine for editing a few config files or a crontab. More than fine once I bothered to wrap my head around the feature set and stopped grumbling every time I was in a `nano` session. (Though I still set `vim` as my default when reasonable on servers.) So, I’m sorry little `nano` for all the past grumbling. You may not be my first choice, but I respect you for the workhorse you are!
- discreteevent 6y agoI'm the opposite. I used to use vim and then for years I was working on windows stuff. When I came back to linux I wasn't that fluent with vim anymore and I didn't use it for development anyway, just live changes for config files etc. So I decided to switch to nano for that. It's great and it feels really small and light compared to vim (by "feels" I mean subjectively) and I like that.
- posix_me_less 6y agoIn 5-10 years nano or other simple discoverable text editor will become the mainstream choice in terminals, and vi/vim will become an obscure tool preferred by a small minority, mostly consisting of the veteran "greybeards". See changes in Fedora. New kids are breastfed on nano and/or MS/Apple IDEs.
- dTal 6y agoI'd say that's the case already.
- bitwize 6y agoI use vi for quick edits and Emacs for serious development. I find nano somewhat frustrating to use. But I'm glad it's there because it's perfect for people who are new to terminal-based Unix environments. (Back in my day, that often meant college kids logging in to their school shell account.)
- O_H_E 6y agoNano could be wildly more accessible for beginners with an easy config like this that sets saner keyboard defaults. It also enables the little-known mouse support, which makes the shortcuts hints at the bottom act like buttons. https://github.com/RangerMauve/nanorc/blob/master/.nanorc https://github.com/RangerMauve/nanorc/blob/master/.nanorc https://www.nano-editor.org/dist/v2.1/nano.html#Using-the-Mouse https://www.nano-editor.org/dist/v2.1/nano.html#Using-the-Mo... I seriously find that the shortcuts hints being always present to be very helpful, great UX for occasional fiddling with dotfiles and files in /etc.
- jolmg 6y agoIt seems this list of features is not exhaustive. It also seems to have support for a file browser to select files, mouse, autowrapping/autofilling, spellchecker, etc. Quite a lot of things are listed in the info manual.
- tpoacher 6y agoI love nano (especially the latest version, not that 2.9 stuff that's default on most linux distros). I don't mind vim and I'm happy to work in it if I have to, but every now and then I redo the 'vim tutorial' to help me not forget, and for the most part, with a handful of (non-deal-breaker) exceptions, my thought is always "I can already do all this stuff in nano". Whenever I speak to people casually about why they like vim over "e.g. nano", I find that people who think vim is far superior often fall into one of these categories: - They like vim because it allows them to do things I think are bad software engineering practices which I would avoid anyway - They like vim because it allows them to do things they are not aware nano can also do as easily (especially given you e.g. can run arbitrary shell commands on a selection). - They've gone overboard and have added every single vim plugin in the book to convert it basically to an IDE or something that is no longer an editor. - Nerd cred. I only miss a couple of things when in nano, none of which are dealbreakers: - "highlight all search results" (but search and replacement otherwise works extremely well, and I can always do the highlighted search in parallel in a less window) - "shift all text to the right rather than only that line" (but again, one can simulate this in a less window trivially - it's just a bother to have to do so) - Inability to create pre-recorded custom macros; you can only have one recorded macro live at any time. But that's about it. But having said that, I would not call myself a seasoned vim user. So I ask with full honesty. Persuade me to jump to vim. Can anyone argue specific points of things vim does better that nano can't do?
- forty 6y agoI don't know nano, I don't really use vim (kind of, I'm an Evil person ^^). Does nano has a very rich movement system such as Vim has? I think that's one of the main selling point
- tpoacher 6y agoProbably not! What kind of movements do you have in mind? If you mean stuff like "delete 5 characters", probably not. But I never really got the appeal of that over pressing delete five times. The time it takes me to count the characters to decide it's five of them is probably longer than the time it takes to press delete the appropriate number of times without thinking ...