View previous topic :: View next topic |
Author |
Message |
zlg Retired Dev
Joined: 11 Sep 2012 Posts: 49 Location: Earth
|
Posted: Sun Dec 23, 2012 7:23 am Post subject: Vim's highlighting underline instead of reverse-video |
|
|
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.
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 zlg on Wed Jun 08, 2016 8:45 am; edited 2 times in total |
|
Back to top |
|
|
ppurka Advocate
Joined: 26 Dec 2004 Posts: 3256
|
Posted: Sun Dec 23, 2012 7:47 am Post subject: |
|
|
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 kde5 | e is unstable :-/ |
|
Back to top |
|
|
zlg Retired Dev
Joined: 11 Sep 2012 Posts: 49 Location: Earth
|
Posted: Sun Dec 23, 2012 8:03 am Post subject: |
|
|
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 |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sun Dec 23, 2012 8:25 am Post subject: |
|
|
Maybe useful: vim wiki. |
|
Back to top |
|
|
zlg Retired Dev
Joined: 11 Sep 2012 Posts: 49 Location: Earth
|
Posted: Sun Dec 23, 2012 9:31 am Post subject: |
|
|
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 |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Sun Dec 23, 2012 9:53 am Post subject: |
|
|
It may be a bug in your version of vim, there's other versions. |
|
Back to top |
|
|
zlg Retired Dev
Joined: 11 Sep 2012 Posts: 49 Location: Earth
|
Posted: Sun Dec 23, 2012 12:49 pm Post subject: |
|
|
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 |
|
|
zlg Retired Dev
Joined: 11 Sep 2012 Posts: 49 Location: Earth
|
Posted: Tue Dec 25, 2012 7:32 pm Post subject: |
|
|
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 |
|
|
|