Remove grep current partial, doesn't work well
This commit is contained in:
parent
996915dc22
commit
22dd9da9d6
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user