commit c24dcb1bea1fcd7384ccb09bd3bd1d25db51f890
parent b8858dddbf7b7f1ee3033acfab3d6f54a0ed3114
Author: Christian Clason <c.clason@uni-graz.at>
Date: Sun, 31 Mar 2024 18:57:50 +0200
vim-patch:9.1.0234: filetype: support for Intel HEX files is lacking
Problem: filetype: support for Intel HEX files is lacking
Solution: Add more file extensions that are typical for Intel HEX files
(Wu, Zhenyu)
Reference: https://en.wikipedia.org/wiki/Intel_HEX
closes: vim/vim#14355
https://github.com/vim/vim/commit/e523dd9803ed62ea0657af8c85ab7bdfe80f4c53
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Diffstat:
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
@@ -504,7 +504,16 @@ local extension = {
vc = 'hercules',
heex = 'heex',
hex = 'hex',
+ ['a43'] = 'hex',
+ ['a90'] = 'hex',
['h32'] = 'hex',
+ ['h80'] = 'hex',
+ ['h86'] = 'hex',
+ ihex = 'hex',
+ ihe = 'hex',
+ ihx = 'hex',
+ int = 'hex',
+ mcs = 'hex',
hjson = 'hjson',
m3u = 'hlsplaylist',
m3u8 = 'hlsplaylist',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
@@ -302,7 +302,7 @@ func s:GetFilenameChecks() abort
\ 'hcl': ['file.hcl'],
\ 'heex': ['file.heex'],
\ 'hercules': ['file.vc', 'file.ev', 'file.sum', 'file.errsum'],
- \ 'hex': ['file.hex', 'file.h32'],
+ \ 'hex': ['file.hex', 'file.ihex', 'file.ihe', 'file.ihx', 'file.int', 'file.mcs', 'file.h32', 'file.h80', 'file.h86', 'file.a43', 'file.a90'],
\ 'hgcommit': ['hg-editor-file.txt'],
\ 'hjson': ['file.hjson'],
\ 'hlsplaylist': ['file.m3u', 'file.m3u8'],