On Tue, Dec 30, 2014 at 11:46:24PM +0100, Jens Schweikhardt wrote: > On Wed, Dec 31, 2014 at 01:55:06AM +0400, Alexey Radkov wrote: > # Here is a good solution that works for me: > # > # http://www.nerdyweekly.com/posts/enable-italic-text-vim-tmux-gnome-terminal/ > # > # (see section 'vim') > > Sorry, no. No workarounds. No different terminal. No tmux. No top posting. > > Xterm can do italics. The control sequences are known. > What is stopping vim from using them? That article says > > "You may have noticed: [3m and [23m are the special sequences to > start and stop printing italic text. Unfortunately, vim doesn’t care > about those. It expects sitm and ritm instead."
Vim expects the terminfo db to advertise how to display italic characters. As long as the terminal actually supports displaying italic text, terminfo is reporting the escape sequences properly (i.e., “:set t_ZH?” and “:set t_ZR?” show what the terminal needs to enter/leave italic mode), *AND* your font supports italic text, then things will Just Work. The latter is just as important as the first two. Before drafting this email, I was trying to verify that things work and was surprised that “printf "\e[3mfoo\e[23m\n"” wasn't showing italic text in my xterm. Then I made the connection that my font, -misc-fixed-medium-r-normal--18-120-100-100-c-90-iso10646-1, couldn't display italics. I changed that to DejaVu Sans Mono and voilà, italic text. Cheers, -- James GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]> -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
