Skip to content

Instantly share code, notes, and snippets.

@rondreas
Created Aug 4, 2022
Embed
What would you like to do?
quick ctag option file for unreal shaders
# definitions for hlsl to be used for unreal shaders, usf, ush etc...
--langdef=hlsl
--map-hlsl=+.ush
--map-hlsl=+.usf
# for now just catch all functions,
# [a-zA-Z2-4]+ should match any type identifier,
# [a-zA-Z_]+ should match the function names,
# \((([a-zA-Z2-4]+[[:space:]]+[a-zA-Z]+)([[:space:]]*[,]*[[:space:]]*))*\) should match any inputs to functions,
# \2 means the second group is the name,
# f means it will be tagged as a function,
# {mgroup=N} is required, this sets jumps us to the first line of the pattern when jumping to tag
--kinddef-hlsl=f,function,function
--mline-regex-hlsl=/([a-zA-Z2-4]+)[[:space:]]+([a-zA-Z_]+)\((([a-zA-Z2-4]+[[:space:]]+[a-zA-Z_]+)([[:space:]]*[,]*[[:space:]]*))*\)/\2/f/{mgroup=0}
--fields=+ln
@rondreas
Copy link
Author

rondreas commented Aug 4, 2022

Run ctags --languages="hlsl" --options=$HOME/ctags.d/hlsl.ctags -R . in ...\Engine\Shaders to create tags file for all usf and ush files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment