Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Completely disable italic text in GVim

Tags:

vim

italic

In GVim I'm using a fixedsys-like font which looks good, but with italic text it breaks (chars partially unreadable, especially the last italic one if the next one is regular).

For this reason (and because I dislike italic text anyway) I'd like to completely disable italic text in Vim; without modifying any syntax highlighting related files.

like image 775
ThiefMaster Avatar asked Mar 30 '11 13:03

ThiefMaster


3 Answers

When using the highly recommended Solarized theme, you can configure this using:

let g:solarized_italic=0
like image 138
blueyed Avatar answered Oct 17 '22 16:10

blueyed


Whether syntax highlighting uses italic text or not is defined by your colorscheme. Any colorscheme rule can define term, cterm, and/or gui attribute lists, which are described at :help attr-list. You can either clear the relevant colorscheme rules or remove the italic attribute from them.

For example, if the following rule is in your colorscheme

hi IncSearch gui=italic guifg=#303030 guibg=#cd8b60

you would want to simply remove the gui=italic bit. You can also specify not to use any of the attributes from attr-list by setting gui=NONE.

like image 44
jamessan Avatar answered Oct 17 '22 15:10

jamessan


When using the highly recommeded Dracula theme, you can configure this by adding the following to your ~/.vimrc:

let g:dracula_italic = 0

From dracula's documentation

Having issues with font styles (italic, bold, underline)?

  • Be sure your terminal supports these styles.
  • If running tmux, see tmux section.
  • If all else fails, disable the style by setting let g:dracula_<style-name> = 0 in your vimrc, where <style-name> is one of (italic, bold, underline, undercurl, inverse)
like image 3
brother-bilo Avatar answered Oct 17 '22 16:10

brother-bilo