2019-12-26 19:59:01 +00:00
|
|
|
set runtimepath+=~/.config/vim,~/.config/vim/after
|
2021-02-13 22:44:03 +00:00
|
|
|
|
|
|
|
if has('nvim')
|
|
|
|
" Neovim specific commands
|
|
|
|
set viminfo+=n~/.cache/nviminfo
|
|
|
|
else
|
|
|
|
" Standard vim specific commands
|
|
|
|
set viminfo+=n~/.cache/viminfo
|
|
|
|
endif
|
2019-12-26 19:59:01 +00:00
|
|
|
|
2020-09-21 19:31:51 +00:00
|
|
|
" Plug plugins using VimPlug
|
|
|
|
call plug#begin('~/.config/vim/plugged')
|
2021-02-20 21:45:45 +00:00
|
|
|
" Tools
|
2020-09-21 19:31:51 +00:00
|
|
|
Plug 'editorconfig/editorconfig-vim'
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
|
|
|
Plug 'samoshkin/vim-mergetool'
|
|
|
|
Plug 'fidian/hexmode'
|
|
|
|
Plug 'scrooloose/nerdtree'
|
2021-02-20 21:45:45 +00:00
|
|
|
Plug 'vim-scripts/DoxygenToolkit.vim'
|
|
|
|
Plug 'drmikehenry/vim-headerguard'
|
|
|
|
|
|
|
|
" Eye-Candy
|
2021-02-27 02:03:19 +00:00
|
|
|
Plug 'machakann/vim-highlightedyank'
|
2020-09-21 19:31:51 +00:00
|
|
|
Plug 'itchyny/lightline.vim'
|
2021-03-30 20:53:39 +00:00
|
|
|
"Plug 'nanotech/jellybeans.vim'
|
|
|
|
Plug 'dracula/vim', { 'as': 'dracula' }
|
2020-09-21 19:31:51 +00:00
|
|
|
Plug 'scrooloose/syntastic'
|
2021-02-20 21:45:45 +00:00
|
|
|
Plug 'Yggdroot/indentLine'
|
|
|
|
|
|
|
|
" Commands
|
|
|
|
Plug 'machakann/vim-swap'
|
|
|
|
Plug 'matze/vim-move'
|
|
|
|
|
|
|
|
" Syntax highlighting
|
2020-12-23 15:39:36 +00:00
|
|
|
Plug 'sirtaj/vim-openscad'
|
2020-11-18 15:06:48 +00:00
|
|
|
Plug 'lervag/vimtex'
|
2021-02-20 21:45:45 +00:00
|
|
|
Plug 'sheerun/vim-polyglot'
|
2020-09-21 19:31:51 +00:00
|
|
|
call plug#end()
|
|
|
|
|
2021-02-20 21:45:45 +00:00
|
|
|
"let g:indentLine_setColors = 0
|
|
|
|
|
2020-09-26 22:37:09 +00:00
|
|
|
packadd termdebug
|
|
|
|
|
2019-12-20 13:06:42 +00:00
|
|
|
set number relativenumber
|
2020-09-26 22:37:09 +00:00
|
|
|
set splitbelow splitright
|
2019-12-20 13:06:42 +00:00
|
|
|
|
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
|
2020-09-26 22:37:09 +00:00
|
|
|
set laststatus=2
|
2020-02-14 12:10:01 +00:00
|
|
|
|
2019-12-20 13:06:42 +00:00
|
|
|
set encoding=utf-8
|
|
|
|
|
2021-02-20 21:45:45 +00:00
|
|
|
set mouse=a
|
|
|
|
|
|
|
|
set incsearch
|
|
|
|
set hlsearch
|
|
|
|
|
2019-12-20 13:06:42 +00:00
|
|
|
set nowrap
|
2021-02-20 21:45:45 +00:00
|
|
|
set nocompatible
|
2019-12-20 13:06:42 +00:00
|
|
|
|
2020-08-18 09:40:28 +00:00
|
|
|
set wildmode=longest,list,full
|
|
|
|
|
2020-09-26 22:37:09 +00:00
|
|
|
set fillchars+=vert:\
|
|
|
|
|
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
|
|
|
|
|
2020-11-18 15:06:48 +00:00
|
|
|
au BufNewFile,BufRead neomutt-* setf mail
|
|
|
|
|
|
|
|
au FileType yaml setlocal ai tabstop=2 shiftwidth=2 expandtab cuc nu
|
|
|
|
|
2020-02-13 19:41:20 +00:00
|
|
|
au FileType lilypond au BufWritePost * !lilypond %
|
2020-11-18 15:06:48 +00:00
|
|
|
au FileType dot au BufWritePost * !dot -Tpng -O %
|
2019-12-20 13:06:42 +00:00
|
|
|
endif
|
2019-12-26 19:59:01 +00:00
|
|
|
|
2020-09-26 22:37:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
map <leader>b :Break<CR>
|
2020-02-29 11:18:11 +00:00
|
|
|
map <leader>n :NERDTreeToggle<CR>
|
|
|
|
|
2021-02-20 21:45:45 +00:00
|
|
|
nnoremap <CR> :noh<CR><CR>
|
2020-09-26 22:37:09 +00:00
|
|
|
|
|
|
|
|
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
|
|
|
|
2020-01-20 22:31:41 +00:00
|
|
|
let g:lightline = {
|
|
|
|
\ 'active': {
|
|
|
|
\ 'left': [
|
|
|
|
\ [ 'mode', 'paste' ],
|
|
|
|
\ [ 'readonly', 'filename', 'modified', 'gitbranch' ]
|
|
|
|
\ ],
|
|
|
|
\ 'right': [
|
2020-09-26 22:37:09 +00:00
|
|
|
\ [ 'bufnum', 'percent', 'lineinfo' ],
|
2020-01-20 22:31:41 +00:00
|
|
|
\ [ 'fileformat', 'fileencoding', 'filetype', 'synthastic' ],
|
|
|
|
\ [ 'charvaluehex' ]
|
|
|
|
\ ]
|
|
|
|
\ },
|
2020-09-26 22:37:09 +00:00
|
|
|
\ 'inactive': {
|
|
|
|
\ 'left': [
|
|
|
|
\ [ 'filename' ]
|
|
|
|
\ ],
|
|
|
|
\ 'right': [
|
|
|
|
\ [ 'lineinfo' ],
|
|
|
|
\ [ 'bufnum' ]
|
|
|
|
\ ]
|
|
|
|
\ },
|
2020-01-20 22:31:41 +00:00
|
|
|
\ 'component': {
|
|
|
|
\ 'charvaluehex': '0x%B',
|
2020-09-26 22:37:09 +00:00
|
|
|
\ 'bufnum': '%n'
|
2020-01-20 22:31:41 +00:00
|
|
|
\ },
|
|
|
|
\ '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
|
|
|
\ }
|
2021-03-30 20:53:39 +00:00
|
|
|
colorscheme dracula
|
|
|
|
highlight Normal ctermbg=NONE
|
2020-01-20 22:31:41 +00:00
|
|
|
|
2021-02-27 02:03:19 +00:00
|
|
|
let g:highlightedyank_highlight_duration = 250
|
|
|
|
|
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'
|
2020-11-18 15:06:48 +00:00
|
|
|
|
|
|
|
let g:tex_flavor = 'latex'
|
|
|
|
let g:vimtex_compiler_latexmk = {
|
|
|
|
\ 'build_dir': 'latexmk_output'
|
|
|
|
\}
|
2021-02-13 22:44:03 +00:00
|
|
|
|
2021-02-20 21:45:45 +00:00
|
|
|
let g:move_key_modifier = 'C'
|
2021-02-13 22:44:03 +00:00
|
|
|
|
2021-02-20 21:45:45 +00:00
|
|
|
let g:indentLine_char_list = ['|', '¦', '┆', '┊']
|