Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This allows for much more detailed highlighting. This implementation is a general solution to a hack we've been using in the vim-perl test suite.
- Loading branch information
Showing
3 changed files
with
148 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
" Vim color file | ||
" | ||
" This is a dummy color file that defines a color for every syntax class. | ||
|
||
hi Normal ctermfg=7 | ||
hi Comment ctermfg=7 | ||
hi Constant ctermfg=7 | ||
hi Special ctermfg=7 | ||
hi Identifier ctermfg=7 | ||
hi Statement ctermfg=7 | ||
hi PreProc ctermfg=7 | ||
hi Type ctermfg=7 | ||
hi Underlined ctermfg=7 | ||
hi Ignore ctermfg=7 | ||
hi Error ctermfg=7 | ||
hi Todo ctermfg=7 | ||
hi String ctermfg=7 | ||
hi Character ctermfg=7 | ||
hi Number ctermfg=7 | ||
hi Boolean ctermfg=7 | ||
hi Float ctermfg=7 | ||
hi Function ctermfg=7 | ||
hi Conditional ctermfg=7 | ||
hi Repeat ctermfg=7 | ||
hi Label ctermfg=7 | ||
hi Operator ctermfg=7 | ||
hi Keyword ctermfg=7 | ||
hi Exception ctermfg=7 | ||
hi Include ctermfg=7 | ||
hi Define ctermfg=7 | ||
hi Macro ctermfg=7 | ||
hi PreCondit ctermfg=7 | ||
hi StorageClass ctermfg=7 | ||
hi Typedef ctermfg=7 | ||
hi Tag ctermfg=7 | ||
hi SpecialChar ctermfg=7 | ||
hi Delimiter ctermfg=7 | ||
hi SpecialComment ctermfg=7 | ||
hi Debug ctermfg=7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Test that additional syntax groups get activated with all_syntax_groups => 1 | ||
|
||
use strict; | ||
use warnings; | ||
use Test::More; | ||
use lib 't/lib'; | ||
use TVC_Test; | ||
|
||
plan tests => 2; | ||
|
||
my $linked = Text::VimColor->new( | ||
string => "()", | ||
filetype => 'vim', | ||
)->marked; | ||
|
||
my $unlinked = Text::VimColor->new( | ||
all_syntax_groups => 1, | ||
string => "()", | ||
filetype => 'vim', | ||
)->marked; | ||
|
||
is($linked->[0][0], 'Special', 'The Delimiter group is linked to Special by default'); | ||
is($unlinked->[0][0], 'Delimiter', 'The Delimiter group is used if it has its own coloring'); |