summaryrefslogtreecommitdiffstats
path: root/syntax
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2020-09-24 23:24:42 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2020-09-24 23:24:42 +0200
commitd53d2189b92ab8150753201e2e2f8cba14b8edc9 (patch)
tree351ffb188afb7e99aeb377d7b8882a8a0cd4cf77 /syntax
parenta6a6aeab76bef135d9f76534efa5ee7391c4ed2a (diff)
downloadvim-polyglot-d53d2189b92ab8150753201e2e2f8cba14b8edc9.tar.gz
vim-polyglot-d53d2189b92ab8150753201e2e2f8cba14b8edc9.zip
Add support for .gitignore highlighting
Diffstat (limited to 'syntax')
-rw-r--r--syntax/gitignore.vim23
1 files changed, 23 insertions, 0 deletions
diff --git a/syntax/gitignore.vim b/syntax/gitignore.vim
new file mode 100644
index 00000000..f83c098b
--- /dev/null
+++ b/syntax/gitignore.vim
@@ -0,0 +1,23 @@
+if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gitignore') == -1
+
+" Vim syntax file
+" Language: .gitignore
+" Maintainer: Roman Dolgushin <rd@roman-dolgushin.ru>
+" URL: http://github.com/rdolgushin/gitignore.vim
+
+if exists('b:current_syntax')
+ finish
+endif
+
+if !exists('main_syntax')
+ let main_syntax = 'conf'
+endif
+
+runtime! syntax/conf.vim
+unlet b:current_syntax
+
+let b:current_syntax = 'gitignore'
+
+setlocal commentstring=#%s
+
+endif