1

is it possible to specify more than one trigger for the exact same snippet?
Working with Fortran I would like to trigger an IF THEN END IF snippet with both if and IF trigger.
As a small solution I am now repeating the snippet multiple time, like this:

snippet wr
    WRITE(*,*) 
snippet WR
    WRITE(*,*) 
snippet re
    READ(*,*) 
snippet RE
    READ(*,*) 
snippet if
    IF (${1}) THEN
        ${2}
    END IF
snippet IF
    IF (${1}) THEN
        ${2}
    END IF
snippet select
    SELECT CASE (${1})
        CASE (${2})
            ${3}
    END SELECT
snippet SELECT
    SELECT CASE (${1})
        CASE (${2})
            ${3}
    END SELECT

Is there a better solution?

Zoe
  • 27,060
  • 21
  • 118
  • 148
StockBreak
  • 2,857
  • 1
  • 35
  • 61

1 Answers1

0

Using multi_snip. Give third parameter as description on your snippet. Example:

snippet wr A description of snippet #wr
  write something
snippet wr A description of snippet #wr other
  write something else
Zoe
  • 27,060
  • 21
  • 118
  • 148
dilbadil
  • 316
  • 2
  • 7