" ########## General ########## {{{ syntax on colorscheme elflord let g:airline_theme='atomic' set encoding=utf-8 set fileencoding=utf-8 set wildmenu set autoindent set smartindent set incsearch set hlsearch set smarttab set ignorecase set smartcase set mouse= set number relativenumber set so=7 set tabstop=4 shiftwidth=4 set expandtab let mapleader = "," let maplocalleader = "\\" " }}} " ########## Highlighting ########## {{{ highlight ExtraWhitespace ctermbg=red guibg=red match ExtraWhitespace /\s\+$/ augroup trailingwhitespace autocmd! autocmd Syntax * syn match ExtraWhitespace /\s\+$\| \+\ze\t/ augroup END " Tabs set list set listchars=tab:\|\ , " }}} " ########## Keybinds ########## {{{ nnoremap ev :vsplit $MYVIMRC nnoremap sv :source $MYVIMRC nnoremap f :FZF nnoremap gs :Gstatus nnoremap gc :Gcommit nnoremap gr :Git rebase -i noremap c :w! \| !compiler % noremap o :!open % noremap p :!opout % nnoremap u :!ctags -R . " Local (scope) replace nnoremap gr gd[{V%::s////gc " Global replace nnoremap gR gD:%s////gc " Cscope keybinds map g :cs find 3 =expand("") map g :cs find 0 =expand("") nnoremap Y y$ nnoremap H ^ nnoremap L $ vnoremap H ^ vnoremap L $ inoremap jk inoremap inoremap inoremap inoremap inoremap " Dragvisuals keybinds vmap DVB_Drag('left') vmap DVB_Drag('right') vmap DVB_Drag('down') vmap DVB_Drag('up') vmap D DVB_Duplicate() " Remove any introduced trailing whitespace after moving... let g:DVB_TrimWS = 1 " }}} " ########## Abbreviations ########## {{{ iabbrev @@ frans@tankernn.eu iabbrev ssig -- Frans Bergmanfrans@tankernn.eu " }}} " ########## File-specific settings ########## {{{ autocmd FileType gitcommit,groff :set spell autocmd FileType vim :set foldmethod=marker autocmd BufNewFile,BufRead *.ms,*.me,*.mom,*.man set filetype=groff " }}} " ########## Plugin Settings ########## {{{ let g:ale_linters = {'rust': ['analyzer']} set omnifunc=ale#completion#OmniFunc let g:ale_completion_enabled = 1 let g:ale_completion_autoimport = 1 let g:ale_fix_on_save = 1 let g:ale_fixers = { \ '*': ['remove_trailing_lines', 'trim_whitespace'], \ 'rust': ['rustfmt'], \} nmap an (ale_next) nmap ap (ale_previous) augroup rust autocmd! autocmd FileType rust let b:delimitMate_smart_quotes='\%(\w\|[^[:punct:][:space:]]\|\%(\\\\\)*\\\)\%#\|\%#\%(\w\|[^[:space:][:punct:]]\)\|\<\%#\|\&\%#' augroup END " Use `tab` key to select completions. Default is arrow keys. inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" " }}} " ########## Plugins ########## {{{ call plug#begin() Plug 'tpope/vim-fugitive' Plug 'bling/vim-airline' Plug 'vim-airline/vim-airline-themes' Plug 'mkitt/tabline.vim' Plug 'tpope/vim-surround' Plug 'tpope/vim-repeat' Plug 'raimondi/delimitmate' Plug 'fisadev/dragvisuals.vim' Plug 'dense-analysis/ale' Plug 'junegunn/fzf' Plug 'preservim/nerdtree' Plug 'vim-scripts/taglist.vim' Plug 'ashinkarov/nvim-agda' Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } call plug#end() " }}}