rakr / vim-one

Adaptation of one-light and one-dark colorschemes for Vim
MIT License
1.98k stars 196 forks source link

Setting TERM as xterm-256color is totally wrong #91

Closed laggardkernel closed 5 years ago

laggardkernel commented 5 years ago

It's totally wrong to set $TERM, default-terminal as xterm-256color. This causes scrolling problem with iTerm + Tmux + VIM, which cost me lots of time to find the solution. Please remove the advice from README.

Just quote what is written in Tmux's FAQ:

PLEASE NOTE: most display problems are due to incorrect TERM! Before reporting problems make SURE that TERM settings are correct inside and outside tmux.

Inside tmux TERM must be "screen", "tmux" or similar (such as "tmux-256color"). Don't bother reporting problems where it isn't!

Outside, it should match your terminal: particularly, use "rxvt" for rxvt and derivatives.

The correct way to enable true color of tmux:

set -g default-terminal "screen-256color"
# or
# set -g default-terminal "tmux-256color"
# the setting below enables true color support of tmux
set -ga terminal-overrides ",*256col*:Tc"

Besides, additional settings should be used to enable true color support in VIM just as README says.

laggardkernel commented 5 years ago

Sorry, it seems the bumpy scrolling still exists when open files in split windows within VIM. Besides, setting default-terminal as non-xterm cause inconsistent keybindings inside tmux.