erinata / FingerText

Tab triggered snippet plugin for Notepad++.
https://sourceforge.net/projects/fingertext/
146 stars 32 forks source link

looping snippet #60

Open gwarah opened 7 years ago

gwarah commented 7 years ago

Let's suppose I intent to insert some attributes with their getters/setterrs methods, so would be nice if it's possible by a looping snippet like this one (example in vb script):

1) trigger

vbs-attributes(name,age)

2) linked to these hypothetical snippet:

'''''''''''
' atributes
'''''''''''
$[![(repeat)
private $[![(var)]!]
]!]

'''''''''''
' getters and letters 
'''''''''''
$[![(repeat)
    ' attribute $[![(var)]!]
    Public Property Let fun$[![(var)]!](pTxt)
        $[![(var)]!] = pTxt
    End Property

    Public Property Get fun$[![(var)]!]()
        fun$[![(var)]!] = $[![(var)]!]
    End Property
]!]

3) resulting in:

'''''''''''
' atributes
'''''''''''
private name
private age

'''''''''''
' getters and letters 
'''''''''''
' attribute name
Public Property Let funname(pTxt)
      name = pTxt
End Property

Public Property Get funname()
      funname = name
End Property

' attribute age
Public Property Let funage(pTxt)
      age = pTxt
End Property

Public Property Get funage()
      funage = ageEnd Property
End Property

It's it possible? How?