2018-03-14 15:30:44 +01:00
|
|
|
" require vim
|
|
|
|
set nocompatible
|
|
|
|
|
2020-04-22 22:02:54 +02:00
|
|
|
" Plugins
|
|
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
" Features
|
|
|
|
Plug 'MarcWeber/vim-addon-local-vimrc'
|
2018-06-19 20:46:24 +02:00
|
|
|
|
2020-04-22 22:02:54 +02:00
|
|
|
" Syntax highlighting/Language support
|
|
|
|
Plug 'ElmCast/elm-vim', { 'for': 'elm' }
|
|
|
|
Plug 'Glench/Vim-Jinja2-Syntax', { 'for': 'jinja' }
|
|
|
|
Plug 'cespare/vim-toml', { 'for': 'toml' }
|
|
|
|
Plug 'fatih/vim-go', { 'for': 'go', 'do': ':GoUpdateBinaries' }
|
|
|
|
Plug 'mechatroner/rainbow_csv', { 'for': ['csv', 'tsv'] }
|
|
|
|
Plug 'posva/vim-vue', { 'for': 'vue' }
|
|
|
|
|
|
|
|
" Color schemes
|
|
|
|
Plug 'altercation/vim-colors-solarized'
|
|
|
|
call plug#end()
|
2018-03-14 15:30:44 +01:00
|
|
|
|
2018-05-05 14:52:52 +02:00
|
|
|
" statusline
|
2019-06-09 00:23:36 +02:00
|
|
|
if !has('nvim')
|
2020-04-02 22:22:40 +02:00
|
|
|
silent! python3 from powerline.vim import setup as powerline_setup
|
|
|
|
silent! python3 powerline_setup()
|
|
|
|
silent! python3 del powerline_setup
|
2019-06-09 00:23:36 +02:00
|
|
|
set laststatus=2 " always show powerline
|
|
|
|
endif
|
2018-05-05 14:52:52 +02:00
|
|
|
|
2018-03-14 15:30:44 +01:00
|
|
|
" line numbers
|
|
|
|
set number
|
|
|
|
" show line after 80 chars
|
|
|
|
set colorcolumn=80
|
|
|
|
|
|
|
|
" solarized theme
|
|
|
|
set background=dark
|
|
|
|
colorscheme solarized
|
|
|
|
|
|
|
|
" persistent undo
|
|
|
|
set undofile
|
|
|
|
set undodir=$HOME/.vim/undo
|
|
|
|
set undolevels=4096
|
|
|
|
set undoreload=16384
|
|
|
|
|
|
|
|
" highlight and ignore case at search
|
|
|
|
set hls ic
|
|
|
|
|
|
|
|
" Autoload settings from file bottom
|
|
|
|
set modeline
|
|
|
|
|
|
|
|
" Highlight trailing spaces and spaces before tabs
|
|
|
|
highlight ExtraWhitespace ctermbg=red guibg=red
|
2018-03-16 19:21:49 +01:00
|
|
|
autocmd BufWinEnter * match ExtraWhitespace /\s\+$\| \+\ze\t/
|
2018-03-14 15:30:44 +01:00
|
|
|
|
|
|
|
" tab settings
|
|
|
|
set ai
|
|
|
|
|
2019-10-14 19:40:52 +02:00
|
|
|
" jump to the last position
|
|
|
|
if has("autocmd")
|
|
|
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
|
|
|
|
\| exe "normal! g`\"" | endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
2018-03-14 15:30:44 +01:00
|
|
|
if has("gui_running")
|
2018-05-06 12:04:48 +02:00
|
|
|
set guifont=Terminess\ Powerline
|
2018-03-14 15:30:44 +01:00
|
|
|
endif
|