Plan 9: Code Assist

Jump to definition with ctags 

 

Use ctags for jump-to-defintion. Also, you can use Button3 in acme to jump to include files - both system and local headers. 

Note:

  • Use sig command for signature lookup. 
  • Use src command for jumping to Plan 9 command sources. 

If you have mounted contrib sources, use this. Alternatively, download tar from https://ctags.sourceforge.net/ .

Make following changes:

  1. in Makefile, add '-DHAVE_REMOVE' to DEFS
  2. in config.h, remove or comment out the definition of INT_MAX 
# Use one below 
bind -b /$objtype/bin/ape /bin
ape/psh 
 
./configure 
# ctags
make 
make readtags 
cp ctags readtags /$objtype/bin
 

Tag file

#!/bin/rc
sym=$1
res=`{readtags $sym}
if(~ $#res 0){echo no tag: $sym >[1=2]; exit 1}
file=$res(2); addr=$res(3)
plumb -d edit $file:$addr
 



 


 

Comments

Popular posts from this blog

Plan 9 : The Infinity Notebook

Plan 9: Quick Boot with UEFI

Plan 9: Key Visualizer