From 136c11ca22881ac64c074070c7fda501e89b6bea Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Tue, 9 Jul 2024 19:15:22 +0200 Subject: vim-patch:9.1.0550: filetype: antlr4 files are not recognized Problem: filetype: antlr4 files are not recognized Solution: Detect '*.g4' as antlr4 filetype, include a simple antlr4 syntax and filetype plugin (Yinzuo Jiang) closes: vim/vim#15191 https://github.com/vim/vim/commit/4a7a4a3675b6ad90a525524ba4684925df212325 Co-authored-by: Yinzuo Jiang --- runtime/ftplugin/antlr4.vim | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 runtime/ftplugin/antlr4.vim (limited to 'runtime/ftplugin') diff --git a/runtime/ftplugin/antlr4.vim b/runtime/ftplugin/antlr4.vim new file mode 100644 index 0000000000..610d5284fb --- /dev/null +++ b/runtime/ftplugin/antlr4.vim @@ -0,0 +1,14 @@ +" Vim filetype plugin +" Language: ANTLR4, ANother Tool for Language Recognition v4 +" Maintainer: Yinzuo Jiang +" Last Change: 2024 July 09 + +if exists('b:did_ftplugin') + finish +endif +let b:did_ftplugin = 1 + +setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// +setlocal commentstring=//\ %s + +let b:undo_ftplugin = 'setl com< cms<' -- cgit