patch 9.1.0961: filetype: TI gel files are not recognized
Commit:
https://github.com/vim/vim/commit/9360de9027aa286e802363ede59c9e97025ae123
Author: Wu, Zhenyu <[email protected]>
Date: Wed Dec 25 10:37:57 2024 +0100
patch 9.1.0961: filetype: TI gel files are not recognized
Problem: filetype: TI gel files are not recognized
Solution: detect '*.gel' files as gel filetype, include
get filetype and syntax plugins
(Wu, Zhenyu)
References:
https://downloads.ti.com/ccs/esd/documents/users_guide/ccs_debug-gel.html
closes: #16226
Signed-off-by: Wu, Zhenyu <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 78a44f572..538df770b 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -1078,6 +1078,9 @@ au BufRead,BufNewFile *.hws setf
hollywood
" Hoon
au BufRead,BufNewFile *.hoon setf hoon
+" TI Code Composer Studio General Extension Language
+au BufNewFile,BufRead *.gel setf gel
+
" Tilde (must be before HTML)
au BufNewFile,BufRead *.t.html setf tilde
diff --git a/runtime/ftplugin/gel.vim b/runtime/ftplugin/gel.vim
new file mode 100644
index 000000000..b1f4def2b
--- /dev/null
+++ b/runtime/ftplugin/gel.vim
@@ -0,0 +1,13 @@
+" Vim filetype plugin file
+" Language: TI Code Composer Studio General Extension Language
+" Document:
https://downloads.ti.com/ccs/esd/documents/users_guide/ccs_debug-gel.html
+" Maintainer: Wu, Zhenyu <[email protected]>
+" Last Change: 2024 Dec 25
+
+if exists("b:did_ftplugin") | finish | endif
+let b:did_ftplugin = 1
+
+setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:///,://
+setlocal commentstring=/*\ %s\ */
+
+let b:undo_ftplugin = "setl commentstring< comments<"
diff --git a/runtime/syntax/gel.vim b/runtime/syntax/gel.vim
new file mode 100644
index 000000000..5f3800273
--- /dev/null
+++ b/runtime/syntax/gel.vim
@@ -0,0 +1,19 @@
+" Vim syntax file
+" Language: TI Code Composer Studio General Extension Language
+" Document:
https://downloads.ti.com/ccs/esd/documents/users_guide/ccs_debug-gel.html
+" Maintainer: Wu, Zhenyu <[email protected]>
+" Last Change: 2024 Dec 25
+
+if exists("b:current_syntax")
+ finish
+endif
+
+runtime! syntax/cpp.vim
+
+syn keyword gelStatement StartUp GEL_AddInputFile GEL_AddOutputFile
GEL_AdvancedReset GEL_AsmStepInto GEL_AsmStepOver GEL_BreakPtAdd GEL_BreakPtDel
GEL_BreakPtDisable GEL_BreakPtReset GEL_CancelTimer GEL_Connect GEL_Dialog
GEL_DisableFileOutput GEL_DisableRealtime GEL_Disconnect GEL_EnableClock
GEL_EnableFileOutput GEL_EnableRealtime GEL_EnableZeroFill GEL_EvalOnTarget
GEL_GetBoolDebugProperty GEL_GetBoolDriverProperty GEL_GetBoolTargetDbProperty
GEL_GetNumericDebugProperty GEL_GetNumericDriverProperty
GEL_GetNumericTargetDbProperty GEL_GetStringDebugProperty
GEL_GetStringDriverProperty GEL_GetStringTargetDbProperty GEL_Go GEL_Halt
GEL_HandleTargetError GEL_HWBreakPtAdd GEL_HWBreakPtDel GEL_HWBreakPtDisable
GEL_HWBreakPtReset GEL_IsConnected GEL_IsHalted GEL_IsInRealtimeMode
GEL_IsResetSupported GEL_IsTimerSet GEL_Load GEL_LoadBin GEL_LoadGel
GEL_LoadProgramOnly GEL_MapAdd GEL_MapAddStr GEL_MapDelete GEL_MapOff GEL_MapOn
GEL_MapReset GEL_MatchesConnection GEL_MemoryFill GEL_MemoryListSupportedTypes
GEL_MemoryLoad GEL_MemoryLoadData GEL_MemorySave GEL_MemorySaveBin
GEL_MemorySaveCoff GEL_MemorySaveData GEL_MemorySaveHex GEL_PatchAssembly
GEL_ProbePtAdd GEL_ProbePtDel GEL_ProbePtDisable GEL_ProbePtReset GEL_ReConnect
GEL_RefreshWindows GEL_Reload GEL_RemoveDebugState GEL_RemoveInputFile
GEL_RemoveOutputFile GEL_Reset GEL_Restart GEL_RestoreDebugState GEL_Run
GEL_RunF GEL_SetBlockResetMode GEL_SetBoolDebugProperty GEL_SetClockEvent
GEL_SetNumericDebugProperty GEL_SetSemihostingMainArgs
GEL_SetStringDebugProperty GEL_SetTimer GEL_SetWaitInResetMode GEL_SrcStepInto
GEL_SrcStepOver GEL_StepInto GEL_StepOut GEL_StepOver GEL_StrCat GEL_StrLen
GEL_SubStr GEL_SymbolAdd GEL_SymbolAddOffset GEL_SymbolAddRel GEL_SymbolDisable
GEL_SymbolEnable GEL_SymbolHideSection GEL_SymbolLoad GEL_SymbolLoadOffset
GEL_SymbolLoadRel GEL_SymbolRemove GEL_SymbolShowSection GEL_SyncHalt
GEL_SyncRun GEL_SyncStepInto GEL_SyncStepOut GEL_SyncStepOver GEL_System
GEL_TargetTextOut GEL_TextOut GEL_Trace GEL_UnloadAllGels GEL_UnloadAllSymbols
GEL_UnloadGel GEL_VerifyBinProgram GEL_VerifyProgram OnChildRunning
OnFileLoaded OnHalt OnPreFileLoaded OnPreReset OnPreTargetConnect OnReset
OnResetDetected OnRestart OnTargetConnect
+syn keyword gelModifier hotmenu menuitem
+
+hi def link gelStatement Statement
+hi def link gelModifier Type
+
+let b:current_syntax = "gel"
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
index bb9cbbeb0..09e900f32 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -298,6 +298,7 @@ def s:GetFilenameChecks(): dict<list<string>>
gdscript: ['file.gd'],
gdshader: ['file.gdshader', 'file.shader'],
gedcom: ['file.ged', 'lltxxxxx.txt', '/tmp/lltmp', '/tmp/lltmp-file',
'any/tmp/lltmp', 'any/tmp/lltmp-file'],
+ gel: ['file.gel'],
gemtext: ['file.gmi', 'file.gemini'],
gift: ['file.gift'],
gitattributes: ['file.git/info/attributes', '.gitattributes',
'/.config/git/attributes', '/etc/gitattributes',
'/usr/local/etc/gitattributes', 'some.git/info/attributes'] +
WhenConfigHome('$XDG_CONFIG_HOME/git/attributes'),
diff --git a/src/version.c b/src/version.c
index 632b5590a..8f74c1d7e 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 961,
/**/
960,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/vim_dev/E1tQNwv-002Yz2-Rp%40256bit.org.