Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Vim's highlighting underline instead of reverse-video
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
sporkbox
n00b
n00b


Joined: 11 Sep 2012
Posts: 21
Location: United States

PostPosted: Sun Dec 23, 2012 7:23 am    Post subject: Vim's highlighting underline instead of reverse-video Reply with quote

For some reason, vim decides it wants visual selections to be underlined instead of reversed. I run vim inside of urxvt (and often inside tmux). I've consulted the Freenode channels for each, and each of them blamed one of the other two. I'm not sure what's causing issues, so I'll post my configuration files and a screenshot:

http://sporkbox.us/files/vim-highlight-issue.png

I've tried various things to fix it without killing my vim session, but that seems to be the only way to fix it... here are my configs:

https://github.com/sporkbox/vimrc/blob/master/vimrc
https://github.com/sporkbox/rc/blob/master/tmux.conf
https://github.com/sporkbox/rc/blob/master/xdefaults

(I could paste them in this post but that would be obnoxious, no?)

The only thing I can think of that may be causing this is the iso mode that urxvt has, which I accidentally trigger sometimes (by hitting ctrl + shift). It has legitimate use, but I typically exit it by hitting Ctrl again. It never has this effect in other terminal apps, so I think it may be something special with vim...

At any rate, it's annoying as hell.

EDIT: it seems the highlight group "VisualNOS" is responsible for the style change, which is visual selection when vim is "Not Owning the Selection". So, what causes this? It says in :help that only xtrem-clipboard and gui-x11 support this. I do want vim and X to be able to share clipboards if necessary, but why the change in style out of nowhere when I can paste into and out of vim multiple times without this happening? Should I explicitly just link VisualNOS's highlight pattern to Visual and stop caring when and why the differentiation is made?

EDIT2: Recently reorganized my config repos; updated links.


Last edited by sporkbox on Wed Dec 26, 2012 4:18 pm; edited 1 time in total
Back to top
View user's profile Send private message
ppurka
Advocate
Advocate


Joined: 26 Dec 2004
Posts: 3209

PostPosted: Sun Dec 23, 2012 7:47 am    Post subject: Reply with quote

It probably happens when you select something in vim. Then you go to some other application and do a selection there. Then vim's selection should get this kind of underline. This is a useful visual indicator since it tells you that your primary selection is now not the text in vim.
_________________
emerge --quiet redefined | E17 vids: I, II | Now using kde4 :-/
Back to top
View user's profile Send private message
sporkbox
n00b
n00b


Joined: 11 Sep 2012
Posts: 21
Location: United States

PostPosted: Sun Dec 23, 2012 8:03 am    Post subject: Reply with quote

ppurka: I tested your situation in a separate vim session and it did what you said, but only temporarily. Once I came back to vim and canceled the selection in vim, selecting looked normal again. What's outlined in the screenshot is persistent long after such a situation (I can't reproduce it intentionally, yet).
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Dec 23, 2012 8:25 am    Post subject: Reply with quote

Maybe useful: vim wiki.
Back to top
View user's profile Send private message
sporkbox
n00b
n00b


Joined: 11 Sep 2012
Posts: 21
Location: United States

PostPosted: Sun Dec 23, 2012 9:31 am    Post subject: Reply with quote

I did some additional searching and couldn't find anything on clipboard ownership. I already understand registers and visual mode in general; it was just this graphical anomaly that was aggravating me. I simply set the hilight style to the same as Visual's and it looks fine now. Playing around with the registers revealed that sometimes it won't copy over into the X clipboard, but I was unable to find a way for that to be "fixed" and restore clipboard ownership, so I assume it's something that just sorts itself out.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sun Dec 23, 2012 9:53 am    Post subject: Reply with quote

It may be a bug in your version of vim, there's other versions.
Back to top
View user's profile Send private message
sporkbox
n00b
n00b


Joined: 11 Sep 2012
Posts: 21
Location: United States

PostPosted: Sun Dec 23, 2012 12:49 pm    Post subject: Reply with quote

Paul: I was using the latest (7.3.646), but as per your suggestion I have decided to try out the latest version that's marked "stable", 7.3.409. Since I don't know how to reproduce it yet, I'll give it a day or two and we'll see if it occurs again. I'll update this topic within two days.
Back to top
View user's profile Send private message
sporkbox
n00b
n00b


Joined: 11 Sep 2012
Posts: 21
Location: United States

PostPosted: Tue Dec 25, 2012 7:32 pm    Post subject: Reply with quote

Well, I've spent two days playing around with files, pasting back and forth, and haven't run into the issue again yet! Perhaps it was that one version that has the issue. No clue. Should I systematically try newer versions until I discover the bug again, or just sit tight with the older, stabler version? It's not that important of an issue for me since I can alter my colorscheme to make them both look the same. It bugs me because VisualNOS highlighting is unclear where my cursor and the highlight are: reverse is much easier to visually detect than underlines. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum