Skip to content

Instantly share code, notes, and snippets.

@huqi
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huqi/0ae864dcefe23888d0b6 to your computer and use it in GitHub Desktop.
Save huqi/0ae864dcefe23888d0b6 to your computer and use it in GitHub Desktop.
sync c tags
#!/bin/sh
# generate tag file for cscope
echo "Generating cscope tag file..."
find $PWD -name "*.h" -o -name "*.c" -o -name "*.cpp" -o -name "*.res" -o -name "*.mak" > cscope.files
cscope -bkq -i cscope.files
# generate tag file for ctags
echo "Generating ctags tag file..."
ctags -R
# generate tag file for lookupfile plugin
echo "Generating lookupfile tag file..."
echo -e "!_TAG_FILE_SORTED\t2\t/2=foldcase/" > filenametags
find . -not -regex '.*\.\(png\|gif\)' -type f -printf "%f\t%p\t1\n" | \
sort -f >> filenametags
echo "Complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment