Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I use vim on a Mac in iTerm2 (ie - not MacVIM) and within a tmux session. I have powerline installed, so that's something to keep in mind.

Sometimes, when I'm typing in a particular file, for some reason, all of a sudden the text changes to weird gibberish.

messed up fonts in terminal vim

I've tried quite a lot of different settings to change this, but I'm really at kind of a loss as to what might be causing this. You'll notice in the screenshot that the tmux tab labels (very bottom) are unaffected by this issue. It's almost as if the font that vim is using, all of a sudden switches to a font with different characters.

Anyone got any ideas on this one?

share|improve this question

migrated from stackoverflow.com May 2 '13 at 10:27

This question came from our site for professional and enthusiast programmers.

    
Nice! Does it happen with no vimrc and/or no plugins ($ vim -u NONE --noplugins)? –  romainl May 1 '13 at 21:31
    
Is your TERM variable set to either screen or screen-256color? –  FDinoff May 1 '13 at 21:42
    
Hmm... haven't tried without vimrc or plugins... will definitely give that a shot tomorrow for a bit. echo $TERM in my terminal returns xterm-color. But, that's what is being sent by iTerm2, right? I also have t_Co set to 256 in my vimrc. All that said, I'm not sure it's a color issue as the fonts render fine for a long time, before something triggers the switch to crazy characters. I am definitely kind of vim plugin-happy, so perhaps that's part of the issue. I'll try the no plugins / vimrc route and see what happens there. –  Dave Giunta May 2 '13 at 5:17

1 Answer 1

What is the output of ":verbose set guifont? guifontset?" (the question marks are part of the command)? Do either contain a comma-delimited list? If so, try clearing 'guifontset' (if it's supported and set) and setting 'guifont' to just one font.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.