LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Fixing nano's screwing up of line endings without having to learn a new editor (https://www.linuxquestions.org/questions/linux-software-2/fixing-nanos-screwing-up-of-line-endings-without-having-to-learn-a-new-editor-4175526033/)

YesItsMe 11-20-2014 05:32 PM

Fixing nano's screwing up of line endings without having to learn a new editor
 
My way:

1. install joe
2. # echo 'alias nano="jpico"' >> ~/.zshrc
3. Profit!

I'm not entirely sure if there's a way to actually make nano stop wrapping a file where it doesn't fit, but my solution works surprisingly well too.

frankbell 11-20-2014 07:33 PM

Did you look at /etc/nanorc? Here's bitn (there's a lot more I didn't bother to read):

Code:

## Don't add newlines to the ends of files.
# set nonewlines

## Don't wrap text at all.
# set nowrap

.....

## Enable soft line wrapping (AKA full-line display).
# set softwrap

As an aside, I did not know there was a "nanorc" file and I don't use nano; this was a shot in the dark. I have learned, though, looking for an *rc file usually yields results.

YesItsMe 11-20-2014 07:42 PM

Oh, that's nice. Is there a similar trick to make it read German umlauts properly?

frankbell 11-20-2014 08:51 PM

Quote:

Oh, that's nice. Is there a similar trick to make it read German umlauts properly?
I have no idea, but I suspect that has more to do with the selected keyboard language than with the particular program.

This may help. https://bbs.archlinux.org/viewtopic.php?id=161116

YesItsMe 11-21-2014 03:15 AM

As they're even displayed improperly on load, I doubt it's the keyboard. :/


All times are GMT -5. The time now is 08:15 AM.