![]() That name is what you are supposed to setup in your terminal emulator itself. The value of the term option (retrieved with &term) is the name of the terminal as picked up by Vim upon startup. My answer assumes that you are able to edit those configuration files but, since you are able to edit your ~/.vimrc, I don't think that I'm that far off the mark. Now, both multiplexers will tell Vim they support 256 colors and Vim will do what you expect it to do. If you want a more uniform (and colorful) behavior, you must configure them to use a "better" value for $TERM:Īdd this line to ~/.nf: set -g default-terminal "screen-256color"Īdd this line to ~/.screenrc: term "screen-256color" ![]() When you use tmux or screen, those programs set their own default value for $TERM, usually screen, and Vim does what it has to do with the info it is given. You don't need to do anything in Vim as it's perfectly capable to do the right thing by itself. How you do it will depend on the terminal emulator and is outside of the scope of your question and this answer. When you don't use tmux or screen, you only need to configure your terminal emulators to advertise themselves as "capable of displaying 256 colors" by setting their TERM to xterm-256color or any comparable value that works with your terminals and platforms. Note also that I tested both set -g default-terminal "xterm-256color" and set -g default-terminal "screen-256color" settings for Tmux and this change had no effect on behavior. Then I swapped out set t_Co=256 for set term=xterm-256color and now the colors work when using Vim through Tmux. Also, OS X's Terminal.app correctly rendered the colors (I did not test PuTTY with this on windows unfortunately) with Vim in Tmux. Here, Vim was correctly displaying the colors when it was not run through Tmux. vimrc set the colors using the set t_Co=256 directive. I am using Vim within Tmux, and on Panic's Prompt app on my iPhone5 I was having the behavior that 256 colors were not enabling when the. Now it may be the case that this is specific behavior that affects the Prompt app. I am testing the various different terminals that I tend to use to SSH into Linux boxes that I have Tmux set up on.īasically I noticed this behavior, and I am hoping that somebody could offer an explanation of what's going on.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |