From 9470235d76096843d1e01999b97ee9d565ef95bc Mon Sep 17 00:00:00 2001 From: Vanillma Date: Mon, 15 Jul 2024 20:11:42 +0430 Subject: [PATCH] Improved syntax file and ftplugin for SnipMate snippets. --- ftplugin/snippets.vim | 5 ++--- syntax/snippets.vim | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/ftplugin/snippets.vim b/ftplugin/snippets.vim index b13cc8a..c6560f9 100644 --- a/ftplugin/snippets.vim +++ b/ftplugin/snippets.vim @@ -5,10 +5,9 @@ if exists("b:did_ftplugin") endif let b:did_ftplugin = 1 -let b:undo_ftplugin = "setl et< sts< cms< fdm< fde<" +let b:undo_ftplugin = "setl cms< fdm< fde<" -" Use hard tabs -setlocal noexpandtab softtabstop=0 +setlocal foldmethod=expr foldexpr=getline(v:lnum)=~'^#\\\|^e\\\|^p'?0:getline(v:lnum)!~'^\\t\\\|^\ \\\|^$'?'>1':1 setlocal commentstring=#\ %s setlocal nospell diff --git a/syntax/snippets.vim b/syntax/snippets.vim index dcb39dd..b25372c 100644 --- a/syntax/snippets.vim +++ b/syntax/snippets.vim @@ -8,14 +8,13 @@ syn match snipCommand '\%(\\\@ cover common " cases with \t and " ". -syn match snipError "^[^#vsaep\t ].*$" +syn match snipError '^[^#saep\t ].*$' hi link snippet Identifier hi link snipComment Comment