Skip to content

Instantly share code, notes, and snippets.

@trlinkin
Created October 10, 2013 19:25
Show Gist options
  • Save trlinkin/6924042 to your computer and use it in GitHub Desktop.
Save trlinkin/6924042 to your computer and use it in GitHub Desktop.
Ctags and vim-tagbar matching for Puppet Manifests - Base on http://comments.gmane.org/gmane.comp.sysutils.puppet.user/6152
--- In your ~/.ctags
--langdef=puppet
--langmap=puppet:.pp
--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/
--regex-puppet=/^ *([a-zA-Zi:_]+) *{ *(.*) *:/\1[\2]/r,resource/
--regex-puppet=/^ *([A-Z][a-zA-Z0-9_:]+) *{/\1/f,default/
--- In your ~/.vimrc
let g:tagbar_type_puppet = {
\ 'ctagstype': 'puppet',
\ 'kinds': [
\'c:class',
\'s:site',
\'n:node',
\'d:definition',
\'r:resource',
\'f:default'
\]
\}
@masatake
Copy link

Hi,

I am a developer of @universal-ctags.
I would like to incorporate your puppet parser to universal-ctags.

universal-ctag is distributed under term of
GNU General Public License version 2 or (at your option) any later version.

If you allow me to incorporate your parser into universal-ctags, could you add
I would like you to add following copyright notice at the head of your .ctags:

#
# Copyright (c) 2016, <YOURNAME HERE>
#
#   This source code is released for free distribution under the terms of the
#   GNU General Public License version 2 or (at your option) any later version.
#
#   This module contains functions for generating tags for puppet files.
#

(universal-ctags can use # as comment marker.)

Regards,
Masatake YAMATO(@masatake).

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