small pixel drawing of a pufferfish dotfiles

.vimrc

syntax on
colors patine

" weird defaults
set tabstop=4
set shiftwidth=4
set scrolloff=10
set hlsearch
set smartcase
set timeoutlen=1000 ttimeoutlen=0 " esc is immediate
set t_Co=256 " it's 2019 ffs
set backspace=indent,eol,start
set wildmode=longest,list,full
map <F1> <Esc>
imap <F1> <Esc>

" Protect changes between writes. Default values of
" updatecount (200 keystrokes) and updatetime
" (4 seconds) are fine
set swapfile
set directory^=~/.vim/swap//

" protect against crash-during-write
set writebackup
" but do not persist backup after successful write
set nobackup
" use rename-and-write-new method whenever safe
set backupcopy=auto
" patch required to honor double slash at end
if has("patch-8.1.0251")
	" consolidate the writebackups -- not a big
	" deal either way, since they usually get deleted
	set backupdir^=~/.vim/backup//
end

" persist the undo tree for each file
set undofile
set undodir^=~/.vim/undo//

" quickfix shortcuts
nmap ]q :cnext<cr>
nmap ]Q :clast<cr>
nmap [q :cprev<cr>
nmap [Q :cfirst<cr>

" shortcutz
nnoremap <CR> :nohlsearch<CR><CR> " enter clears hl
map <silent> <F4> :make<cr><cr><cr> " make all the things
set pastetoggle=<C-p> " control+p to toggle pasting

" mail
autocmd FileType mail setlocal tw=72 spell spelllang=en

" ruby
autocmd FileType ruby setlocal shiftwidth=2 softtabstop=2 expandtab