mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
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)
This commit is contained in:
committed by
Bram Moolenaar
parent
6582e230a0
commit
f3caeb63d6
11
runtime/autoload/dist/ft.vim
vendored
11
runtime/autoload/dist/ft.vim
vendored
@ -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
|
||||
|
Reference in New Issue
Block a user