diff --git a/src/config/sublime_syntax.zig b/src/config/sublime_syntax.zig index 1b7c4900a..18167fee6 100644 --- a/src/config/sublime_syntax.zig +++ b/src/config/sublime_syntax.zig @@ -14,7 +14,7 @@ const Template = struct { \\contexts: \\ main: \\ # Comments - \\ - match: '#.*$' + \\ - match: '^\s*#.*$' \\ scope: comment.line.number-sign.ghostty \\ \\ # Keywords diff --git a/src/config/vim.zig b/src/config/vim.zig index 43ad9fa63..d048fc990 100644 --- a/src/config/vim.zig +++ b/src/config/vim.zig @@ -70,7 +70,7 @@ fn writeSyntax(writer: anytype) !void { try writer.writeAll( \\ \\ - \\syn match ghosttyConfigComment /#.*/ contains=@Spell + \\syn match ghosttyConfigComment /^\s*#.*/ contains=@Spell \\ \\hi def link ghosttyConfigComment Comment \\hi def link ghosttyConfigKeyword Keyword