mirror of
https://github.com/vim/vim
synced 2025-07-16 01:01:58 +00:00
patch 9.1.0982: TI linker files are not recognized
Problem: TI linker files are not recognized Solution: inspect '*.cmd' files and detect TI linker files as 'lnk' filetype, include a lnk ftplugin and syntax script (Wu, Zhenyu) closes: #16320 Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f27e80a6e1
commit
39a4eb0b2c
@ -1,7 +1,7 @@
|
||||
" Vim support file to detect file types
|
||||
"
|
||||
" Maintainer: The Vim Project <https://github.com/vim/vim>
|
||||
" Last Change: 2024 Dec 30
|
||||
" Last Change: 2024 Dec 31
|
||||
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
|
||||
|
||||
" Listen very carefully, I will say this only once
|
||||
@ -240,9 +240,17 @@ au BufNewFile,BufRead *.fb setf freebasic
|
||||
|
||||
" Batch file for MSDOS. See dist#ft#FTsys for *.sys
|
||||
au BufNewFile,BufRead *.bat setf dosbatch
|
||||
" *.cmd is close to a Batch file, but on OS/2 Rexx files also use *.cmd.
|
||||
" *.cmd is close to a Batch file, but on OS/2 Rexx files and TI linker command files also use *.cmd.
|
||||
" lnk: `/* comment */`, `// comment`, and `--linker-option=value`
|
||||
" rexx: `/* comment */`, `-- comment`
|
||||
au BufNewFile,BufRead *.cmd
|
||||
\ if getline(1) =~ '^/\*' | setf rexx | else | setf dosbatch | endif
|
||||
\ if join(getline(1, 20), "\n") =~ 'MEMORY\|SECTIONS\|\%(^\|\n\)--\S\|\%(^\|\n\)//'
|
||||
\| setf lnk
|
||||
\| elseif getline(1) =~ '^/\*'
|
||||
\| setf rexx
|
||||
\| else
|
||||
\| setf dosbatch
|
||||
\| endif
|
||||
" ABB RAPID or Batch file for MSDOS.
|
||||
au BufNewFile,BufRead *.sys call dist#ft#FTsys()
|
||||
if has("fname_case")
|
||||
|
Reference in New Issue
Block a user