开发者

Vim Ruby syntax coloring messes up terminal colors on exiting vim in Gnu Screen

I fire up Gnu screen and start editing a Ruby file with syntax coloring on and choose a vim colorscheme that uses boldface and a colored background (e.g. evening). Then I quit vim. The terminal doesn't return to the way it was before, but takes on some of the properties of the colorscheme I was using in Vim.

This doesn't happen if I'm开发者_运维问答 using vim outside of Gnu screen.

Has anyone experienced this too? What's the workaround?

I'm using Ubuntu Jaunty and the GNOME Terminal.


Sounds like what happens when you set t_Co in your ~/.vimrc to a value that isn't correct.

If that is the case, what you should be doing instead is ensuring that $TERM is set properly in your environment so Vim automatically knows how many colors it can use. Manually setting t_Co in your ~/.vimrc is never the correct answer.

Inside screen, $TERM should be screen or screen-bce depending on your configuration. If you have the proper terminfo entries and screen was built to support it, you can also use screen-256color or screen-256color-bce.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜