You are not logged in.

#1 2014-11-25 20:13:00

Gulver
Member
Registered: 2013-05-24
Posts: 208

Nano: Long text misalignment in Urxvt (rxvt-unicode) editing [SOLVED]

(It will not be easy to explain, alas, maybe that's why I couldn't find an answer from Google so, if I somehow missed some terminology please feel obliged to correct me.)


When I'm editing text in Urxvt, regardless if the text has spaces between or continues it does, incorrectly transfer to next line and gets misaligned.

Here I present you as an example, my conkyrc for bar:

Is in normal mode:

^fg(\#D1DEE3)^i(/home/gulver/.config/bspwm/panel/icons/note1.xbm) ^fg(\#DE9764)¡${if_running mo
cp}${texeci 10 mocp -Q "%t"}¡  ^fg(\#D1DEE3)^i(/home/gulver/.config/bspwm/panel/icons/phones1.x
bm) ^fg(\#DE9764)%${exec  pamixer --get-volume}  ^fg(\#D1DEE3) ^i(/home/gulver/.config/bspwm/pa
nel/icons/disk.xbm) ^fg(\#DE9764)${fs_free /home}  ^fg(\#D1DEE3)^i(/home/gulver/.config/bspwm/p
anel/icons/mem1.xbm) ^fg(\#DE9764)%${memperc}  ^fg(\#D1DEE3)^i(/home/gulver/.config/bspwm/panel
/icons/bat2.xbm) ^fg(\#DE9764)%${battery_percent BAT0}  ^fg(\#D1DEE3)^i(/home/gulver/.config/bs
pwm/panel/icons/temp0.xbm) ^fg(\#DE9764)${acpitemp}°C  ^fg(\#D1DEE3)^i(/home/gulver/.config/bsp
wm/panel/icons/wifi_02.xbm) ^fg(\#DE9764)%${wireless_link_qual_perc wlo1}  ^fg(\#D1DEE3)^i(/hom
e/gulver/.config/bspwm/panel/icons/cal1.xbm) ^fg(\#DE9764)${time %a %b %d}^fg(\#D1DEE3)  ^i(/ho
me/gulver/.config/bspwm/panel/icons/clock1.xbm) ^fg(\#DE9764)${time %T}

Now I'm going to add a few X and will post what it turns out to:


^fg(\#D1DEE3)^i(/home/gulver/.config/bspwm/panel/icons/note1.xbm) ^fg(\#DE9764)¡${if_running 
mocp}${texeci 10 mocp -Q "%t"}¡  
^fg(\#D1DEE3)^i(/home/gulver/.config/bspwm/panel/icons/phones1.xbm) ^fg(\#DE9764)%${exec  
pamixer --get-volume}  ^fg(\#D1DEE3) ^i(/home/gulver/.config/bspwm/panel/icons/disk.xbm) 
^fg(\#DE9764)${fs_free /home}  ^fg(\#D1DEE3)^i(/home/gulver/.config/bspwm/panel/icons/mem1.xbm) 
^fg(\#DE9764)%${memperc}  ^fg(\#D1DEE3)^i(/home/gulver/.config/bspwm/panel/icons/bat2.xbm) 
^fg(\#DE9764)%${battery_percent BAT0}  
^fg(\#D1DEE3)^i(/home/gulver/.config/bspwm/panel/icons/temp0.xbm) ^fg(\#DE9764)${acpitemp}°C  
^fg(\#D1DEE3)^i(/home/gulver/.config/bspwm/panel/icons/wifi_02.xbm) 
^fg(\#DE9764)%${wireless_link_qual_perc wlo1}  
^fg(\#D1DEE3)^i(/home/gulver/.config/bspwm/panel/icons/cal1.xbm) ^fg(\#DE9764)${time %a %b 
%d}^fg(\#D1DEE3)  ^i(/home/gulver/.config/bspwm/panel/icons/clock1.xbm)XXXXXXX
^fg(\#DE9764)${time %T}

I also have this problem with Urxvt importing tabbed spaces:

I'm copying this from a repo:

while read -r line ; do
    case $line in
        S*)
            sys_infos="%{r}${line#?}"
            ;;
        T*)
            title=" %{F$COLOR_ICON}%{F-} bspwm"
            ;;
        W*)
            wm_infos="%{c}"
            IFS=':'
            set -- ${line#?}
            while [ $# -gt 0 ] ; do
                item=$1
                name=${item#?}
                case $item in
                    [OFU]*)

and it turns out to be:

while read -r line ; do
    case $line in
            S*)
                        sys_infos="%{r}${line#?}"
                                    ;;
                                            T*)
                                                        title=" %{F$COLOR_ICON}%{F-} bspwm"
                                                                    ;;
                                                                            W*)
                                                                                        wm_infos="%{c}"
                                                                                                    IFS=
':'

        set -- ${line#?}

                    while [ $# -gt 0 ] ; do

                                    item=$1

                                                    name=${item#?}

                                                                    case $item in

                                                                                        [OFU]*)

Edit:
Here is my config:

URxvt*font: xft:terminus:size=8
URxvt*perl-ext-common: default,clipboard,selection-to-clipboard,matcher
URxvt*url-launcher: /usr/bin/google-chrome
URxvt*matcher.button: 1
URxvt*depth:                32
URxvt*background:            [020]#4F4F4F
URxvt*foreground:            [100]#DEBDAF
URxvt*borderless: 1
URxvt*scrollBar:            false
URxvt*saveLines:  50000
URxvt*termName:    rxvt-unicode

Last edited by Gulver (2014-11-25 21:18:52)

Offline

#2 2014-11-25 20:22:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Nano: Long text misalignment in Urxvt (rxvt-unicode) editing [SOLVED]

The staircasing (your second issue) can be avoided with vim's paste mode (assuming your editor is vim, you haven't made that clear).

Your first issue makes no sense to me: I can't see any difference between the two pastes, other than the XXXX's...



Moving to NC.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2014-11-25 20:36:40

Gulver
Member
Registered: 2013-05-24
Posts: 208

Re: Nano: Long text misalignment in Urxvt (rxvt-unicode) editing [SOLVED]

jasonwryan wrote:

The staircasing (your second issue) can be avoided with vim's paste mode (assuming your editor is vim, you haven't made that clear).

Your first issue makes no sense to me: I can't see any difference between the two pastes, other than the XXXX's...

Moving to NC.


Thank you for your moderation and forgive my miscalculation.

I edited my first post with proper information. Take a look at the misalignment again, if you would like to.
I'm not using vi*. I'm using nano, I guess I need to post them too, here...

nanorc:

set autoindent
set brackets ""')>]}"
set casesensitive
set regexp
set softwrap

Last edited by Gulver (2014-11-25 20:43:24)

Offline

#4 2014-11-25 20:44:52

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Nano: Long text misalignment in Urxvt (rxvt-unicode) editing [SOLVED]

You should edit your first post and put nano in the title, as it is probably more related to your editor than your terminal. I don't use nano, so I can't offer any advice about how it works.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-11-25 20:49:32

Gulver
Member
Registered: 2013-05-24
Posts: 208

Re: Nano: Long text misalignment in Urxvt (rxvt-unicode) editing [SOLVED]

jasonwryan wrote:

You should edit your first post and put nano in the title, as it is probably more related to your editor than your terminal. I don't use nano, so I can't offer any advice about how it works.

Thank you again, I corrected it.
Is staircasing happening because of import being from a vi fork? In that case I would be able to look for something...

Offline

#6 2014-11-25 21:03:01

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Nano: Long text misalignment in Urxvt (rxvt-unicode) editing [SOLVED]

I think nano is word-wrapping lines in your first example. Edit the file using "nano -w" to prevent this.

(edit) In the second case, do you have a ~/.nanorc file? Do you have "autoindent" set in this file? I can duplicate your problem with a .nanorc if I set autoindent.

Last edited by 2ManyDogs (2014-11-25 21:14:27)

Offline

#7 2014-11-25 21:05:05

Gulver
Member
Registered: 2013-05-24
Posts: 208

Re: Nano: Long text misalignment in Urxvt (rxvt-unicode) editing [SOLVED]

2ManyDogs wrote:

I think nano is word-wrapping lines in your first example. Edit the file using "nano -w" to prevent this.

Yay! set nowrap solved it all. It's a little funny since I also have set softwrap on and wrapping it normally now.

Also, staircasing, if not a joke, doesn't give any result at all.

Last edited by Gulver (2014-11-25 21:05:39)

Offline

#8 2014-11-25 21:06:49

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: Nano: Long text misalignment in Urxvt (rxvt-unicode) editing [SOLVED]

^ see my edit

Offline

#9 2014-11-25 21:18:24

Gulver
Member
Registered: 2013-05-24
Posts: 208

Re: Nano: Long text misalignment in Urxvt (rxvt-unicode) editing [SOLVED]

2ManyDogs wrote:

In the second case, do you have a ~/.nanorc file? Do you have "autoindent" set in this file? I can duplicate your problem with a .nanorc if I set autoindent.

Yay again! autoindent cause it but I also had to enable nonewline for it to get fixed.

Last edited by Gulver (2014-11-25 21:20:44)

Offline

Board footer

Powered by FluxBB