You are not logged in.
I admit that I wasn't paying attention enough to know when this happened, or it might be an issue with my config, but....
When I paste indented code into nano, it doesn't keep its format anymore.
It used to look like this;
text
text
text
text
text
text
text
Now it looks like this;
text
text
text
text
text
text
text
Last edited by Sjoden (2009-01-06 04:22:33)
Offline
I run nano with this and never have any problems:
nano -Wx
Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.
Offline
I just copy and pasted the above into nano and it's working fine.
Offline
How are you pasting it? ( Shift+Ins / middle click ) or does your terminal let you right click > paste?
Perhaps try the other method of pasting?
Either way, I've tried with multiple terminals and both methods. I don't have that problem
Last edited by Square (2009-01-05 00:11:30)
Offline
Some form of auto indent might be on.
Try:
man nanorc
And create/edit the nano config file with the appropriate option.
Offline
I haven't looked into auto indent. My example up above is in spaces, not tabs. I should have been more clear. I haven't tried pasting with spaces. I was pasting code from some of my old txt files that had a 4 space tab length with the highlight/middle click into an ssh session with nano open with a tab length of 4. I'll take a closer look at the nanorc after I get back from dinner tonight
Offline
Interresting problem; with the built-in editor of the Midnight Commander I get the same problem every now and then (when pasting using [shift+]middle-click). As far as I know the editor of MC doesn't have auto-indenting...
Offline
Same problem here in vim, I generally work around it by doing
cat >> file.txt
Offline
Offline
(~offtopic) SamC, in vim you could try doing:
:set paste
[paste your text normally]
:set nopaste
Offline
I don't know how I missed it, but autoindenting was turned on in the nanorc. I turned it off, and its working.
One problem though, is that I don't think its reading ~/.nanorc, but /etc/nanorc no matter what. It's also still not recognizing 'set nowrap' or 'set mouse'. Maybe I'll open a new thread/bug for that. None of that is happening on my local machine, just my on my slicehost vps.
Offline