Open AprilArcus opened 9 years ago
infocmp
isn't in POSIX, but tput
is. I think this should work everywhere:
if has("gui_running") || ( has("unix") && system("tput sitm") == "\033[3m" )
let s:terminal_italic=1
else
let s:terminal_italic=0
endif
Filed a pull request.
Italics are now supported in iTerm2, if the user supplies an emended terminfo file. See Enabling italic fonts in iTerm2, tmux, and vim by Alex Pierce for a detailed walkthrough.
Right now,
vim-colors-solarized/colors/solarized.vim
lines 137-157 employ an if/else tree to determine compatibility with italics by testing against a hard-coded list of known-compatible terminal emulators:I think a more general approach would be to shell out to
infocmp
and test for asitm
entry:would this have any negative consequences for Windows console users?