Skip to content

Instantly share code, notes, and snippets.

@chanmix51
Created June 13, 2017 15:23
Show Gist options
  • Save chanmix51/3a499b8ba230f766bdc523fea9d708ed to your computer and use it in GitHub Desktop.
Save chanmix51/3a499b8ba230f766bdc523fea9d708ed to your computer and use it in GitHub Desktop.
Vim exuberent ctags indexing script
#!/bin/bash
ctags-exuberant -f .ctags \
-h '.php' -R \
--exclude='\.git' \
--totals=yes \
--tag-relative=yes \
--PHP-kinds=+cfiv \
--language-force=PHP \
--exclude='*.js' \
--regex-PHP='/(abstract)?\s+class\s+([^ ]+)/\2/c/' \
--regex-PHP='/(static|abstract|public|protected|private)\s+(final\s+)?function\s+(\&\s+)?([^ (]+)/\4/f/' \
--regex-PHP='/interface\s+([^ ]+)/\1/i/' \
--regex-PHP='/trait\s+([^ ]+)/\1/i/' \
--regex-PHP='/\$([a-zA-Z_][a-zA-Z0-9_]*)/\1/v/' \
$@
# vim: ft=sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment