Updates to .vimrc

This commit is contained in:
Jonathan Bernard 2020-01-01 20:10:00 -06:00
parent dc0e302e86
commit 716793265d

65
.vimrc
View File

@ -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 <silent> # :<C-U>
\escape(@", '?\.*$^~['), '\_s\+', '\\_s\\+', 'g')<CR><CR>
\gV:call setreg('"', old_reg, old_regtype)<CR>
"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 <Leader>ws :w<CR>:silent !git add %<CR>:!git commit<CR>
nmap <Leader>b :CtrlPBuffer<CR>
" Format Bible quotes in Markdown (bold verse numbers)
vmap <Leader>qb :s/\v\s+(\d+)\s+/ **\1** /g<CR>
" remove trailing whitespace from all lines
nmap <Leader>ss :%s/\s\+$//<CR>
" Execute the current line (stripping leading `$`s)
nmap <Leader>r :.w !sed s/^\\s*\\$\\s*//\|bash<CR>
" Execute the current line (stripping leading `$`s) and paste the output into
" the buffer underneath.
nmap <Leader>R yyp!!sed s/^\\s*\\$\\s*//\|bash<CR><Esc>
vmap <Leader>qb :s/\v\s+(\d+)\s+/ **\1** /g<CR>
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