Comments (7)
tmux's statusline colors are messed up because for some reason vim's statusline colors are messed up. The question is: why are vim's statusline colors messy?
A wild guess: your $TERM
is not recognized by vim, because you start vim in the first pane with vim
(which starts your brew-installed vim), but in the second pane you start vim with vi
which starts OSX's pre-installed out-dated vim (which doesn't understand tmux's $TERM
).
Could you try to reproduce vim's pinkish color outside of tmux?
Also, could you try removing the :silent!
from this line https://github.com/Integralist/Fresh-Install/blob/master/Shell/vim/vundle.vim#L20 and then try to reproduce. Hopefully this would give some error message
from tmuxline.vim.
@edkolev when I run :!which vim
from within Vim (and inside Vim inside tmux) I can see /usr/bin/vim
(system Vim) but doing which vim
from outside Vim I see /usr/local/bin/vim
which is what I expected/want.
I've just done cd /usr/bin/ && sudo mv vim vim-7.3
and now when I run :!which vim
from inside either Vim or Vim inside tmux it correctly shows /usr/local/bin/vim
but I still get that ugly pink theme.
That's after I removed the :silent!
flag from my vim script (so looks like that doesn't produce any helpful errors)
from tmuxline.vim.
The pink theme is probably airline's tomorrow theme. Could you confirm this by running :AirlineTheme
? (this will tell you which airline theme is active)
I suspect vim's colorscheme is incorrect (for some reason), hance airline's theme is incorrect (airline's tomorrow theme extracts its colors from vim's colorscheme), hence tmux's theme is incorrect (tmuxline extracts its colors from airline).
Is this reproducible if you start vim with its full path /usr/local/bin/vim
?
from tmuxline.vim.
When I run the vim
command outside of tmux and then :AirlineTheme
I get tomorrow
displayed.
That's the same when I run Vim from within tmux as well.
If I run Vim using the full path I get the exact same thing.
from tmuxline.vim.
So for some reason vim's colorscheme is incorrect. You can try different vim colorschemes, and different terminal emulators (iTerm2, Terminal.app), and maybe different multiplexers (tmux, screen) to pinpoint what's causing this misbehaviour.
Alternatively, you can create a .conf file for tmux and disable airline-tmuxline extension:
- start vim in tmux, make sure your colors are correct
- run
:TmuxlineSnapshot ~/.tmuxline.conf
to create a snapshot of the current tmux statusline colors - set in tmux.conf
source-file ~/.tmuxline.conf
- set in your vimrc
let g:airline#extensions#tmuxline#enabled = 0
so vim doesn't set tmux's colors on startup
from tmuxline.vim.
One additional piece of information has come to light...
Running echo $TERM
inside of tmux results in screen
where as when run within Vim outside of tmux it results in xterm-256color
from tmuxline.vim.
Setting set -g default-terminal "screen-256color"
within my tmux.conf did the trick
from tmuxline.vim.
Related Issues (20)
- tmux 1.9 compatibility
- tmux 2.9-1 issues HOT 3
- Wrong message-fg value for solarized_dark (lightline.vim theme) HOT 1
- Windows Flickering Window Problem
- Alternative way to detect for tmux?
- Transparent statusbar
- How to move tabs to the left HOT 2
- does it work with tmux-prefix-highlight ? HOT 1
- Incorrect parse of italic attribute from vim-airline palette
- eleline support
- Starting nvim resets the snapshot configuration HOT 1
- Automatically load `lightline' HOT 1
- `status-justify "left"` reverts back to `center` till vim is opened HOT 1
- tmuxline not following g:airline_left_sep / g:airline_right_sep
- support displaying coc status
- win / cwin seperators not working propperly
- Applying tmuxline theme when creating a tmux session from console ? HOT 2
- Allow appending to default statusline
- Custom status variables not working when status bar generated by running vim HOT 2
- [Question] Promptline segments
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tmuxline.vim.