set noswapfile " NERDTree ################################################################# let NERDTreeMouseMode=3 let NERDTreeMinimalUI=1 let NERDTreeAutoDeleteBuffer=1 let NERDTreeHighlightCursorline=1 let NERDTreeShowHidden=1 let g:NERDTreeIndicatorMapCustom = { \ "Modified" : "Δ", \ "Staged" : "✚", \ "Untracked" : "✭", \ "Renamed" : "➜", \ "Unmerged" : "☢", \ "Deleted" : "-", \ "Dirty" : "Δ", \ "Clean" : "", \ "Unknown" : "" \ } map :NERDTreeToggle " always enter term buffer in insert mode autocmd BufEnter * if &buftype == 'terminal' | :startinsert | endif " rust.vim ################################################################### let g:rustfmt_autosave = 1 " Caddyfile #################################################################### au BufNewFile,BufRead Caddyfile,*.Caddyfile,Caddyfile.* set ft=caddyfile " mine ##################################################################### "Makes current line/column highlighted, and set text width set tw=80 set colorcolumn=+1 hi ColorColumn ctermfg=none ctermbg=grey cterm=none "Buffers scroll a bit so cursor doens't go all the way to the bottom before "scroll begins set scrolloff=3 "Makes all .swp files go to /tmp instead of . CAUSE FUCK DA POLICE set backupdir=/tmp set directory=/tmp "Better indenting set autoindent set expandtab set tabstop=4 set shiftwidth=4 "Show eol and tabs set list set listchars=trail:░,tab:►\ ,extends:>,precedes:< "Don't highlight search matches, don't jump while mid-search set noincsearch set nohlsearch "We want certain types to only have 2 space for tabs au FileType clojure setlocal tabstop=2 shiftwidth=2 au FileType ruby setlocal tabstop=2 shiftwidth=2 au FileType yaml setlocal tabstop=2 shiftwidth=2 au FileType html setlocal tabstop=2 shiftwidth=2 au FileType proto setlocal tabstop=2 shiftwidth=2 au FileType javascript setlocal tabstop=2 shiftwidth=2 au FileType typescript setlocal tabstop=2 shiftwidth=2 "We want certain types to use tabs instead of spaces au FileType go setlocal nolist noexpandtab au FileType make setlocal nolist noexpandtab au FileType caddyfile setlocal nolist noexpandtab "Gemtext gets its own text wrapping behavior "https://stackoverflow.com/questions/36950231/auto-wrap-lines-in-vim-without-inserting-newlines au FileType gemtext setlocal number au FileType gemtext setlocal tw=0 au FileType gemtext setlocal wrapmargin=0 au FileType gemtext setlocal wrap au FileType gemtext setlocal linebreak "au FileType gemtext setlocal columns=80 "https://stackoverflow.com/questions/20975928/moving-the-cursor-through-long-soft-wrapped-lines-in-vim au FileType gemtext nnoremap j v:count ? 'j' : 'gj' au FileType gemtext nnoremap k v:count ? 'k' : 'gk' "terminal shortcuts tnoremap \ tnoremap "tab shortcuts for terminal mode have terminal escape code preceding them tnoremap tn :tabe term://zsh tnoremap tN :tabe tnoremap ts :vs term://zsh tnoremap tS :vnew tnoremap ti :sp term://zsh tnoremap tI :new tnoremap th gT tnoremap tH :-tabmove tnoremap tl gt tnoremap tL :+tabmove tnoremap tx :tabclose "tab shortcuts noremap tn :tabe term://zsh noremap tN :tabe noremap ts :vs term://zsh noremap tS :vnew noremap ti :sp term://zsh noremap tI :new noremap th gT noremap tH :-tabmove noremap tl gt noremap tL :+tabmove noremap tx :tabclose " yank/paste into/from clipboard set clipboard+=unnamedplus " Enable mouse in all modes set mouse= "Clojure specific mappings " Eval outerform au FileType clojure nmap cpP :Eval " Eval full page au FileType clojure nmap cpR :%Eval " Disable Ex mode! nnoremap Q