diff --git a/.vimrc b/.vimrc index 54a5533..83a59fd 100644 --- a/.vimrc +++ b/.vimrc @@ -1,34 +1,28 @@ execute pathogen#infect() -set ruler +set autochdir set autoindent -set tabstop=2 -set shiftwidth=2 set expandtab -syntax enable -set number set hlsearch set incsearch -set autochdir +set number +set ruler +set shiftwidth=2 +set tabstop=2 set textwidth=79 +set cursorline +syntax enable -"set guifont=SimplexMono\ Light\ Condensed\ 10 -set guifont=Terminus filetype plugin on filetype indent on -highlight Folded term=standout ctermfg=5 ctermbg=0 - let mapleader=" " -autocmd BufRead *.java set makeprg=ant -autocmd BufRead *.java set efm=%A\ %#[javac]\ %f:%l:\ %m,%-Z\ %#[javac]\ %p^,%-C%.%# - -"source ~/.vim/.jdb_java.vim - -autocmd BufRead /tmp/psql.edit.* set syntax=sql autocmd BufRead,BufNewFile *.md setlocal filetype=markdown -autocmd BufEnter *.* silent loadview -autocmd BufLeave *.* mkview! + +" Set/load the view when switching buffers. Used to use to preserve folding. +" Stopped because weirder things were happening. +"autocmd BufEnter *.* silent loadview +"autocmd BufLeave *.* mkview! autocmd BufRead *.java set foldnestmax=2 autocmd BufRead *.java set foldmethod=syntax @@ -47,21 +41,21 @@ vnoremap # : \escape(@", '?\.*$^~['), '\_s\+', '\\_s\\+', 'g') \gV:call setreg('"', old_reg, old_regtype) -"Highlight lines past 80 characters long -"highlight OverLength ctermbg=red ctermfg=white guibg=#592929 -"match OverLength /\%80v.\+/ -"autocmd BufAdd .* match OverLength /\%80v.\+/ - let g:solarized_contrast="high" let g:ctrlp_max_files = 0 let g:ctrlp_custom_ignore = { - \ 'dir': '\v\.git$|\.hg$|\.svn$|build$|target$|node_modules$|nimcache$', + \ 'dir': '\v\.git$|\.hg$|\.svn$|\.worktrees$|build$|target$|node_modules$|nimcache$|dist$', \ 'file': '\v\.(class|exe|so|dll|sw.)$' \ } +let g:ale_linters = { + \ 'html': ['HTMLHint', 'proselint', 'write-good'] + \ } let groovy_space_errors = 1 let groovy_allow_cpp_keywords = 1 +cmap w!! w !sudo tee > /dev/null % + " Generate Java Getter and Setter for one property. " Expects property lines to match /private \w\+ \w\+/ " Requires mark A to be set at the current property line start and mark B to @@ -84,8 +78,25 @@ nmap ws :w:silent !git add %:!git commit nmap b :CtrlPBuffer -" Format Bible quotes in Markdown (bold verse numbers) -vmap qb :s/\v\s+(\d+)\s+/ **\1** /g - " remove trailing whitespace from all lines nmap ss :%s/\s\+$// + +" Execute the current line (stripping leading `$`s) +nmap r :.w !sed s/^\\s*\\$\\s*//\|bash + +" Execute the current line (stripping leading `$`s) and paste the output into +" the buffer underneath. +nmap R yyp!!sed s/^\\s*\\$\\s*//\|bash + +vmap qb :s/\v\s+(\d+)\s+/ **\1** /g + +highlight Folded term=standout ctermfg=3 ctermbg=256 + +" Use a dark gray for highlighting 'spelling' errors (ALE uses this class for +" highlighting linting errors). Original value was 224 +"highlight SpellBad ctermbg=236 +" +" Actually, just diable ALE in-line error highlighting and just rely on the +" markers in the gutter. +highlight clear ALEError +highlight link ALEError NONE