comparison runtime/autoload/dist/ft.vim @ 25026:fda44c0b4b7b v8.2.3050

patch 8.2.3050: cannot recognize elixir files Commit: https://github.com/vim/vim/commit/f3caeb63d62c08b579e9b5f40b35e8bf64dde87a Author: Austin Gatlin <austin@gatlin.io> Date: Sat Jun 26 12:02:55 2021 +0200 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)
author Bram Moolenaar <Bram@vim.org>
date Sat, 26 Jun 2021 12:15:03 +0200
parents 397f95f103e8
children 71d3ebfb00b6
comparison
equal deleted inserted replaced
25025:ebe793e81045 25026:fda44c0b4b7b
168 break 168 break
169 endif 169 endif
170 let lnum = lnum + 1 170 let lnum = lnum + 1
171 endw 171 endw
172 setf dtd 172 setf dtd
173 endfunc
174
175 func dist#ft#ExCheck()
176 let lines = getline(1, min([line("$"), 100]))
177 if exists('g:filetype_euphoria')
178 exe 'setf ' . g:filetype_euphoria
179 elseif match(lines, '^--\|^ifdef\>\|^include\>') > -1
180 setf euphoria3
181 else
182 setf elixir
183 endif
173 endfunc 184 endfunc
174 185
175 func dist#ft#EuphoriaCheck() 186 func dist#ft#EuphoriaCheck()
176 if exists('g:filetype_euphoria') 187 if exists('g:filetype_euphoria')
177 exe 'setf ' . g:filetype_euphoria 188 exe 'setf ' . g:filetype_euphoria