Customize Nano Text Editor (2022)
I tried a long time ago [1,2] to initiate this discussion on Nano here. I'm glad it's happening :).
It seems few people are aware of how customizable nano actually is. Usually, they use nano with the default preset for quick bootstrapping tasks and then switch to vim without hesitation. While vim/neovim are certainly very powerful, nano remains my go-to editor for many quick terminal operations. I've customized it quite a bit[1], especially the key bindings, though the defaults are already excellent.
[1]: https://github.com/chawyehsu/dotfiles/blob/main/.config/nano...
Nano is quite a venerable piece of software with the initial implementation shipping as pico, the text editor for the pine mail client, back in 1992. Tens of thousands of students at a few universities will have been introduced to it as their very first email client.
The pine authors fell foul of the Debian free software guidelines and, as well as nano, a clone for the mail client itself lives on to this day as alpine. I use it every so often for a spot of nostalgia.
Nano is my go-to whenever doing something quick in the terminal. It's quick, I don't need to learn how to use it, and now it's going to be slightly more convenient. I had no idea it had these options. Thank you!
The line numbers and position bar are some real quality-of-life enhancements!
I don't regularly use nano anymore, but I have often thought that more programs should imitate the way it shows the command shortcuts on-screen as a kind of instant tutorial. I remember my physics major friends in college thinking it was pure snobbery for vi not to do that by default. Back then we were dialing in to an HP-UX server and using pico, which nano is an open-source clone of. For those who aren't aware, pico was originally the editor component of the Pine email client.
My struggle is that I work on lots of systems, sometimes ephemeral/temporary systems. There is no easy way to "sync" customizations, so I adapt to defaults.
Even basic things like how shell history is managed is very annoying to configure every single time. if only it was as simple as cloning your private github repo to ~/.config.
I actually prefer 'constantshow' instead of 'linenumbers'. That way if you want to select/copy some text from the terminal it doesn't include those line numbers.
10 years, I've been using nano as my editor.
10 years I've spent mastering the shortcuts.
I have been using nano in hard mode.
These configs will make my life so much easier.
What would it take to have "vim-wiki" for nano (see also: FOAM, Obsidian)? I have always admired nano for how simple and easy to use it is, and would love to use it for wiki/obsidian-style note taking & linking...
any sane advice on
1) integrating cscope with nano?
2) integrating exuberant ctags with nano?
3) integrating universal ctags with nano?
3) any sane advice on pattern matching (say find, or find and replace) where newlines, tabs etc can be part of query, part of the substitution?
Thank you, looking for way to set tab to 2 spaces for eons without success! Very helpful :)
Is it possible to apply some of the settings like autoindent or line numbers only when editing source code? In other words, does it have different modes like emacs?
I just did this for some of my setups recently, using the minibar and constantshow settings.easy to cut and paste without line numbers enabled too
I’ve been using nano as my default bash profile editor for over 15 years. It’s also great for quick updates for other config files.
Definitely going to enable mouse support. Didn’t know that was possible.
Also worth a look, if you want more TUI..
If you're on Mac and can't get .nanorc to work, check out https://stackoverflow.com/a/73373788/3876196
It's also possible that you simply do NOT have nano installed at all, and just have the simlink from nano to pico by default. That was my case. In this situation, install nano and it should work.
I use nano a lot but this page is not opening for me. Is someone else having the same problem?
Gass ke Jo777 yukk ah buruann
Right after the nano maintainer got bullied out by the FSF, I noticed two bindings got their defaults changed. They never change. I almost feel like it was graffiti, a flex against the old maintainer, a retribution for not doing whatever the FSF wanted.
Since forever, GNU readline programs and nano had identical bindings. I'm fast moving around the CLI because I'm fast at nano. Emacs has the same defaults. What sane organization only abandons their own defaults and prioritizes that work after pushing the existing maintainer out (or irritating them enough to accomplish this)?
Note that for the last few versions of macOS, "nano" is symlinked to pico.
What about LSP?
[dead]
better than vim
Did you know Nano supports mouse? Alt+M... Not that I use that much, but it is fun fact.
I must have used nano for years at this point, and I'm shocked to find out how customisable nano actually is! I tend to use micro[0] on most of my systems now just because it comes with really lovely defaults and keybindings that are a bit more familiar, but this might make me take a second look at nano in future.
[0] https://micro-editor.github.io/