1

I am using vimwiki on nvim 0.1.7 on Konsole 16.12.3 on Plasma 5.9.5 on Kubuntu 17.04.

Wiki text appears bold when it is between two stars. But when between two underscores, it does not appear in italic.

The same is the case even when I switch the format to markdown.

What is happening? How do I get to see the italic text?

  • Are italics enabled at all? Try to edit a simple html file like :e test.html and write <em>italic</em> into it. Does it appear in italic? – apparat Sep 6 '17 at 13:03
  • @apparat No. It does not. It just appears on a dark background. – deshmukh Sep 6 '17 at 15:14
  • Try to put this let&t_ZH="\e[3m" and let &t_ZR="\e[23m" in your vimrc and see if the html file works now. – apparat Sep 6 '17 at 16:04
  • @apparat No difference. It is just the same. BTW, I put a space between let and & in the first expression. – deshmukh Sep 7 '17 at 10:10
2

It's possible your terminal doesn't support italics. Go through this link (if you're interested in learning a little) to possibly fix your issue. Start at the paragraph with vimrc in it.

I'll provide a tl;dr transcription below

Transcription of above link.

  1. type this into your shell: echo -e "\e[3mfoo\e[23m" if it shows up in italics, good we're halfway there already.

  2. If it doesn't you might have to "patch" your shell to include italic support. I quote patch because if the terminal doesn't support it, then no matter what you patch in, it won't work. You'd have to try another terminal that does.

    2a. Enter this command: infocmp -L $TERM > $TERM.terminfo. It outputs all the details of your current $TERM in a nice format and puts them in a file that you can edit.

    2b. Using whatever tool you want, search for the ritm and sitm. Since we saw above that italics don't print to your terminal, they shouldn't exist.

    2c. Add the following to your $TERM.terminfo file ritm=\E[23m & sitm=\E[3m

    2d. Compile the new terminfo file by doing this: tic -o ~/. $TERM.terminfo

    2e. Kill and restart the tmux server, and you should now have italics capabilities.

  3. Add the following to your .vimrc (Might not be necessary, you should test it on your system)

    • set t_ZH=^[[3m & set t_ZR=^[[23m

After all this, you should be good to go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.