execute pathogen#infect() set autochdir set autoindent set expandtab set hlsearch set incsearch set number set ruler set shiftwidth=2 set tabstop=2 set textwidth=79 set cursorline syntax enable filetype plugin on filetype indent on let mapleader=" " autocmd BufRead,BufNewFile *.md setlocal filetype=markdown " 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 inoremap " Search for selected text, forwards or backwards. vnoremap * : \let old_reg=getreg('"')let old_regtype=getregtype('"') \gvy/=substitute( \escape(@", '/\.*$^~['), '\_s\+', '\\_s\\+', 'g') \gV:call setreg('"', old_reg, old_regtype) vnoremap # : \let old_reg=getreg('"')let old_regtype=getregtype('"') \gvy?=substitute( \escape(@", '?\.*$^~['), '\_s\+', '\\_s\\+', 'g') \gV:call setreg('"', old_reg, old_regtype) let g:solarized_contrast="high" let g:ctrlp_max_files = 0 let g:ctrlp_custom_ignore = { \ '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 % let g:tsuquyomi_disable_quickfix = 1 let g:ale_set_loclist = 0 let g:ale_set_quickfix = 0 " 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 " be set where the getter and setter should be inserted. The marks are updated " so that the command can be immediately invoked again for a subsequent " property. " nmap gs wve"tywve"py'bo public void set "ppbvUhxA("tpA "ppA) { this."ppA = "ppA; } public "tpA get "ppbvUhxA() { return this."ppA; }mb'a/private \w+\+ \w\+; ma nmap jgs :let @t='':let @n='''a0v$:s/\v^\s*(private\|public\|protected)? ?(\w+(\<[^>]+\>)?) (\w+);/\=setreg('T', submatch(2))/n0v$:s/\v^\s*(private\|public\|protected)? ?(\w+(\<[^>]+\>)?) (\w+);/\=setreg('N', submatch(4))/n'bopublic "tpA get "npbvUhxA() { return this."npA;}<public void set "npbvUhxA("tpA "npA) { this."npA = "npA;}<jci :UnusedImportsRemove " Format the file using java-file-formatter. java-file-formatter should be a " command that takes a file path as the first argument and either alters the " file in place or prints out the altered file on STDOUT. nmap jsf :!java-file-formatter %:p nmap wo :vsplit /home/jdbernard/projects/worklog/worklog.txtL200<43> nmap ws :w:silent !git add %:!git commit nmap b :CtrlPBuffer " 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