English 中文(简体)
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.

问题回答

暂无回答




相关问题
switching between screens

I m using GNU screen just recently. I m wondering if there is an easier way to switch between screen. for example to map it to alt+left arrow and alt+right arrow ?

Custom script in .screenrc

I made a script that spawns a remote shell or runs a local shell whether it s on the current machine or not: #!/bin/bash # By: benoror <benoror@gmail.com> # # spawns a remote shell or runs a ...

GNU Screen: Changing Global Key-binding

I ve recently started using screen in remote sessions. One problem is that emacs doesn t recognize its C-a and I don t want to bind emacs C-a to something else, as I m very used to it. Google shows ...

Set screen-title from shellscript

Is it possible to set the Screen Title using a shell script? I thought about something like sending the key commands ctrl+A shift-A Name enter I searched for about an hour on how to emulate ...

热门标签