mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
vim-patch:9.1.0304: filetype: cgdb config file is not recognized (#28294)
Problem: filetype: cgdb config file is not recognized
Solution: Detect cgdbrc files as cgdbrc filetype
(Wu, Zhenyu)
closes: vim/vim#14458
1492fe6903
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
This commit is contained in:
parent
e4fb3e2007
commit
611cc7de43
21
runtime/ftplugin/cgdbrc.vim
Normal file
21
runtime/ftplugin/cgdbrc.vim
Normal file
@ -0,0 +1,21 @@
|
||||
" Vim filetype plugin file
|
||||
" Language: cgdbrc
|
||||
" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
||||
" Documentation: https://cgdb.github.io/docs/Configuring-CGDB.html
|
||||
" Latest Revision: 2024-04-09
|
||||
|
||||
if exists('b:did_ftplugin')
|
||||
finish
|
||||
endif
|
||||
let b:did_ftplugin = 1
|
||||
|
||||
let s:save_cpoptions = &cpoptions
|
||||
set cpoptions&vim
|
||||
|
||||
let b:undo_ftplugin = 'setl com< cms<'
|
||||
|
||||
setlocal commentstring=#%s
|
||||
setlocal comments=:#
|
||||
|
||||
let &cpoptions = s:save_cpoptions
|
||||
unlet s:save_cpoptions
|
@ -1289,6 +1289,7 @@ local filename = {
|
||||
['/etc/default/cdrdao'] = 'cdrdaoconf',
|
||||
['/etc/defaults/cdrdao'] = 'cdrdaoconf',
|
||||
['cfengine.conf'] = 'cfengine',
|
||||
cgdbrc = 'cgdbrc',
|
||||
['CMakeLists.txt'] = 'cmake',
|
||||
['.alias'] = detect.csh,
|
||||
['.cshrc'] = detect.csh,
|
||||
|
16
runtime/syntax/cgdbrc.vim
Normal file
16
runtime/syntax/cgdbrc.vim
Normal file
@ -0,0 +1,16 @@
|
||||
" Vim syntax file
|
||||
" Language: cgdbrc
|
||||
" Maintainer: Wu, Zhenyu <wuzhenyu@ustc.edu>
|
||||
" Documentation: https://cgdb.github.io/docs/Configuring-CGDB.html
|
||||
" Latest Revision: 2024-04-09
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
let b:current_syntax = 'cgdbrc'
|
||||
|
||||
runtime! syntax/vim.vim
|
||||
|
||||
syn region cgdbComment start="^\s*\#" skip="\\$" end="$" contains=@Spell
|
||||
|
||||
highlight default link cgdbComment Comment
|
@ -146,6 +146,7 @@ func s:GetFilenameChecks() abort
|
||||
\ 'cf': ['file.cfm', 'file.cfi', 'file.cfc'],
|
||||
\ 'cfengine': ['cfengine.conf'],
|
||||
\ 'cfg': ['file.hgrc', 'filehgrc', 'hgrc', 'some-hgrc'],
|
||||
\ 'cgdbrc': ['cgdbrc'],
|
||||
\ 'ch': ['file.chf'],
|
||||
\ 'chaiscript': ['file.chai'],
|
||||
\ 'chaskell': ['file.chs'],
|
||||
|
Loading…
Reference in New Issue
Block a user