Option dialog: Add new snippets and display custom snippets in bold.

[DEVELOPMENT ENVIRONMENT]
* NEW: Option dialog: Add new snippets.
* NEW: Option dialog: Display custom snippets in bold.
This commit is contained in:
gambas 2019-02-11 01:21:44 +01:00
parent 8ab745c21a
commit 5318c1db60
2 changed files with 59 additions and 15 deletions

View File

@ -959,7 +959,11 @@ Public Sub gvwSnippet_Data(Row As Integer, Column As Integer)
.Data.Font = Font[txtEditorFont.Value]
If Column = 0 Then
.Data.Text = hSampleCode.Trigger
If hSampleCode.Default Then .Data.Font.Italic = True
If hSampleCode.Default Then
'.Data.Font.Italic = True
Else
.Data.Font.Bold = True
Endif
Else
.Data.Text = Mid$(Quote(hSampleCode.Pattern), 2, -1)
Endif
@ -1634,4 +1638,4 @@ Private Sub FillAutoTransEngines()
cmbAutoTrans.Text = Settings["/AutomaticTranslation/Engine", "google"]
If cmbAutoTrans.Index < 0 Then cmbAutoTrans.Text = "google"
End
End

View File

@ -1,5 +1,5 @@
[Snippets]
Count=43
Count=94
Snippet[1]="fo\nFor ${1:Var} = ${2:Start} To ${3:End}\n ${}\nNext"
Snippet[2]="fe\nFor Each ${1:Var} In ${2:Collection}\n ${}\nNext"
Snippet[3]="if\nIf ${1:Test} Then\n ${}\nEndif"
@ -19,10 +19,10 @@ Snippet[16]="spv\nStatic Public ${1:Var} As ${2:Type}"
Snippet[17]="sv\nStatic Private $${1:Var} As ${2:Type}"
Snippet[18]="pc\nPublic Const ${1:Name} As ${2:Type} = ${3:Value}"
Snippet[19]="c\nPrivate Const ${1:Name} As ${2:Type} = ${3:Value}"
Snippet[20]="p\nProperty ${1:Name} As ${2:Type}"
Snippet[21]="pr\nProperty Read ${1:Name} As ${2:Type}"
Snippet[22]="sp\nStatic Property ${1:Name} As ${2:Type}"
Snippet[23]="spr\nStatic Property Read ${1:Name} As ${2:Type}"
Snippet[20]="pr\nProperty ${1:Name} As ${2:Type}"
Snippet[21]="prr\nProperty Read ${1:Name} As ${2:Type}"
Snippet[22]="spp\nStatic Property ${1:Name} As ${2:Type}"
Snippet[23]="sppr\nStatic Property Read ${1:Name} As ${2:Type}"
Snippet[24]="wh\nWhile ${1:Test}\n ${}\nWend"
Snippet[25]="re\nRepeat\n ${}\nUntil ${1:Test}"
Snippet[26]="do\nDo\n ${}\nLoop"
@ -42,16 +42,56 @@ Snippet[39]="db\nDim b${1:Var} As Boolean"
Snippet[40]="ds\nDim s${1:Var} As String"
Snippet[41]="dc\nDim c${1:Var} As Collection"
Snippet[42]="df\nDim f${1:Var} As Float"
Snippet[43]="da\nDim a${1:Var} As String[]"
Snippet[43]="da\nDim a${1:Var} As ${2:Type}[]"
Snippet[44]="vi\nPrivate $i${1:Var} As Integer"
Snippet[45]="vb\nPrivate $b${1:Var} As Boolean"
Snippet[46]="vs\nPrivate $s${1:Var} As String"
Snippet[47]="vc\nPrivate $c${1:Var} As Collection"
Snippet[48]="vf\nPrivate $f${1:Var} As Float"
Snippet[49]="sva\nStatic Private $a${1:Var} As String[]"
Snippet[50]="svi\nStatic Private $i${1:Var} As Integer"
Snippet[51]="svb\nStatic Private $b${1:Var} As Boolean"
Snippet[52]="svs\nStatic Private $s${1:Var} As String"
Snippet[53]="svc\nStatic Private $c${1:Var} As Collection"
Snippet[54]="svf\nStatic Private $f${1:Var} As Float"
Snippet[55]="sva\nStatic Private $a${1:Var} As String[]"
Snippet[43]="va\nPrivate a${1:Var} As ${2:Type}[]"
Snippet[49]="pvi\nPublic ${1:Var} As Integer"
Snippet[50]="pvb\nPublic ${1:Var} As Boolean"
Snippet[51]="pvs\nPublic ${1:Var} As String"
Snippet[52]="pvc\nPublic ${1:Var} As Collection"
Snippet[53]="pvf\nPublic ${1:Var} As Float"
Snippet[54]="pva\nPublic ${1:Var} As ${2:Type}[]"
Snippet[55]="svi\nStatic Private $i${1:Var} As Integer"
Snippet[56]="svb\nStatic Private $b${1:Var} As Boolean"
Snippet[57]="svs\nStatic Private $s${1:Var} As String"
Snippet[58]="svc\nStatic Private $c${1:Var} As Collection"
Snippet[59]="svf\nStatic Private $f${1:Var} As Float"
Snippet[60]="sva\nStatic Private $a${1:Var} As ${2:Type}[]"
Snippet[61]="spvi\nStatic Public ${1:Var} As Integer"
Snippet[62]="spvb\nStatic Public ${1:Var} As Boolean"
Snippet[63]="spvs\nStatic Public ${1:Var} As String"
Snippet[64]="spvc\nStatic Public ${1:Var} As Collection"
Snippet[65]="spvf\nStatic Public ${1:Var} As Float"
Snippet[66]="spva\nStatic Public ${1:Var} As ${2:Type}[]"
Snippet[67]="todo\n' TODO: "
Snippet[68]="note\n' NOTE: "
Snippet[69]="fixme\n' FIXME: "
Snippet[70]="dai\nDim a${1:Var} As Integer[]"
Snippet[71]="dab\nDim a${1:Var} As Boolean[]"
Snippet[72]="das\nDim a${1:Var} As String[]"
Snippet[73]="dac\nDim a${1:Var} As Collection[]"
Snippet[74]="daf\nDim a${1:Var} As Float[]"
Snippet[75]="vai\nPrivate $a${1:Var} As Integer[]"
Snippet[76]="vab\nPrivate $a${1:Var} As Boolean[]"
Snippet[77]="vas\nPrivate $a${1:Var} As String[]"
Snippet[78]="vac\nPrivate $a${1:Var} As Collection[]"
Snippet[79]="vaf\nPrivate $a${1:Var} As Float[]"
Snippet[80]="svai\nStatic Private $a${1:Var} As Integer[]"
Snippet[81]="svab\nStatic Private $a${1:Var} As Boolean[]"
Snippet[82]="svas\nStatic Private $a${1:Var} As String[]"
Snippet[83]="svac\nStatic Private $a${1:Var} As Collection[]"
Snippet[84]="svaf\nStatic Private $a${1:Var} As Float[]"
Snippet[85]="pvai\nPublic {1:Var} As Integer[]"
Snippet[86]="pvab\nPublic {1:Var} As Boolean[]"
Snippet[87]="pvas\nPublic {1:Var} As String[]"
Snippet[88]="pvac\nPublic {1:Var} As Collection[]"
Snippet[89]="pvaf\nPublic {1:Var} As Float[]"
Snippet[90]="spvai\nStatic Public ${1:Var} As Integer[]"
Snippet[91]="spvab\nStatic Public ${1:Var} As Boolean[]"
Snippet[92]="spvas\nStatic Public ${1:Var} As String[]"
Snippet[93]="spvac\nStatic Public ${1:Var} As Collection[]"
Snippet[94]="spvaf\nStatic Public ${1:Var} As Float[]"