2020-04-22 22:08:20 +02:00
|
|
|
" Require vim
|
2018-03-14 15:30:44 +01:00
|
|
|
set nocompatible
|
|
|
|
|
2020-04-22 22:02:54 +02:00
|
|
|
" Plugins
|
|
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
" Features
|
|
|
|
Plug 'MarcWeber/vim-addon-local-vimrc'
|
2020-04-23 00:42:14 +02:00
|
|
|
Plug 'majutsushi/tagbar'
|
2020-05-13 14:48:27 +02:00
|
|
|
nmap <F8> :TagbarToggle<CR>
|
2020-05-13 15:03:23 +02:00
|
|
|
Plug 'SirVer/ultisnips'
|
|
|
|
let g:UltiSnipsExpandTrigger = '<tab>'
|
|
|
|
let g:UltiSnipsJumpForwardTrigger = '<tab>'
|
|
|
|
let g:UltiSnipsJumpBackwardTrigger = '<s-tab>'
|
|
|
|
Plug 'honza/vim-snippets'
|
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' }
|
2020-05-07 22:56:00 +02:00
|
|
|
Plug 'mechatroner/rainbow_csv'
|
2020-04-22 22:02:54 +02:00
|
|
|
Plug 'posva/vim-vue', { 'for': 'vue' }
|
2020-04-22 23:15:00 +02:00
|
|
|
Plug 'sirtaj/vim-openscad', { 'for': 'openscad' }
|
2020-04-22 22:02:54 +02:00
|
|
|
|
2020-05-13 23:16:48 +02:00
|
|
|
Plug 'lervag/vimtex'
|
2020-05-13 14:48:27 +02:00
|
|
|
let g:tex_flavor='latex'
|
|
|
|
let g:vimtex_view_method='zathura'
|
|
|
|
set conceallevel=1
|
|
|
|
let g:tex_conceal='abdmg'
|
2020-05-13 23:16:48 +02:00
|
|
|
" this disables some helful warnings that often have a reason why I ignore them
|
|
|
|
let g:vimtex_quickfix_ignore_filters = [
|
|
|
|
\'Underfull \\hbox (badness [0-9]*) in paragraph at lines',
|
|
|
|
\'Overfull \\hbox ([0-9]*.[0-9]*pt too wide) in paragraph at lines',
|
|
|
|
\'Package hyperref Warning: Token not allowed in a PDF string',
|
|
|
|
\'Package typearea Warning: Bad type area settings!',
|
|
|
|
\]
|
2020-05-13 17:01:58 +02:00
|
|
|
command Vtc VimtexCompile
|
2020-05-13 14:48:27 +02:00
|
|
|
|
2020-04-22 22:02:54 +02:00
|
|
|
" Color schemes
|
|
|
|
Plug 'altercation/vim-colors-solarized'
|
|
|
|
call plug#end()
|
2018-03-14 15:30:44 +01:00
|
|
|
|
2020-04-22 22:08:20 +02:00
|
|
|
" Powerline
|
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
|
|
|
|
2020-04-22 22:08:20 +02:00
|
|
|
" Basic display
|
2018-03-14 15:30:44 +01:00
|
|
|
set number
|
|
|
|
set colorcolumn=80
|
|
|
|
|
2020-04-22 22:08:20 +02:00
|
|
|
" Solarized theme
|
2018-03-14 15:30:44 +01:00
|
|
|
set background=dark
|
|
|
|
colorscheme solarized
|
|
|
|
|
2020-04-22 22:08:20 +02:00
|
|
|
" Persistent undo
|
2018-03-14 15:30:44 +01:00
|
|
|
set undofile
|
|
|
|
set undodir=$HOME/.vim/undo
|
|
|
|
set undolevels=4096
|
|
|
|
set undoreload=16384
|
|
|
|
|
2020-04-22 22:08:20 +02:00
|
|
|
" Search
|
|
|
|
set hlsearch
|
|
|
|
set ignorecase
|
2018-03-14 15:30:44 +01:00
|
|
|
|
2020-04-22 22:08:20 +02:00
|
|
|
" Autoload settings from file
|
2018-03-14 15:30:44 +01:00
|
|
|
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
|
|
|
|
2020-04-22 22:08:20 +02:00
|
|
|
" Tab settings
|
|
|
|
set autoindent
|
2018-03-14 15:30:44 +01:00
|
|
|
|
2020-04-22 22:08:20 +02:00
|
|
|
" Jump to the last position
|
2019-10-14 19:40:52 +02:00
|
|
|
if has("autocmd")
|
|
|
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$")
|
|
|
|
\| exe "normal! g`\"" | endif
|
|
|
|
endif
|
|
|
|
|
2020-04-22 22:08:20 +02:00
|
|
|
" Set gvim font
|
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
|
2020-04-23 00:42:14 +02:00
|
|
|
|
2020-05-13 14:48:27 +02:00
|
|
|
" Start clientserver (from vimtex.txt)
|
|
|
|
if empty(v:servername) && exists('*remote_startserver')
|
|
|
|
call remote_startserver('VIM')
|
|
|
|
endif
|