diff runtime/filetype.vim @ 34092:ff27442e7851 v9.1.0013

patch 9.1.0013: Modula2 filetype support lacking Commit: https://github.com/vim/vim/commit/68a89470693c7687d4e736ca056c05de632e3ac7 Author: Doug Kearns <dougkearns@gmail.com> Date: Fri Jan 5 17:59:04 2024 +0100 patch 9.1.0013: Modula2 filetype support lacking Problem: Modula2 filetype support lacking Solution: Improve the Modula-2 runtime support, add additional modula2 dialects, add compiler plugin, update syntax highlighting, include syntax tests, update Makefiles (Doug Kearns) closes: #6796 closes: #8115 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Benjamin Kowarsch <trijezdci@users.noreply.github.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Fri, 05 Jan 2024 18:15:04 +0100
parents a18b8310956a
children 249728d5f11e
line wrap: on
line diff
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -619,8 +619,12 @@ au BufNewFile,BufRead *.intr			setf dyla
 " Dylan
 au BufNewFile,BufRead *.dylan			setf dylan
 
-" Microsoft Module Definition
-au BufNewFile,BufRead *.def			setf def
+" Microsoft Module Definition or Modula-2
+au BufNewFile,BufRead *.def			call dist#ft#FTdef()
+
+if has("fname_case")
+  au BufNewFile,BufRead *.DEF			setf modula2
+endif
 
 " Dracula
 au BufNewFile,BufRead *.drac,*.drc,*lvs,*lpe	setf dracula
@@ -1339,9 +1343,6 @@ au BufNewFile,BufRead *.mmp			setf mmp
 " ABB Rapid, Modula-2, Modsim III or LambdaProlog
 au BufNewFile,BufRead *.mod\c			call dist#ft#FTmod()
 
-" Modula-2  (.md removed in favor of Markdown, see dist#ft#FTmod for *.MOD)
-au BufNewFile,BufRead *.m2,*.DEF,*.mi		setf modula2
-
 " Modula-3 (.m3, .i3, .mg, .ig)
 au BufNewFile,BufRead *.[mi][3g]		setf modula3