From 4ba4ad74d94bb939279510b9ee7f1fa185dbe4e7 Mon Sep 17 00:00:00 2001 From: voyeg3r Date: Tue, 21 Sep 2021 20:11:16 -0300 Subject: [PATCH] added commentstring(s)? to the modeline all.snippets --- UltiSnips/all.snippets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UltiSnips/all.snippets b/UltiSnips/all.snippets index 84ddaa40e..c26101de6 100644 --- a/UltiSnips/all.snippets +++ b/UltiSnips/all.snippets @@ -73,7 +73,7 @@ endsnippet # modeline form ('set') to work in languages with comment terminators # (/* like C */). snippet modeline "Vim modeline" -vim`!v ':set '. (&expandtab ? printf('et sw=%i ts=%i', &sw, &ts) : printf('noet sts=%i sw=%i ts=%i', &sts, &sw, &ts)) . (&tw ? ' tw='. &tw : '') . ':'` +`!v (split(&cms, "%s")[0]) . (&expandtab ? printf(' vim:et:sw=%i:ts=%i', &sw, &ts) : printf(' vim:noet:sts=%i:sw=%i:ts=%i', &sts, &sw, &ts)) . (&tw ? ' tw='. &tw : '') . ':' . (len(split(&cms,"%s")) > 1 ? split(&cms, "%s")[1] : '')` endsnippet #########