aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2021-11-15 23:02:33 +0100
committerChristian Clason <c.clason@uni-graz.at>2021-11-15 23:03:10 +0100
commite5ef736dfe7a86358bf399257ecd24c08ab5f0cb (patch)
tree453e2dc68728c5b92b85350e062df8503883e2f3
parent87a053f126c79f5eeb1654e35beb31d9fe733163 (diff)
downloadrneovim-e5ef736dfe7a86358bf399257ecd24c08ab5f0cb.tar.gz
rneovim-e5ef736dfe7a86358bf399257ecd24c08ab5f0cb.tar.bz2
rneovim-e5ef736dfe7a86358bf399257ecd24c08ab5f0cb.zip
vim-patch:8.2.3598: RouterOS filetype is not recognized
Problem: RouterOS filetype is not recognized. Solution: Add file and script patterns. (closes vim/vim#9097) https://github.com/vim/vim/commit/0818ab82e7058145366ebbe759f0b3f74724bdfd
-rw-r--r--runtime/filetype.vim3
-rw-r--r--src/nvim/testdir/test_filetype.vim2
2 files changed, 5 insertions, 0 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 75354968e9..0ad19dd5fa 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1486,6 +1486,9 @@ au BufNewFile,BufRead robots.txt setf robots
" Rpcgen
au BufNewFile,BufRead *.x setf rpcgen
+" MikroTik RouterOS script
+au BufRead,BufNewFile *.rsc setf routeros
+
" reStructuredText Documentation Format
au BufNewFile,BufRead *.rst setf rst
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
index 18e59bb6b7..7fc64e87f8 100644
--- a/src/nvim/testdir/test_filetype.vim
+++ b/src/nvim/testdir/test_filetype.vim
@@ -419,6 +419,7 @@ let s:filename_checks = {
\ 'rnc': ['file.rnc'],
\ 'rng': ['file.rng'],
\ 'robots': ['robots.txt'],
+ \ 'routeros': ['file.rsc'],
\ 'rpcgen': ['file.x'],
\ 'rpl': ['file.rpl'],
\ 'rst': ['file.rst'],
@@ -659,6 +660,7 @@ let s:script_checks = {
\ 'yaml': [['%YAML 1.2']],
\ 'pascal': [['#!/path/instantfpc']],
\ 'fennel': [['#!/path/fennel']],
+ \ 'routeros': [['#!/path/rsc']],
\ }
" Various forms of "env" optional arguments.