首先安装vim以及python-jedi补全
# apt install vim vim-python-jedi
启用jedi:
$ vim-addons install python-jedi
接下来贴vimrc:
set tabstop=4
set softtabstop=4
set shiftwidth=4
set textwidth=79
set expandtab
set autoindent
set fileformat=unix
set encoding=utf-8
set background=dark
"高亮
hi pythonSelf ctermfg=174 guifg=#6094DB cterm=bold gui=bold
let python_highlight_all=1
syntax enable
"行号
set number
"主题设置
colorscheme gruvbox
set cuc
set cul
set ignorecase
set hlsearch
" f5运行
map<F5> :!time python3 % <CR>
set showcmd
"自动缩进
set autoindent
set cindent
filetype indent on
接下来安装gruvbox主题:
$ cd .vim
$ git clone https://github.com/morhetz/gruvbox
$ cp -r gruvbox/* ./
$ bash gruvbox_256palette.sh
安装完毕
效果图: