Skip to content

Commit

Permalink
rm ag.vim, replace with neomake
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdrew committed Aug 17, 2015
1 parent 2c1fe27 commit a2b9c49
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 9 deletions.
14 changes: 13 additions & 1 deletion .vimrc.after
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ unmap <leader>gd
unmap <leader>gl
unmap <leader>gc
unmap <leader>gp
unmap <leader>rt

noremap <unique> <leader>w :set wrap! wrap?<CR>
noremap <unique> <leader>g :GundoToggle<CR>
Expand Down Expand Up @@ -114,13 +115,24 @@ let g:syntastic_quiet_warnings=1
let g:syntastic_html_tidy_ignore_errors=['proprietary attribute "ng-', 'is not recognized!']
let g:ruby_enable_balloons=0
let g:bufExplorerShowRelativePath=1
let g:ag_prg="ag --vimgrep --smart-case"
let g:racer_cmd="./target/release/racer"
let g:gitgutter_enabled = 0
let g:neomake_serialize = 1
let g:neomake_open_list = 1
let g:neomake_makeprg_remove_invalid_entries = 0

function! s:Ag(file_mode, args)
let cmd = "ag --vimgrep --smart-case ".a:args
let custom_maker = neomake#utils#MakerFromCommand(&shell, cmd)
let custom_maker.name = cmd
let custom_maker.remove_invalid_entries = 0
let custom_maker.place_signs = 0
let enabled_makers = [custom_maker]
call neomake#Make({'enabled_makers': enabled_makers, 'file_mode': a:file_mode}) | echo "running: " . cmd
endfunction

command! -bang -nargs=* -complete=file Ag call s:Ag(<bang>1, <q-args>)

" From http://vim.wikia.com/wiki/Capture_ex_command_output
" Captures ex command and puts it in a new tab
function! TabMessage(cmd)
Expand Down
1 change: 1 addition & 0 deletions .vimrc.before
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
call janus#disable_plugin('ag.vim')
call janus#disable_plugin('ack')
call janus#disable_plugin('buffergator')
call janus#disable_plugin('ctrlp')
Expand Down
15 changes: 8 additions & 7 deletions lazarus/ftplugin/ruby.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ if exists("b:lazarus_ruby")
endif
let b:lazarus_ruby = 1

if !exists('g:rspec_runner')
let g:rspec_runner = 'Neomake!'
endif

function! RunRubyTest(single)
if exists('g:rspec')
let rspec = g:rspec
Expand All @@ -32,11 +28,16 @@ function! RunRubyTest(single)
if a:single
let cmd.= ':'. s:spec_line
endif
let &l:makeprg = cmd

" Match file:line message, ignore lines: ^\.|F$, ignore blank / whitespace
" lines
let &l:efm = 'rspec %f:%l %m, %-G%*[.F], %-G\\s%#'
update | exe g:rspec_runner | echo "running: " . cmd
"let &l:efm = 'rspec %f:%l %m, %-G%*[.F], %-G\\s%#'
let custom_maker = neomake#utils#MakerFromCommand(&shell, cmd)
let custom_maker.name = cmd
let custom_maker.remove_invalid_entries = 0
let custom_maker.errorformat = 'rspec %f:%l %m, %-G%*[.F], %-G\\s%#'
let enabled_makers = [custom_maker]
update | call neomake#Make({'enabled_makers': enabled_makers, 'file_mode': 1}) | echo "running: " . cmd
endfunction
command! -complete=command -nargs=? RunRubyTest call RunRubyTest(<q-args>)
noremap <buffer> <silent> <unique> <leader>r :RunRubyTest<CR>
Expand Down
2 changes: 1 addition & 1 deletion neomake

0 comments on commit a2b9c49

Please sign in to comment.