This commit is contained in:
Kartik Agaram 2018-10-07 12:45:30 -07:00
parent 143b79b9e4
commit 857ba19206
1 changed files with 8 additions and 0 deletions

View File

@ -73,3 +73,11 @@ function! SubxPath(arg)
return "apps/" . a:arg . "*.subx"
endif
endfunction
" we often want to crib lines of machine code from other files
function! GrepSubX(regex)
" https://github.com/mtth/scratch.vim
Scratch!
silent exec "r !grep -h ".shellescape(a:regex)." *.subx */*.subx"
endfunction
command! -nargs=1 G call GrepSubX(<args>)