Vim: Difficulty setting up ctags. Source in subdirectories don't see tags file in project root

后端 未结 5 991
伪装坚强ぢ
伪装坚强ぢ 2021-01-29 19:25

I\'m trying to get setup with (exuberant) ctags on Vim today and am having difficulty getting it to work properly. I generate my ctags file on the command line with with:

<
5条回答
  •  粉色の甜心
    2021-01-29 19:46

    #!/bin/sh
    
    FREEZE_NAME=/* Give some version number */
    
    mkdir $HOME/ctags/$FREEZE_NAME
    
    V1=/* Software Path */
    
    find $V1 -name "*.h" | xargs /usr/local/bin/ctags -a -f $HOME/ctags/$FREEZE_NAME/h.tags
    
    find $V1 -name "*.c" | xargs /usr/local/bin/ctags -a -f $HOME/ctags/$FREEZE_NAME/c.tags
    
    cd $HOME/ctags/$FREEZE_NAME/
    
    rm -f all.tags
    
    cat c.tags h.tags >> all.tags
    
    sort all.tags > temp.tags
    
    mv temp.tags all.tags
    
    rm -f c.tags h.tags 
    

    Put the above code in a .sh file and run... This will generate your tags for sure.

提交回复
热议问题