Search code examples
vimlatexfolding

Change vim concealed text font size


I want to increase the font size of my concealed latex symbols / titles. I haven't found a straightforward way to do this. Is there an obscure hack that would work?

It looks as though it has been done in Emacs AUCTeX: aquamacs screenshot

I'm aware that the formula in the screenshot comes from a png file, but at least it uses a bigger font for the title.


Solution

  • While Vim does not allow you to change the font size (i.e, all fonts in Vim instance must be same size) it does allow you to apply special highlighting and/or a different font. To do this you could, e.g., simply make all Conceal text bold and underlined:

    :highight Conceal gui=bold,underline cterm=bold,underline
    

    You could also change the default colors:

    :highight Conceal gui=bold,underline cterm=bold,underline guifg=yellow guibg=red ctermfg=yellow ctermbg=red
    

    You can also change the font used by Conceal text. (Technically I think it is possible to specify a (bitmap) font of larger size, but that's not advised because it will screw up screen drawing):

    :highight Conceal font=Monaco gui=bold,underline cterm=bold,underline guifg=yellow guibg=red ctermfg=yellow ctermbg=red