From d6479bbf0baeeedaa183c1f3e11679246ca20138 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Fri, 25 Sep 2020 00:07:37 +0200 Subject: Change gitignore provider --- syntax/gitignore.vim | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) (limited to 'syntax') diff --git a/syntax/gitignore.vim b/syntax/gitignore.vim index f83c098b..7a1a8e9c 100644 --- a/syntax/gitignore.vim +++ b/syntax/gitignore.vim @@ -1,23 +1,33 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gitignore') == -1 -" Vim syntax file -" Language: .gitignore -" Maintainer: Roman Dolgushin -" URL: http://github.com/rdolgushin/gitignore.vim +scriptencoding utf-8 + +" Copyright (c) 2017-2020 Filip SzymaƄski. All rights reserved. +" Use of this source code is governed by an MIT license that can be +" found in the LICENSE file. if exists('b:current_syntax') finish endif -if !exists('main_syntax') - let main_syntax = 'conf' -endif +" https://git-scm.com/docs/gitignore#_pattern_format +syntax keyword gitignoreTodo TODO FIXME XXX NOTE SEE contained +syntax match gitignoreComment '^#.*' contains=gitignoreTodo +syntax match gitignoreComment '\s#.*'ms=s+1 contains=gitignoreTodo +syntax match gitignoreNegation '^!' +syntax match gitignoreSeparator '/' +syntax match gitignoreWildcard '\(\\\)\@