[英]Vim's snipMate multiple triggers for the same snippet
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. 使用Fortran,我想同时使用
if
和IF
触发器来触发IF THEN END IF
片段。
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? 有更好的解决方案吗?
Using multi_snip. 使用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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.