From f3caeb63d62c08b579e9b5f40b35e8bf64dde87a Mon Sep 17 00:00:00 2001 From: Austin Gatlin Date: Sat, 26 Jun 2021 12:02:55 +0200 Subject: patch 8.2.3050: cannot recognize elixir files Problem: Cannot recognize elixir files. Solution: Recognize Elixir-specific files. Check if an .ex file is Euphoria or Elixir. (Austin Gatlin, closes #8401, closes #8446) --- runtime/autoload/dist/ft.vim | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'runtime/autoload') diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 1ac74b578..ac8065911 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -172,6 +172,17 @@ func dist#ft#FTent() setf dtd endfunc +func dist#ft#ExCheck() + let lines = getline(1, min([line("$"), 100])) + if exists('g:filetype_euphoria') + exe 'setf ' . g:filetype_euphoria + elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1 + setf euphoria3 + else + setf elixir + endif +endfunc + func dist#ft#EuphoriaCheck() if exists('g:filetype_euphoria') exe 'setf ' . g:filetype_euphoria -- cgit v1.2.1