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

93 lines
2.3 KiB
VimL
Raw Normal View History

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-05-17 05:10:11 +02:00
" Airline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
let g:airline_powerline_fonts = 1
let g:airline_solarized_bg='dark'
let g:airline_theme='solarized'
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'
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!',
\]
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
" 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
2020-05-17 04:45:59 +02:00
silent! colorscheme solarized
2018-03-14 15:30:44 +01:00
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
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')
2020-05-17 04:57:42 +02:00
silent! call remote_startserver('VIM')
2020-05-13 14:48:27 +02:00
endif