Remove grep current partial, doesn't work well

This commit is contained in:
Yan Pritzker 2016-05-12 12:59:38 -05:00
parent 996915dc22
commit 22dd9da9d6

View File

@ -26,17 +26,5 @@ nnoremap <silent> ,gd :Ag 'def <cword>'<CR>
" open up a grep line, with a quote started for the search
nnoremap ,gg :Ag ""<left>
"Grep Current Partial
function! AgCurrentPartial()
let l:fileNameWithoutExtension = expand('%:t:r')
let l:fileNameWithoutUnderscore = substitute(l:fileNameWithoutExtension, '^_','','g')
let l:grepPattern = "render.*[\\\'\\\"].*" . l:fileNameWithoutUnderscore . "[\\\'\\\"]$"
exec 'Ag "' . l:grepPattern . '"'
endfunction
command! AgCurrentPartial call AgCurrentPartial()
"
nnoremap ,gcp :AgCurrentPartial<CR>
"Grep for usages of the current file
nnoremap ,gcf :exec "Ag " . expand("%:t:r")<CR>