8 ms·
GNU nano 2.9.0
- emj 9y agoAlso known as the "record macros in Nano" release.
- agumonkey 9y agoremacs is already taken
- 7kmph 9y agoIs anyone using this thing?
- throwaway613834 9y agonano, or the new feature? I use nano all the time.
- millstone 9y agoWhy do you use nano?
- throwaway613834 9y agoIt's simple, it's on every platform I ever SSH into, and it gets the job done quickly?
- phillc73 9y agoExactly this reason. You just know it will always be installed. And I still type "pico".
- throwaway613834 9y agopico is harder & slower for me to type for some reason! not sure why.
- Fnoord 9y ago(Assuming you're using Bash as shell) If you want to get rid of this habit put this in /usr/local/bin/pico.sh or ~/bin/pico.sh #!/bin/bash echo "Type nano instead of pico..." sleep 5 nano $* Put in ~/.bashrc alias pico=~/bin/pico.sh (or /usr/local/bin/pico.sh) Make sure to chmod +x the shell script. You can also simply call it pico instead of pico.sh; then you won't have to use the ~/.bashrc addition.
- im_down_w_otp 9y agoI use it in a pinch fairly constantly. Despite being a heavily customized Emacs user all the rest of the time. Mostly when I'm already scouring around the shell poking at files or need to make a simple new one (like a .gitignore) and I don't want/need to perturb whatever else I'm doing in Emacs.
- subway 9y agoThis post makes me so glad to have been forced into vi all those years ago. Its everywhere, its quick, and unless you've done some pretty nutty stuff in your configs, basic usage is the same between a heavily customized vi and the vi you find bundled with every is bundled windows and gentoo. (Not to disparage any preference for emacs; it just seems a bit much to have to fall back to an entirely different editor seems a bit much)
- im_down_w_otp 9y agoI don't _have_ to "fallback". I just choose not to interrupt the extremely rich development environment I have setup in Emacs and my projectile projects by bringing in random other files/buffers. It's akin to the same justification for why I wouldn't bother opening a random tiny file in Xcode or IntelliJ IDEA. I don't use Emacs as just a simple text editor. I can probably count the times I've typed `emacs some/file/path.whatever` into the shell on one hand.
- confounded 9y agoIf you start Emacs server as a daemon, you can use it pretty much like you'd use nano/vi/vim in the terminal, without disturbing anything. With an Emacs server running, for me, it loads faster than vim. I have a bash function along the lines of et() { emacsclient -tty --alternate-editor '' "$@" } .. for using Emacs in the terminal a-la vim/nano. When you close the file you opened, you'll be right back where you left-off in the shell. I still tend to use a long-running GUI instance as you describe, but for jumping into config files from a terminal to edit a line or two, it's great.
- int_19h 9y agoIt's a simple text editor that's available out of the box in most Unix-like distros these days. So kinda like vi, except I know how to use it (and if I ever forget, it lists all shortcuts on the bottom of the screen anyway).
- greenhouse_gas 9y agoActually, the Debian install cd doesn't have vi but does have nano, and vim (and neovim) is larger than nano.
- yjftsjthsd-h 9y agoThat actually seems a bit odd; it's not like vi is big.
- jwilk 9y agoThe size argument alone cannot explain nano > vi preferences in d-i. vim-tiny and nano sizes are nearly the same; nvi is smaller; I'm pretty sure the "vi" applet in busybox would be much smaller.
- 7kmph 9y agoNano. Just curious :)
- stuaxo 9y agoI use nano all the time. It's on most platforms and it's quick to bring up for some basic editing. Over the last 20 years of using Linux I haven't learned vi and emacs above basic editing and saving files.
- aquadrop 9y agoNano? Yes.
- KindOne 9y agoAll the time. I could use vi/vim, but I'm just too lazy to teach myself or use "vimtutor" to actually learn how to use it. I know just enough to open/modify/save/exit, which I think is just good enough for a quick edits.
- fake-name 9y agoI use nano all the time. If I need to do quick editing, nano is perfect. If I need to do anything more complex, I'd use rmate[1] + rsub[2] with sublime text. 1: https://github.com/aurora/rmate https://github.com/aurora/rmate 2: https://github.com/henrikpersson/rsub https://github.com/henrikpersson/rsub
- petercooper 9y agoEvery time I'm sysadminning some Linux server or another. It's everywhere and does the job well enough without me having to learn vim :-D I also often use it to look inside random files on my Mac that won't open anywhere else (e.g. .xml, .json, files without extension names).
- matt_wulfeck 9y agoI think vi is probably more ubiquitous though, especially since it’s included in busybox which powers almost all imbedded Linux hosts. Still a good idea to learn a little vim
- greenhouse_gas 9y ago>I think vi is probably more ubiquitous though, As I mentioned below, While it may be more ubiquitous, vi isn't present on Debian's live cd, while nano is.
- YSFEJ4SWJUVU6 9y agoThat's odd, considering vi is part of the POSIX specification and all. Many distributions won't come with full vim by default, but most do install a trimmed version of it to fulfil the role of vi.
- vidarh 9y agoAll I care to know of vim is how to exit it...
- petercooper 9y agoI know how to get out of it, and also how to get into insert mode and make the most elementary of changes. I tried going further but it just doesn't mesh with whatever form of memory I have installed in my brain :-D
- corford 9y agoYep, all the time. It's perfect for quick, easy edits and available everywhere. I love the simplicity: CTRL-X [y/n/c]; ALT-A and CTRL-K CTRL-W and CTRL-R ...pretty much covers 99.9% of the commands I ever use in it.
- agumonkey 9y agonayes
- johnramsden 9y agoYes! It's a simple and easy editor to use. It's one thing I really miss when I use a non GNU based NIX that doesn't come with it pre-installed. It does everything you need it to do for quick configuration edits, and doesn't get in your way. Have you ever tried to use the equivalent 'ee' editor that comes installed on other NIX? It's painful.
- SwellJoe 9y agoI helped my nephew (a teenager) with a coding project he was working on recently, and nano is what he was using when he made edits on the server. So, yes. People are still using it, and new people are picking it up because it's an easy editor that works anywhere. It seems like you'd want to learn something a little more powerful (like, say, vim) if you work on the command line via a remote connection frequently, but for every once in a while, you can't beat nano for ease of use. There's really no learning curve to do basic edits. (Meanwhile, some poor soul is struggling this very moment to figure out how to exit vim.)
- yarrel 9y agoYes. It's great for avoiding vi.
- joshumax 9y agoSo I was looking through the sources of nano and I seemed to have discovered a previously-unknown (at least based on a quick search) easter egg. First modify the buffer somehow. It really doesn't matter if you just type in "test" Hit ^X to exit nano. When it asks you if you want to save the buffer hit Y Save the file as "zzy" and press ENTER to trigger the Easter egg ^X+Y+zzy is likely a reference to xyzzy, a cheat code originally used in Colossal Cave Adventure[1] 1: https://en.wikipedia.org/wiki/Xyzzy_%28computing%29?wprov=sfla1 https://en.wikipedia.org/wiki/Xyzzy_%28computing%29?wprov=sf...
- miduil 9y agoUh, really cool! Spoiler recording https://asciinema.org/a/aWR9hmT5CuEMbxfUUYEx4ATS4 https://asciinema.org/a/aWR9hmT5CuEMbxfUUYEx4ATS4 PS: You can quit this text-animation by any keypress and then store the actual file zzy, if required.
- sk5t 9y ago"xyzzy" also made an appearance in the Infocom games Enchanter and/or Wishbringer.
- j0e1 9y ago'xyzzy' was also what enabled cheat-mode in Road Rash[1]. Ah.. good 'ol days.. 1: https://en.wikipedia.org/wiki/Road_Rash https://en.wikipedia.org/wiki/Road_Rash
- deleted 9y ago[deleted]
- anothertraveler 9y agoecho "export EDITOR=nano" >> ~/.bashrc
- thomastjeffery 9y agosed -i s,^EDITOR=nano$,EDITOR=vim ~/.bashrc
- jwilk 9y agosed: -e expression #1, char 26: unterminated `s' command
- thomastjeffery 9y agoGood catch. Forgot a comma at the end.
- mixmastamyk 9y agoI used nano for quick edits for years with modified sane CUA keybindings. It was ok. Recently found the "micro" editor here and liking it more.
- mattjsmith 9y agoSome of my favorite memories are of learning C++ using the nano editor. I ended up a C# dev, put I still put nano on all my Windows boxes. It can be quite handy.
- jrs95 9y agoI used nano for years until I was forced to use vi when I was doing a FreeBSD install just for fun on my Cr-48. Once vim clicked for me I never went back. At the same time, Nano was invaluable as an easy to use terminal editor as a beginner. It was a huge help when I was learning to use Linux.
- pfranz 9y agoIt's weird how comfortable familiarity is. I approached vim similarly, I first used pico/nano to modify files here and there but mostly used GUI IDEs or editors. Switched to vim and been using it for 10+ years. Every once in awhile I encounter an OS where visudo or something else defaults to nano and I feel so awkward just trying to make simple changes and save the file.
- thomastjeffery 9y agoIf vim is available, then you can do VISUAL=vim visudo or EDITOR=vim visudo According to the man page, VISUAL is preferred.
- int_19h 9y agoThe huge advantage of nano over vi in that scenario, is that nano 1) uses the conventional [i.e. as used by every editor other than vi] arrow key cursor movement and typing behavior without the need to toggle any modes etc, and 2) displays the shortcuts you need for anything else on the screen by default - things like saving, cutting/pasting, searching, and, oh yes, quitting. So, while it might not be optimal for vi users, it is at least accessible to pretty much everyone regardless of their background. Whereas for someone not familiar to vi, getting thrown into the dreaded : prompt can be a frustrating nightmare.
- beojan 9y agoThe arrow keys work in vim too (I don't know about plain vi).
- sonnhy 9y agoAs a beginner it was my editor of choice, as most of us it seems. But the GUI made me want a better editor, with the same capabilities of a GUI editor. So, when i heard of micro i switched immediately, I just find the default copy/cut/paste and the mouse functionalities very comfortable.
- lyrachord 9y agoMaybe it's not an honor.Why these guys hate UI? Why these great guys cannot make a great UI? UI hard? there are tooooo many DOM js UIs. Maybe it's a shameness.
- tofflos 9y agoI love that there are people working on nano and the nano-styled website. Also excellent release notes. I just wish that nano in Bash for Windows was more recent than version 2.5.3 so I could try out the new features. ;-)
- mynewtb 9y agoThe only feature I miss is Undo.
- danieltillett 9y agoNano does what is does very well. Want to quickly modify some some file it is the tool of choice in the way a hammer is the tool to drive a nail. Right tool for the right job.
- oneeyedpigeon 9y agoIt depends on your experience, familiarity with the tools, and nature of the change. For example, you might think a single character change would be faster in nano, but that’s not necessarily the case. By the time you’ve moved the cursor using the cursor keys, deleted the old character, and typed the new one, an experienced vi user could well have made the same change faster. We can all think of far more complicated changes that are considerable more efficient in vi. So the question is 'given perfect familiarity with the tools, and all else being equal, what kind of changes, if any, are more suitable for nano rather than vi. None of that is to say that nano doesn’t have a place.
- edflsafoiewq 9y agoI dislike using nano because of this: open a narrow terminal and open a file with lines long enough to wrap. Insert a character on the wrapping line. nano will insert a line break, hard-wrapping the line. Probably you can customize this, but I don't want to have to customize an editor so it doesn't break my files.
- Fnoord 9y agoLearning some basics of vi(m) and using some plugins to enhance it can improve your productivity compared to Nano on the long term (e.g. syntax highlighting with color palettes, linter, tmux support, and what not). That said, I prefer Sublime/Vim (Sublime also has these plugins), but Nano is a decent alternative and resembles the first text editor I ever used. Sublime is lightning fast for me, but it isn't open source. To break the habit of firing up Nano I symlinked it from /usr/local/bin/nano to /usr/bin/vim. If you use Vim regularly, the shortcuts will stick in your head whereas if you resort to Nano you won't memorise them for long. If I ever still require Nano then I can execute it by executing /usr/bin/nano For people on a Mac, I can recommend the app CheatSheet [1] available in Homebrew. If you're lost in an application holding Command (⌘) for a few sec will represent you with a cheatsheet of shortcuts. It won't work with CLI apps though. [1] https://www.cheatsheetapp.com/CheatSheet/ https://www.cheatsheetapp.com/CheatSheet/