Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ctags let you generates a list of class/site/node/define which can then be used by your texteditor to show up the puppet manifest representation. The configuration for ctags is done in /.ctags and ctags execution is wrapped in a rake task 'tags' as a convenience. Vim supports tags files and you can display the file structure using the tagbar plugin. The ctags configuration comes from: https://github.com/majutsushi/tagbar/wiki#puppet I have added a `--languages=puppet` to restrict it to puppet manifests, we might want to generate tags for python/php whatever script we have in operations/puppet. Change-Id: Ia164addddc48f897c3af092b1c14d80fb505889e
- Loading branch information
Showing
3 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
-h pp | ||
--langdef=puppet | ||
--langmap=puppet:.pp | ||
--languages=puppet | ||
--regex-puppet=/^class[ \t]*([:a-zA-Z0-9_\-]+)[ \t]*/\1/c,class/ | ||
--regex-puppet=/^site[ \t]*([a-zA-Z0-9_\-]+)[ \t]*/\1/s,site/ | ||
--regex-puppet=/^node[ \t]*([a-zA-Z0-9_\-]+)[ \t]*/\1/n,node/ | ||
--regex-puppet=/^define[ \t]*([:a-zA-Z0-9_\-]+)[ \t]*/\1/d,definition/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,6 @@ | |
# Automatically generated documentation: | ||
/doc/* | ||
!/doc/README | ||
|
||
# ctags generated file (see `rake tags`) | ||
/tags |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters