Hi Chris,
Thank you for your sharing.
On 01/16/2014 10:19 AM, Chris Evich wrote:
Tip for vim users,
(all you gui ppl hush!)
* Install cscope
* Stick this in your ~/.bashrc:
alias pyscopeupd='find "$PWD/" -name "*.py" -o -iname "*.cfg" > \
cscope.files && cscope -bv -i cscope.files -f cscope.out'
What about make 'pyscopeupd' as a local "command" for us, then we can
find it in $PATH and autocomplete it with TAB.
[root@localhost virt]# cat /usr/local/bin/pyscopeupd
#!/bin/sh
find "$PWD/" -name "*.py" -o -iname "*.cfg" > \
cscope.files && cscope -bv -i cscope.files -f cscope.out
[root@localhost virt]# pys+[TAB]
pyscopeupd pyshell
[root@localhost virt]# pyscopeupd
Building cross-reference...
> Building symbol database 1000 of 1185
* Download this into your ~/.vimrc:
http://cscope.sourceforge.net/cscope_maps.vim
* After updating your local repo. branch, run the 'pyscopeupd' alias to
build/update cscope databases.
* Edit some python as normal with vim.
* Found a variable/function call you forgot about? Stick your cursor on
it, type ctrl+[space] then 's'.
* Pick a selection from the list, and it'll open the reference in a vim
window. (ctrl-w + w to switch windows, ctrl-w + c to close window).
More: http://cscope.sourceforge.net/cscope_vim_tutorial.html
_______________________________________________
Virt-test-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/virt-test-devel