" " vim-plug " call plug#begin('~/.vim/plugged') Plug 'tpope/vim-sensible' Plug 'justinmk/vim-dirvish' Plug 'vim-scripts/bufexplorer.zip' Plug 'ctrlpvim/ctrlp.vim' Plug 'airblade/vim-gitgutter' Plug 'vim-airline/vim-airline' Plug 'tpope/vim-eunuch' Plug 'dense-analysis/ale' Plug 'https://gitlab.com/protesilaos/tempus-themes-vim.git' call plug#end() " " behavior " set nocompatible " use vim, not vi settings set wildignore=*.pyc,.git " ignore from autocomplete set showcmd " display incomplete commands set ignorecase " ignore case in search set smartcase " respect case in search if uppercase is used set nowrap " do not wrap lines set vb t_vb= " no beeping " " formatting " set tabstop=2 set softtabstop=2 set shiftwidth=2 set expandtab set shiftround set listchars=tab:»·,trail:· set list " " filetype-specific " if has("autocmd") au! " plain text au FileType text setlocal tw=80 au FileType markdown setlocal tw=80 " python au FileType python setlocal ts=4 sw=4 sts=4 " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid or when inside an event handler au BufReadPost * \ if line("'\"") > 0 && line("'\"") <= line("$") | \ exe "normal g`\"" | \ endif endif " " bindings " let mapleader = "," " convenience nnoremap x :source ~/.vimrc nnoremap nnoremap j nnoremap k nnoremap h nnoremap l " dirvish nnoremap e :Dirvish " bufexplore nnoremap fe :BufExplorer nnoremap fs :BufExplorerHorizontalSplit nnoremap fv :BufExplorerVerticalSplit " ctrlp let g:ctrlp_map ='a' " ale nnoremap r :ALEDetail let g:ale_linters_ignore = {'python': ['mypy']} " mypy is too slow and doesn't support dmypy " " visual " set background=light silent! colo tempus_totus let g:airline_theme='tempus' set hlsearch syntax enable " don't mess up gutter highlight with gitgutter highlight clear SignColumn hi! link SignColumn Background " Highlight non-ascii characters as the theme highlights errors hi clear nonascii hi link nonascii Error if has("autocmd") au BufReadPost * syntax match nonascii /[^\d0-\d127]/ endif " highlight trailing space and tab as the theme highlights errors hi clear SpecialKey hi link SpecialKey Error let g:airline_powerline_fonts = 1 let g:airline_left_sep="" let g:airline_right_sep = "" let g:airline_skip_empty_sections = 1 " " local additions " if filereadable($HOME."/.vimrc-local") source ~/.vimrc-local endif