diff options
author | Matt Singleton <matt@xcolour.net> | 2024-04-11 16:21:15 -0500 |
---|---|---|
committer | Matt Singleton <matt@xcolour.net> | 2024-04-11 16:21:15 -0500 |
commit | f2dfde23f8157da1532a2b2e236af529fed47713 (patch) | |
tree | d5eabb0eb33d100304ee16596b2a43dfb4a68d1c /stow/vim/.vimrc | |
parent | 7f67d28e18760154778f20da43772838c36734ed (diff) |
replace janky deploy script with stow and make
re-orgs all the console oriented dotfiles to be stowable
makefile to deploy everything
move from vimplug to native vim packages
cleanup script for blowing away old symlinks
Diffstat (limited to 'stow/vim/.vimrc')
-rw-r--r-- | stow/vim/.vimrc | 115 |
1 files changed, 115 insertions, 0 deletions
diff --git a/stow/vim/.vimrc b/stow/vim/.vimrc new file mode 100644 index 0000000..483adc6 --- /dev/null +++ b/stow/vim/.vimrc @@ -0,0 +1,115 @@ +" +" 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 <leader>x :source ~/.vimrc<Enter> +nnoremap <leader><leader> <c-^> +nnoremap <c-j> <c-w>j +nnoremap <c-k> <c-w>k +nnoremap <c-h> <c-w>h +nnoremap <c-l> <c-w>l + +" dirvish +nnoremap <leader>e :Dirvish<Enter> + +" bufexplore +nnoremap <leader>fe :BufExplorer<Enter> +nnoremap <leader>fs :BufExplorerHorizontalSplit<Enter> +nnoremap <leader>fv :BufExplorerVerticalSplit<Enter> + +" ctrlp +let g:ctrlp_map ='<leader>a' + +" ale +nnoremap <leader>r :ALEDetail<Enter> +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 |