mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.2098: No filetype support for xcompose files
Problem: No filetype support for xcompose files Solution: Add filetype detection closes: #13508 Signed-off-by: ObserverOfTime <chronobserver@disroot.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
bee966d3fe
commit
4f9074b96c
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
@@ -237,6 +237,7 @@ runtime/ftplugin/vdf.vim @ObserverOfTime
|
|||||||
runtime/ftplugin/wast.vim @rhysd
|
runtime/ftplugin/wast.vim @rhysd
|
||||||
runtime/ftplugin/wget.vim @dkearns
|
runtime/ftplugin/wget.vim @dkearns
|
||||||
runtime/ftplugin/wget2.vim @dkearns
|
runtime/ftplugin/wget2.vim @dkearns
|
||||||
|
runtime/ftplugin/xcompose.vim @ObserverOfTime
|
||||||
runtime/ftplugin/xml.vim @chrisbra
|
runtime/ftplugin/xml.vim @chrisbra
|
||||||
runtime/ftplugin/xs.vim @petdance
|
runtime/ftplugin/xs.vim @petdance
|
||||||
runtime/ftplugin/zsh.vim @chrisbra
|
runtime/ftplugin/zsh.vim @chrisbra
|
||||||
@@ -525,6 +526,7 @@ runtime/syntax/wdl.vim @zenmatic
|
|||||||
runtime/syntax/wget.vim @dkearns
|
runtime/syntax/wget.vim @dkearns
|
||||||
runtime/syntax/wget2.vim @dkearns
|
runtime/syntax/wget2.vim @dkearns
|
||||||
runtime/syntax/xbl.vim @dkearns
|
runtime/syntax/xbl.vim @dkearns
|
||||||
|
runtime/syntax/xcompose.vim @ObserverOfTime
|
||||||
runtime/syntax/xmath.vim @cecamp
|
runtime/syntax/xmath.vim @cecamp
|
||||||
runtime/syntax/xml.vim @chrisbra
|
runtime/syntax/xml.vim @chrisbra
|
||||||
runtime/syntax/xs.vim @petdance
|
runtime/syntax/xs.vim @petdance
|
||||||
|
@@ -2537,6 +2537,9 @@ au BufNewFile,BufRead */etc/xinetd.conf setf xinetd
|
|||||||
" XS Perl extension interface language
|
" XS Perl extension interface language
|
||||||
au BufNewFile,BufRead *.xs setf xs
|
au BufNewFile,BufRead *.xs setf xs
|
||||||
|
|
||||||
|
" X compose file
|
||||||
|
au BufNewFile,BufRead .XCompose,Compose setf xcompose
|
||||||
|
|
||||||
" X resources file
|
" X resources file
|
||||||
au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults
|
au BufNewFile,BufRead .Xdefaults,.Xpdefaults,.Xresources,xdm-config,*.ad setf xdefaults
|
||||||
|
|
||||||
|
13
runtime/ftplugin/xcompose.vim
Normal file
13
runtime/ftplugin/xcompose.vim
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
" Vim filetype plugin file
|
||||||
|
" Language: XCompose
|
||||||
|
" Maintainer: ObserverOfTime <chronobserver@disroot.org
|
||||||
|
" Last Change: 2023 Nov 09
|
||||||
|
|
||||||
|
if exists('b:did_ftplugin')
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
setl comments=:# commentstring=#\ %s
|
||||||
|
|
||||||
|
let b:undo_ftplugin = 'setl com< cms<'
|
37
runtime/syntax/xcompose.vim
Normal file
37
runtime/syntax/xcompose.vim
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
" Vim syntax file
|
||||||
|
" Language: XCompose
|
||||||
|
" Maintainer: ObserverOfTime <chronobserver@disroot.org>
|
||||||
|
" Filenames: .XCompose, Compose
|
||||||
|
" Last Change: 2023 Nov 09
|
||||||
|
|
||||||
|
" Comments
|
||||||
|
syn keyword xcomposeTodo contained TODO FIXME XXX
|
||||||
|
syn match xcomposeComment /#.*/ contains=xcomposeTodo
|
||||||
|
|
||||||
|
" Includes
|
||||||
|
syn keyword xcomposeInclude include nextgroup=xcomposeFile skipwhite
|
||||||
|
syn match xcomposeFile /"\([^"]\|\\"\)\+"/ contained
|
||||||
|
syn match xcomposeSubstitution /%[HLS]/ contained containedin=xcomposeFile
|
||||||
|
|
||||||
|
" Modifiers
|
||||||
|
syn keyword xcomposeModifier Ctrl Lock Caps Shift Alt Meta None
|
||||||
|
syn match xcomposeModifierPrefix /\s*\zs[!~]\ze\s*/
|
||||||
|
|
||||||
|
" Keysyms
|
||||||
|
syn match xcomposeKeysym /<[A-Za-z0-9_]\+>/
|
||||||
|
syn match xcomposeKeysym /[A-Za-z0-9_]\+/ contained
|
||||||
|
syn match xcomposeString /"\([^"]\|\\"\)\+"/ contained nextgroup=xcomposeKeysym skipwhite
|
||||||
|
syn match xcomposeColon /:/ nextgroup=xcomposeKeysym,xcomposeString skipwhite
|
||||||
|
|
||||||
|
hi def link xcomposeColon Delimiter
|
||||||
|
hi def link xcomposeComment Comment
|
||||||
|
hi def link xcomposeFile String
|
||||||
|
hi def link xcomposeInclude Include
|
||||||
|
hi def link xcomposeKeysym Constant
|
||||||
|
hi def link xcomposeModifier Function
|
||||||
|
hi def link xcomposeModifierPrefix Operator
|
||||||
|
hi def link xcomposeString String
|
||||||
|
hi def link xcomposeSubstitution Special
|
||||||
|
hi def link xcomposeTodo Todo
|
||||||
|
|
||||||
|
let b:current_syntax = 'xcompose'
|
@@ -799,6 +799,7 @@ def s:GetFilenameChecks(): dict<list<string>>
|
|||||||
wsh: ['file.wsf', 'file.wsc'],
|
wsh: ['file.wsf', 'file.wsc'],
|
||||||
wsml: ['file.wsml'],
|
wsml: ['file.wsml'],
|
||||||
wvdial: ['wvdial.conf', '.wvdialrc'],
|
wvdial: ['wvdial.conf', '.wvdialrc'],
|
||||||
|
xcompose: ['.XCompose', 'Compose'],
|
||||||
xdefaults: ['.Xdefaults', '.Xpdefaults', '.Xresources', 'xdm-config', 'file.ad', '/Xresources/file', '/app-defaults/file', 'Xresources', 'Xresources-file', 'any/Xresources/file', 'any/app-defaults/file'],
|
xdefaults: ['.Xdefaults', '.Xpdefaults', '.Xresources', 'xdm-config', 'file.ad', '/Xresources/file', '/app-defaults/file', 'Xresources', 'Xresources-file', 'any/Xresources/file', 'any/app-defaults/file'],
|
||||||
xf86conf: ['xorg.conf', 'xorg.conf-4'],
|
xf86conf: ['xorg.conf', 'xorg.conf-4'],
|
||||||
xhtml: ['file.xhtml', 'file.xht'],
|
xhtml: ['file.xhtml', 'file.xht'],
|
||||||
|
@@ -704,6 +704,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
2098,
|
||||||
/**/
|
/**/
|
||||||
2097,
|
2097,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user