This repository has been archived on 2021-04-06. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/home/.vimrc
2020-04-22 22:42:14 +00:00

72 lines
1.5 KiB
VimL

" Require vim
set nocompatible
" Plugins
call plug#begin('~/.vim/plugged')
" Features
Plug 'MarcWeber/vim-addon-local-vimrc'
Plug 'majutsushi/tagbar'
" 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' }
Plug 'sirtaj/vim-openscad', { 'for': 'openscad' }
" Color schemes
Plug 'altercation/vim-colors-solarized'
call plug#end()
" Powerline
if !has('nvim')
silent! python3 from powerline.vim import setup as powerline_setup
silent! python3 powerline_setup()
silent! python3 del powerline_setup
set laststatus=2 " always show powerline
endif
" Basic display
set number
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
" Search
set hlsearch
set ignorecase
" Autoload settings from file
set modeline
" Highlight trailing spaces and spaces before tabs
highlight ExtraWhitespace ctermbg=red guibg=red
autocmd BufWinEnter * match ExtraWhitespace /\s\+$\| \+\ze\t/
" Tab settings
set autoindent
" Jump to the last position
if has("autocmd")
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
\| exe "normal! g`\"" | endif
endif
" Set gvim font
if has("gui_running")
set guifont=Terminess\ Powerline
endif
" Tagbar
nmap <F8> :TagbarToggle<CR>