You are not logged in.

#1 2009-01-04 22:47:36

Sjoden
Member
From: WA
Registered: 2007-08-16
Posts: 380
Website

[Solved]nano regression?

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

#2 2009-01-04 22:52:34

haxit
Member
From: /home/haxit
Registered: 2008-03-04
Posts: 1,247
Website

Re: [Solved]nano regression?

I run nano with this and never have any problems:

nano -Wx


Archi686 User | Old Screenshots | Old .Configs
Vi veri universum vivus vici.

Offline

#3 2009-01-04 23:30:47

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [Solved]nano regression?

I just copy and pasted the above into nano and it's working fine.

Offline

#4 2009-01-05 00:10:04

Square
Member
Registered: 2008-06-11
Posts: 435

Re: [Solved]nano regression?

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 hmm

Last edited by Square (2009-01-05 00:11:30)


 

Offline

#5 2009-01-05 01:07:38

minozake
Member
Registered: 2008-12-29
Posts: 6

Re: [Solved]nano regression?

Some form of auto indent might be on.

Try:

man nanorc

And create/edit the nano config file with the appropriate option.

Offline

#6 2009-01-05 01:46:28

Sjoden
Member
From: WA
Registered: 2007-08-16
Posts: 380
Website

Re: [Solved]nano regression?

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

#7 2009-01-05 03:51:39

Marcel-
Member
From: Utrecht, NL
Registered: 2006-12-03
Posts: 266

Re: [Solved]nano regression?

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

#8 2009-01-05 04:17:09

SamC
Member
From: Calgary
Registered: 2008-05-13
Posts: 611
Website

Re: [Solved]nano regression?

Same problem here in vim, I generally work around it by doing

cat >> file.txt

Offline

#9 2009-01-05 05:27:00

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Offline

#10 2009-01-05 20:57:45

panecillo
Member
From: Spain
Registered: 2007-07-21
Posts: 44

Re: [Solved]nano regression?

(~offtopic) SamC, in vim you could try doing:

:set paste
[paste your text normally]
:set nopaste

Offline

#11 2009-01-06 04:22:17

Sjoden
Member
From: WA
Registered: 2007-08-16
Posts: 380
Website

Re: [Solved]nano regression?

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

Board footer

Powered by FluxBB