diff --git a/README.md b/README.md index df6ee21..347c71b 100644 --- a/README.md +++ b/README.md @@ -35,26 +35,25 @@ Conversion from original colors to 256 colors has done according to ## Usage 1. Check your terminal. - - If your terminal emulator supports 24-bit color, add the following lines - to your `.vimrc`. + - If your terminal emulator [supports true colors](https://gist.github.com/XVilka/8346728), + add the following lines to your `.vimrc`. ``` vim " Use 24-bit (true-color) mode in Vim/Neovim when outside tmux or screen. " If you're using tmux version 2.2 or later, you can remove the outermost $TMUX " check and use tmux's 24-bit color support - " ( for more information.) + " (http://sunaku.github.io/tmux-24bit-color.html#usage for more information.) if empty($TMUX) && empty($STY) - if has('nvim') - " For Neovim 0.1.3 and 0.1.4 - let $NVIM_TUI_ENABLE_TRUE_COLOR = 1 - endif - " For Neovim > 0.1.5 and Vim > patch 7.4.1799 - " - " Based on Vim patch 7.4.1770 (`guicolors` option) - " - " - if has('termguicolors') - set termguicolors + " See https://gist.github.com/XVilka/8346728. + if $COLORTERM =~# 'truecolor' || $COLORTERM =~# '24bit' + if has('termguicolors') + " See :help xterm-true-color + if $TERM =~# '^screen' + let &t_8f = "\[38;2;%lu;%lu;%lum" + let &t_8b = "\[48;2;%lu;%lu;%lum" + endif + set termguicolors + endif endif endif ```