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

89 lines
2.1 KiB
VimL

" Require vim
set nocompatible
" Plugins
call plug#begin('~/.vim/plugged')
" Features
Plug 'MarcWeber/vim-addon-local-vimrc'
Plug 'majutsushi/tagbar'
nmap <F8> :TagbarToggle<CR>
Plug 'ludovicchabant/vim-gutentags'
let g:gutentags_cache_dir='~/.cache/gutentags'
Plug 'SirVer/ultisnips'
let g:UltiSnipsExpandTrigger = '<tab>'
let g:UltiSnipsJumpForwardTrigger = '<tab>'
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
Plug 'honza/vim-snippets'
" 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'
Plug 'posva/vim-vue', { 'for': 'vue' }
Plug 'sirtaj/vim-openscad', { 'for': 'openscad' }
Plug 'lervag/vimtex', { 'for': 'tex' }
let g:tex_flavor='latex'
let g:vimtex_view_method='zathura'
set conceallevel=1
let g:tex_conceal='abdmg'
command Vtc VimtexCompile
" 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
" Start clientserver (from vimtex.txt)
if empty(v:servername) && exists('*remote_startserver')
call remote_startserver('VIM')
endif