Fix issues with vanilla vim
When TERM is not xterm-256color (for example in st or tmux) t_8f and t_8b have to be set manually for colors to work. Add XDG_CONFIG_HOME/vim to packpath so that plugins work.
This commit is contained in:
@@ -58,8 +58,14 @@ set spell spelllang=en_us
|
||||
|
||||
" Aesthetics ###################################################################
|
||||
" Use 24-bit (true-color) mode
|
||||
if (has("termguicolors"))
|
||||
if (has('termguicolors'))
|
||||
set termguicolors
|
||||
" https://github.com/vim/vim/issues/993
|
||||
if (&term != 'xterm-256color')
|
||||
" set Vim-specific sequences for RGB colors
|
||||
let &t_8f = "\e[38;2;%lu;%lu;%lum"
|
||||
let &t_8b = "\e[48;2;%lu;%lu;%lum"
|
||||
endif
|
||||
endif
|
||||
" use onedark as theme for syntax highlighting
|
||||
syntax on
|
||||
|
||||
@@ -42,4 +42,6 @@ set runtimepath-=~/.vim
|
||||
set runtimepath^=$XDG_CONFIG_HOME/vim
|
||||
set runtimepath-=~/.vim/after
|
||||
set runtimepath+=$XDG_CONFIG_HOME/vim/after
|
||||
set packpath-=~/.vim
|
||||
set packpath^=$XDG_CONFIG_HOME/vim
|
||||
source $XDG_CONFIG_HOME/vim/vimrc
|
||||
|
||||
Reference in New Issue
Block a user