Skip to main content
deleted 179 characters in body
Source Link
mefryar
  • 101
  • 2

I'm using iTerm2 3.4.6 and vim-colors-solarized. For me,

echo `tput sitm`italics`tput ritm`

output italics without me havingIn addition to updateupdating my TERMINFO.

However, in order to get italics to work in vim, I still had to make two other changes.

  1. Edit .vim/colors/solarized.vim as recommended in Solarized #120 to replace lines 137-157 with the following:

     if has("gui_running") || ( has("unix") && system("tput sitm") == "\033[3m" )
         let s:terminal_italic=1
     else
         let s:terminal_italic=0
     endif
    
  2. Edit .vimrc to add the following lines using <Ctrl-v><Esc> to enter the ^[ characters.

     " Enable italics
     set t_ZH=^[[3m
     set t_ZR=^[[23m
    

I'm using iTerm2 3.4.6 and vim-colors-solarized. For me,

echo `tput sitm`italics`tput ritm`

output italics without me having to update TERMINFO.

However, in order to get italics to work in vim, I still had to make two changes.

  1. Edit .vim/colors/solarized.vim as recommended in Solarized #120 to replace lines 137-157 with the following:

     if has("gui_running") || ( has("unix") && system("tput sitm") == "\033[3m" )
         let s:terminal_italic=1
     else
         let s:terminal_italic=0
     endif
    
  2. Edit .vimrc to add the following lines using <Ctrl-v><Esc> to enter the ^[ characters.

     " Enable italics
     set t_ZH=^[[3m
     set t_ZR=^[[23m
    

In addition to updating my TERMINFO, I had to make two other changes.

  1. Edit .vim/colors/solarized.vim as recommended in Solarized #120 to replace lines 137-157 with the following:

     if has("gui_running") || ( has("unix") && system("tput sitm") == "\033[3m" )
         let s:terminal_italic=1
     else
         let s:terminal_italic=0
     endif
    
  2. Edit .vimrc to add the following lines using <Ctrl-v><Esc> to enter the ^[ characters.

     " Enable italics
     set t_ZH=^[[3m
     set t_ZR=^[[23m
    
Source Link
mefryar
  • 101
  • 2

I'm using iTerm2 3.4.6 and vim-colors-solarized. For me,

echo `tput sitm`italics`tput ritm`

output italics without me having to update TERMINFO.

However, in order to get italics to work in vim, I still had to make two changes.

  1. Edit .vim/colors/solarized.vim as recommended in Solarized #120 to replace lines 137-157 with the following:

     if has("gui_running") || ( has("unix") && system("tput sitm") == "\033[3m" )
         let s:terminal_italic=1
     else
         let s:terminal_italic=0
     endif
    
  2. Edit .vimrc to add the following lines using <Ctrl-v><Esc> to enter the ^[ characters.

     " Enable italics
     set t_ZH=^[[3m
     set t_ZR=^[[23m