patch 9.1.1468: filetype: bright(er)script files are not recognized
Problem: filetype: bright(er)script files are not recognized
Solution: detect *.bs files as brighterscript filetype and *.brs as
brightscript filetype, include filetype plugins (Riley Bruins)
closes: #17566
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index f90c6f8..6b0e5d6 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1,7 +1,7 @@
" Vim support file to detect file types
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
-" Last Change: 2025 Jun 03
+" Last Change: 2025 Jun 18
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" Listen very carefully, I will say this only once
@@ -309,6 +309,12 @@
" Blkid cache file
au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old setf xml
+" Brighterscript
+au BufNewFile,BufRead *.bs setf brighterscript
+
+" Brightscript
+au BufNewFile,BufRead *.brs setf brightscript
+
" BSDL
au BufNewFile,BufRead *.bsd,*.bsdl setf bsdl
diff --git a/runtime/ftplugin/brighterscript.vim b/runtime/ftplugin/brighterscript.vim
new file mode 100644
index 0000000..4fe585a
--- /dev/null
+++ b/runtime/ftplugin/brighterscript.vim
@@ -0,0 +1,11 @@
+" Vim filetype plugin
+" Language: Brighterscript
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2025 Jun 17
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+runtime! ftplugin/brightscript.vim
diff --git a/runtime/ftplugin/brightscript.vim b/runtime/ftplugin/brightscript.vim
new file mode 100644
index 0000000..92bc56d
--- /dev/null
+++ b/runtime/ftplugin/brightscript.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin
+" Language: Brightscript
+" Maintainer: Riley Bruins <ribru17@gmail.com>
+" Last Change: 2025 Jun 17
+
+if exists('b:did_ftplugin')
+ finish
+endif
+let b:did_ftplugin = 1
+
+setl comments=:' commentstring='\ %s
+
+let b:undo_ftplugin = 'setl com< cms<'