Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let workspace = $WORKSPACE
- let arxml_index = workspace . "/.arxml_index"
- function! ArxmlCreateIndex()
- execute "!grep -Haron \"<SHORT-NAME>[^<]*</SHORT-NAME>\" --include=\"*.arxml\" ".g:workspace." > ".g:arxml_index
- endfunction
- function! ArxmlFind(symbol)
- cgetexpr system('grep ">' . a:symbol . '<" ' . g:arxml_index)
- botright copen
- endfunction
- function! ArxmlGFind(symbol)
- let l:mybufname=bufname('%')
- call ArxmlFind(a:symbol)
- exec bufwinnr(l:mybufname) . 'wincmd w'
- endfunction
- command! ArxmlCreateIndex call CreateIndex()
- command! -nargs=1 ArxmlFind call ArxmlFind(<f-args>)
- command! -nargs=1 ArxmlGFind call ArxmlGFind(<f-args>)
- nmap ,Af yiw:ArxmlFind ^R0<cr>
- nmap ,Agf yiw:ArxmlGFind ^R0<cr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement