this post was submitted on 09 Aug 2026
301 points (97.5% liked)
Programmer Humor
32730 readers
1082 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Both
nanoandemacssuffer from the same problem - bad defaults. You need to pass like ten options to nano for it to work as expected to edit configuration files and small scripts.I haven't bothered to poke it deeply. What options do you use please? I'll give it a go. :)
alias nano='nano -A -D -E -F -T 4 -Z -g -i -l -m -q -t -% -_'and you need to enable syntax highlighting in nanorc (not all distros enable it by default)include /usr/share/nano/*.nanorcalso there are additional/improved rules for highlighting here https://github.com/galenguyer/nano-syntax-highlighting and you can rebind every key, but it seems that it doesn't support 'chaining' of keys nor multiple modifier keys at the same time.Nice, thanks!
For anyone wondering about the options: https://i.imgur.com/hAjTxJO.png
Also, apparently you can create
~/.nanorcand put the following in for those (instead of an alias):set smarthome
set boldtext
set tabstospaces
set multibuffer
set tabsize 4
set zap
set showcursor
set autoindent
set linenumbers
set mouse
set indicator
set saveonexit
set stateflags
set minibar
I'll play around with those and the syntax stuff. I definitely personally do not want the saveonexit behaviour, but you've started me on the path of looking at the other options, and that right there shows me it's worth my time to look, so thank you :)
That set of options sounds basically like
micro's behavior by default...