From 857ba192061823823b93675ea21739ffa3e09509 Mon Sep 17 00:00:00 2001 From: Kartik Agaram Date: Sun, 7 Oct 2018 12:45:30 -0700 Subject: 4672 --- vimrc.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vimrc.vim b/vimrc.vim index efaee6df..93a63f57 100644 --- a/vimrc.vim +++ b/vimrc.vim @@ -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() -- cgit 1.4.1-2-gfad0