Skip to content

Commit

Permalink
Assume screen-256color when in TMUX
Browse files Browse the repository at this point in the history
  • Loading branch information
nthapaliya committed Oct 10, 2016
1 parent a8ded01 commit 6c45c3f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion tmux/.tmux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ bind R source-file ~/.tmux.conf \; display-message "Config reloaded!"
# Use vim keybindings in copy mode
setw -g mode-keys vi

set -g default-terminal "xterm-256color"
# screen-256color works best for fzf
# we want tmux screen-256color inside tmux and xterm-256color when not in tmux
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"

# tmuxline stuff
Expand Down
13 changes: 8 additions & 5 deletions vim/.config/nvim/init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,20 @@ set scrolloff=8 " leave 8 lines on top and bottom
set shell=$SHELL " default shell set by environment
set smartcase " search case setting
set title " titlebar will be buffer filename
set t_ut= " https://sunaku.github.io/vim-256color-bce.html
set termguicolors " enable true-color
set ts=2 sts=2 sw=2 expandtab " tab-settings
set visualbell " don't beep

if $COMPATIBILITY
colorscheme default
else
colorscheme gruvbox
" for vim in tmux only
" :help xterm-true-color
" https://github.com/vim/vim/issues/993
if !has('nvim') && exists('$TMUX')
set t_8f=[38;2;%lu;%lu;%lum
set t_8b=[48;2;%lu;%lu;%lum
endif

colorscheme gruvbox

set grepprg=ag\ --vimgrep\ $*
set grepformat=%f:%l:%c:%m

Expand Down

0 comments on commit 6c45c3f

Please sign in to comment.