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

72 lines
1.5 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'
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' }
2020-04-22 23:15:00 +02:00
Plug 'sirtaj/vim-openscad', { 'for': 'openscad' }
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')
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
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
" Tagbar
nmap <F8> :TagbarToggle<CR>