I'm using vi on linux - vi --version gives: VIM - Vi IMproved 7.2 (2008 Aug 9, compiled Apr 16 2010 12:47:47)

A few weeks ago, for no apparent reason, every time I use vi the entire text is flashing, is highlighted in green and yellow seemingly at random, and each line ends with a visible $ sign. Although the editing keystrokes work it's totally unusable because the text is blinking the whole time!

At the bottom of the screen is the following:

N ? crontab.2siKb4/crontab ? ? unix ? latin1 ? crontab ? 2% ? a 1:1

This leads me to suspect it may be some kind of character encoding issue, but I'm not sure what could have caused that, or how to correct it. Searching the web didn't really seem to come up with much.

If anyone could help me to get vi back to normal please I'd be very grateful.

Thanks in advance, Ian.

migrated from stackoverflow.com Jul 16 '12 at 2:41

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

  • 6
    Try starting the editor with no config file: vim -u NONE. Are the effects still there? – Thor Jul 15 '12 at 21:48
  • What do you get if you write echo $LANG - $TERM in your shell? – Matteo Italia Jul 15 '12 at 21:51
  • Hello, Thanks for your help. If I run: echo $LANG - $TERM I get: - xterm-color If I start vi with the command: vim -u NONE filename.txt then the effects are not still there and vi performs as normal. So we're getting somewhere! Do you know how I can set vi back into this normal state now, so that when I run crontab -e (so I'm not starting vi from the command line directly) it works properly? Many thanks, Ian – Ian Howlett Jul 16 '12 at 6:08
  • 2
    With -u NONE you tell vim to use no configuration file. If it works that way, it means the culprit is in your configuration. Reame your .vimrc (into .vimrc.flashing for instance) and create a new .vimrc readding lines from .vimrc.flashing, one by one. When it start flashing again, you found the culprit. – Dakatine Jul 17 '12 at 7:34

The offending lines making vim flash were these:

"tell the term has 256 colors
set t_Co=256

" Color scheme
let g:Powerline_symbols = 'fancy'
colors jellybeans_black

I took them out and everything worked fine again. Thanks a lot for your help, everyone, much appreciated.


This is often caused by setting colors that the $TERM cannot use. Try using export TERM=xterm-256color before opening vim and see if that helps.


Instead of setting TERM to xterm, sit to linux: export TERM=linux

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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