New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Nano line wrapping (-w)
I must have been using nano for more than 15 years now. I've used "nano -w" to turn off line wrapping, because the default was hard wrapping/breaking the lines.
It's a bit of a pain, because every other time I would mistype the "-w".
nano o-w
Today, reading the man page for nano, I found:
-w, --nowrap
Do not automatically hard-wrap the current line when it becomes overlong. This is the default. (This option is the opposite of -b (--break‐
longlines) — the last one given takes effect.)
So "-w" is the default now. I'm sure it wasn't before, though.
Thanked by 1nghialele


Comments
just make an alias if you use it often something like "nw" for "nano -w"
I was about to do something like that, after all these years. There's also .nanorc where you can change the settings. But as it turns out, it's the default now.
I admire you for admitting in public you use nano.
What do you use?
Even though I know it's the default now. I still find myself typing:
I'm not sure I can stop.
Why don't you use
vim?Because some people don’t like to torture themselves?
Why don't you use
notepad.exe?It's too similar to vi, which I was introduced to back in the 80's, and disliked.
wordpad.exe ftw
vim of course, horrible shit but now i'm old and used to it. i was teasin though, use what you like
On my desktop, I often use kate, though even there, if I'm already on the command line, I'll more likely use nano.
i use nano
Yeah everybody hates
vi/vimat first (including me) but once you force yourself to learn a few keys you will wonder how you lived without it.Idk what's wrong with nano.. I would like to know also what he uses. found in the comment up
I use nvim.
FTFY
Sad. You're really limiting yourself as a Unix user.
If you'd said "I prefer emacs," that is a respectable answer.
But every sysadmin I've ever known who was worth his salt quickly outgrew nano and used vi/m or emacs. When editing text files is a large part of your day, you want to do it as efficiently as possible.
I can't even begin to imagine editing text files without regex...
gotz to have the softwrapping
I can’t imagine editing text files without a GUI… any serious remote editing of configs I do with winscp+notepad++ , and of course nano for one liners
Vim is for hardcore keyboard users, you can get same results from a gaming mouse and monitor (1:1, high refresh rate, low latency) without having to learn new tricks
Also why not edit
~/.nanorcto make it permanentBack in the day, I used the Prime line editor (ED), on a Prime minicomputer. When searching, I found it's available on sourceforge. I don't think I'd want to go back to it, today, though.
No offense taken, no worries. Nano is just what I've gotten used.
Nano is for neutered bitches.
I currently use Micro as editor. It's very simple and easy to use. For coding i either use VSCode or Vim using LazyVim (when i'm on terminal or ssh'ing to a vps)
esc + :q! is all you need
edit: maybe :wq too
edit #2: you know what, just install nodejs vscode on ur server and see 90% cpu when it tries to index your $3/year crapbox
--nowrapseems to have been made default in February 2019 (in which case it's been a while):(See https://cgit.git.savannah.gnu.org/cgit/nano.git/commit/?id=cd9328fbf5c4016ba5c5fbc06fe88427d9bd1b50 )
Although nano has its limitations, it has regex:
Or just these:
esc + ZX (quit without saving)
esc + ZZ (save and quit)
i use nano normally. Only use vim when copy pasting. nano have weired actions when copied text have invisible characters.