2019-12-26 19:59:01 +00:00
|
|
|
set runtimepath+=~/.config/vim,~/.config/vim/after
|
|
|
|
set viminfo+=n~/.cache/viminfo
|
|
|
|
|
2019-12-20 13:06:42 +00:00
|
|
|
set number relativenumber
|
|
|
|
|
2020-02-29 11:18:11 +00:00
|
|
|
let mapleader = " "
|
|
|
|
|
2019-12-20 13:06:42 +00:00
|
|
|
augroup numbertoggle
|
|
|
|
autocmd!
|
|
|
|
autocmd WinEnter * set relativenumber
|
|
|
|
autocmd WinLeave * set norelativenumber
|
|
|
|
augroup END
|
|
|
|
|
|
|
|
syntax on
|
|
|
|
|
|
|
|
set tabstop=4
|
|
|
|
set shiftwidth=4
|
|
|
|
set expandtab
|
|
|
|
|
2020-02-14 12:10:01 +00:00
|
|
|
set modeline
|
|
|
|
|
2019-12-20 13:06:42 +00:00
|
|
|
set encoding=utf-8
|
|
|
|
|
|
|
|
set nowrap
|
|
|
|
|
2020-07-15 13:50:56 +00:00
|
|
|
autocmd FileType yaml setlocal ai ts=2 sw=2 et cuc nu
|
|
|
|
|
2020-02-22 14:45:08 +00:00
|
|
|
runtime ftplugin/man.vim
|
|
|
|
set keywordprg=:Man
|
|
|
|
|
2019-12-20 13:06:42 +00:00
|
|
|
if has("autocmd")
|
2020-02-13 19:41:20 +00:00
|
|
|
" Save cursor position. I don't understand this part
|
|
|
|
au BufReadPost * if line("'\"") > 0 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
|
|
|
|
|
|
|
|
au FileType lilypond au BufWritePost * !lilypond %
|
2019-12-20 13:06:42 +00:00
|
|
|
endif
|
2019-12-26 19:59:01 +00:00
|
|
|
|
2020-02-13 19:41:20 +00:00
|
|
|
|
2020-01-07 11:02:43 +00:00
|
|
|
" Plug plugins using VimPlug
|
2019-12-26 19:59:01 +00:00
|
|
|
call plug#begin('~/.config/vim/plugged')
|
2019-12-27 00:22:42 +00:00
|
|
|
Plug 'editorconfig/editorconfig-vim'
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
2020-06-26 16:21:39 +00:00
|
|
|
Plug 'samoshkin/vim-mergetool'
|
2020-01-07 11:02:43 +00:00
|
|
|
Plug 'fidian/hexmode'
|
|
|
|
Plug 'scrooloose/nerdtree'
|
2020-01-07 20:36:48 +00:00
|
|
|
Plug 'itchyny/lightline.vim'
|
|
|
|
Plug 'nanotech/jellybeans.vim'
|
2020-01-20 22:31:41 +00:00
|
|
|
Plug 'scrooloose/syntastic'
|
2020-02-07 16:32:59 +00:00
|
|
|
Plug 'sersorrel/vim-lilypond'
|
2020-02-10 14:47:48 +00:00
|
|
|
Plug 'vim-scripts/DoxygenToolkit.vim'
|
|
|
|
Plug 'drmikehenry/vim-headerguard'
|
2020-07-15 13:50:56 +00:00
|
|
|
Plug 'cespare/vim-toml'
|
2019-12-26 19:59:01 +00:00
|
|
|
call plug#end()
|
2020-01-07 11:02:43 +00:00
|
|
|
|
2020-02-29 11:18:11 +00:00
|
|
|
map <leader>m :Magit<CR>
|
|
|
|
map <leader>n :NERDTreeToggle<CR>
|
|
|
|
|
2020-01-07 11:02:43 +00:00
|
|
|
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
2020-01-07 20:36:48 +00:00
|
|
|
|
|
|
|
set laststatus=2
|
2020-01-20 22:31:41 +00:00
|
|
|
let g:lightline = {
|
|
|
|
\ 'active': {
|
|
|
|
\ 'left': [
|
|
|
|
\ [ 'mode', 'paste' ],
|
|
|
|
\ [ 'readonly', 'filename', 'modified', 'gitbranch' ]
|
|
|
|
\ ],
|
|
|
|
\ 'right': [
|
|
|
|
\ [ 'percent', 'lineinfo' ],
|
|
|
|
\ [ 'fileformat', 'fileencoding', 'filetype', 'synthastic' ],
|
|
|
|
\ [ 'charvaluehex' ]
|
|
|
|
\ ]
|
|
|
|
\ },
|
|
|
|
\ 'component': {
|
|
|
|
\ 'charvaluehex': '0x%B',
|
|
|
|
\ },
|
|
|
|
\ 'component_function': {
|
|
|
|
\ 'synthastic': 'SyntasticStatuslineFlag',
|
|
|
|
\ 'gitbranch': 'fugitive#head'
|
|
|
|
\ },
|
|
|
|
\ }
|
2020-01-07 20:36:48 +00:00
|
|
|
|
|
|
|
if has('termguicolors') && &termguicolors
|
|
|
|
let g:jellybeans_overrides['background']['guibg'] = 'none'
|
|
|
|
endif
|
|
|
|
let g:jellybeans_overrides = {
|
|
|
|
\ 'Todo': {
|
|
|
|
\ 'guifg': '303030',
|
|
|
|
\ 'guibg': 'f0f000',
|
|
|
|
\ 'ctermfg': 'Black',
|
|
|
|
\ 'ctermbg': 'Yellow',
|
|
|
|
\ 'attr': 'bold'
|
|
|
|
\ },
|
|
|
|
\ 'Comment': { 'guifg': 'cccccc' },
|
|
|
|
\ 'LineNr': { 'guifg': 'aaaaaa' },
|
|
|
|
\ 'background': {
|
|
|
|
\ 'ctermbg': 'none',
|
|
|
|
\ '256ctermbg': 'none'
|
|
|
|
\ },
|
2020-01-20 22:31:41 +00:00
|
|
|
\ }
|
2020-01-07 20:36:48 +00:00
|
|
|
colorscheme jellybeans
|
2020-01-20 22:31:41 +00:00
|
|
|
|
|
|
|
let g:syntastic_always_populate_loc_list = 0
|
|
|
|
let g:syntastic_auto_loc_list = 0
|
|
|
|
let g:syntastic_check_on_open = 1
|
|
|
|
let g:syntastic_check_on_wq = 0
|
2020-06-26 16:21:39 +00:00
|
|
|
let g:syntastic_oclint_config_file = '.syntastic_oclint_config'
|
|
|
|
let g:syntastic_c_config_file = '.syntastic_cc_config'
|