helper: add get_last_statement_from_expression_stmt() [build fix]
[smatch.git] / smatch_data / db / vim_smdb
blob5760066110d4adab4106222f279c208fdf8a4a3a
1 #!/bin/bash
3 # Add these lines to your .vimrc file
5 # map <C-r> :! vim_smdb return_states <cword> <CR> :execute 'edit' system("cat ~/.smdb_tmp/cur") <CR>
6 # map <C-c> :! vim_smdb <cword> <CR> :execute 'edit' system("cat ~/.smdb_tmp/cur") <CR>
8 # Now you can move your cursor over a function and hit CTRL-c to see how it's
9 # called or CTRL-r to see what it returns. Use the ":bd" command to get back to
10 # your source.
12 DIR="$HOME/.smdb_tmp"
13 mkdir -p $DIR
15 for i in $(seq 1 100) ; do
16 if [ ! -e $DIR/$i ] ; then
17 break
19 done
21 if [ $i == 100 ] ; then
22 i=1
25 next=$(($i + 1))
27 rm -f $DIR/$next
28 rm $DIR/.${i}.swp
29 smdb $* > $DIR/$i
31 echo "$DIR/$i" > $DIR/cur