Skip to content

Instantly share code, notes, and snippets.

@ralt
Created May 27, 2015 20:28
Show Gist options
  • Save ralt/e3d67d1db12cc9f003f9 to your computer and use it in GitHub Desktop.
Save ralt/e3d67d1db12cc9f003f9 to your computer and use it in GitHub Desktop.
Create emacs ctags files for Platform.sh drupal projects
#!/bin/bash
find `pwd`/www/ -type f > /tmp/project-files
find `pwd`/repository -type f >> /tmp/project-files
ctags -eL /tmp/project-files \
--totals=yes \
--langmap=php:.engine.inc.module.theme.install.php \
--tag-relative=yes \
--PHP-kinds=+cdfi \
--regex-PHP='/abstract class ([^ ]*)/\1/c/' \
--regex-PHP='/interface ([^ ]*)/\1/c/' \
--regex-PHP='/(public |static |abstract |protected |private )+function ([^ (]*)/\2/f/'
rm /tmp/project-files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment