1

When text editing with vim under konsole, I'd like to see all characters, including notably soft hyphens (­) and narrow no-break spaces ( ). Right now I only see these characters when the cursor is on them, and otherwise everything after is moved one place to the left, which leads to much confusion. For instance, with syntax highlighting I see this in vim:

<p class="txt"><span>(«Par bonheur...»)  </span></p>

while the real text is (_ means a narrow no-break space here):

<p class="txt"><span>(«_Par bonheur..._»)</span></p>

and, if I try to put the cursor on the e, what I see is:

<p class="txt"><span>(«Par bon heur...») </span></p>

with the cursor on the h, because the column where the e appears initially is actually where the h is. Without syntax highlighting the </span></p> part is shoved to the left as well.

I don't know if this a font issue, a vim issue, a KDE issue or what. I've tried all available fonts in my system and they all behave the same. Is there any solution?

EDIT: :set list would be nice, if I could include these characters in listchars, but only some predefined ones are available.

Jellby
  • 2,360
  • 3
  • 27
  • 56
  • By default, all chars should be visible. It sounds like something is concealing your chars. Check if `:set conceallevel=0` makes your chars visible. – Christian Brabandt Oct 12 '14 at 13:02
  • @ChristianBrabandt I tried, no joy. Note that these characters are a bit special, because they are zero-width (or close). I expect something similar would happen with other real zero-width characters (zero-width non-joiner, righ-to-left mark, etc.) – Jellby Oct 12 '14 at 13:08
  • `

    (« Par bonheur... »)

    ` displays fine here. You should try with GVim and other editors.
    – romainl Oct 12 '14 at 20:06
  • @romainl Hmm... Yes, gvim is fine. It may be a Qt thing, since I'm using vim in konsole, and kwrite shows a similar behavior. – Jellby Oct 13 '14 at 07:10
  • Yes, you seem to be on a good lead, you should try a Qt/KDE-specific place. Also, the two characters in your question are not zero-width at all ad should be displayed as normal hyphen/space in a monospace font environment. – romainl Oct 13 '14 at 07:14
  • @romainl I meant that the soft hyphen is normally invisible, and the thin space is thinner than a normal character, and it could be that it's interpreted as zero-width in a monospace context (just trying to find a reason for the behavior I'm seeing). The issue was reported in https://bugreports.qt-project.org/browse/QTBUG-13280, it is reported as fixed in Qt 5.1.0, but I believe my distro (Kubuntu 14.04) is still using Qt4... – Jellby Oct 13 '14 at 07:38

0 Answers0