Skip to content

Commit c0982f9

Browse files
tobinjtchrisbra
authored andcommitted
runtime(dosini): Update syntax script, spellcheck comments only
By default spell checking is enabled for all text, but adding `contains=@Spell` to syntax rules restricts spell checking to those syntax rules. See `:help spell-syntax` for full details. Variable names and headers are far more likely than comments to contain spelling errors, so only enable spell checking in comments. Introduced in xuhdev/syntax-dosini.vim#8 cc @tobinjt closes: #15655 Signed-off-by: John Tobin <[email protected]> Signed-off-by: Hong Xu <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent 26e4b00 commit c0982f9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

runtime/syntax/dosini.vim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
" Vim syntax file
22
" Language: Configuration File (ini file) for MSDOS/MS Windows
3-
" Version: 2.3
3+
" Version: 2.4
44
" Original Author: Sean M. McKee <[email protected]>
55
" Previous Maintainer: Nima Talebi <[email protected]>
66
" Current Maintainer: Hong Xu <[email protected]>
77
" Homepage: http://www.vim.org/scripts/script.php?script_id=3747
88
" Repository: https://github.com/xuhdev/syntax-dosini.vim
9-
" Last Change: 2023 Aug 20
9+
" Last Change: 2024 Sept 08
1010

1111

1212
" quit when a syntax file was already loaded
@@ -27,7 +27,7 @@ syn match dosiniNumber "=\zs\s*\d\+\s*$"
2727
syn match dosiniNumber "=\zs\s*\d*\.\d\+\s*$"
2828
syn match dosiniNumber "=\zs\s*\d\+e[+-]\=\d\+\s*$"
2929
syn region dosiniHeader start="^\s*\[" end="\]"
30-
syn match dosiniComment "^[#;].*$"
30+
syn match dosiniComment "^[#;].*$" contains=@Spell
3131
syn region dosiniSection start="\s*\[.*\]" end="\ze\s*\[.*\]" fold
3232
\ contains=dosiniLabel,dosiniValue,dosiniNumber,dosiniHeader,dosiniComment
3333

0 commit comments

Comments
 (0)