" " 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 " makefiles au FileType make setlocal nolist " 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 mono let g:airline_theme='mono' 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_skip_empty_sections = 1 " " local additions " if filereadable($HOME."/.vimrc-local") source ~/.vimrc-local endif