Solarized theme for vim on raspberry pi
-
20-12-2019 - |
Question
I have raspberry and I installed clear raspian. First of all I installed on it vim and configured solarized theme. My .vimrc:
syntax on
set smartindent
let g:solarized_termcolors=256
set t_Co=256
colorscheme solarized
set background=dark
set shiftwidth=4
set tabstop=4
set showcmd
set number
au BufWinLeave * mkview
au VimEnter * loadview
nmap <esc><esc> :q<cr>
nmap <F2> :w<cr>
When I connect with putty and run vim it's all okay like in screenshots. But when I run vim directly on raspberry all text is blue. Maybe I need to configure terminal colors? But I didn't find how to do it on raspberry.
Solution
I solved my problem by using external terminal fbterm
.
Minimal configuration for solarized theme in vimrc:
let g:solarized_termcolors=256
set t_Co=256
colorscheme solarized
And installing fbterm
sudo apt-get install fbterm
export TERM=fbterm
Starting fbterm from default terminal:
fbterm
Checking how many colors are in your current terminal
tput colors
For solarized theme needed 256 colors.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow