Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement #if, #else, #elseif, #endif directives.
These are shortcuts for one-line verbatim blocks. See the test. Fixes #14.
- Loading branch information
1 parent
124640a
commit 53b56ba
Showing
5 changed files
with
72 additions
and
3 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
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,28 @@ | ||
" Name: Test 58 | ||
" Author: y | ||
" Maintainer: y | ||
" License: Vim License (see `:help license`) | ||
|
||
set background=dark | ||
|
||
hi clear | ||
if exists('syntax_on') | ||
syntax reset | ||
endif | ||
|
||
let g:colors_name = 'test58' | ||
|
||
let s:t_Co = exists('&t_Co') && !empty(&t_Co) && &t_Co > 1 ? &t_Co : 2 | ||
|
||
if (has('termguicolors') && &termguicolors) || has('gui_running') | ||
if 1 " some condition | ||
hi Normal guifg=#ffffff guibg=#000000 guisp=NONE gui=NONE cterm=NONE | ||
elseif '#000000' == '#ffffff' " interpolation works here | ||
hi Normal guifg=#000000 guibg=#ffffff guisp=NONE gui=NONE cterm=NONE | ||
else " A comment | ||
hi Normal guifg=#000000 guibg=#000000 guisp=NONE gui=NONE cterm=NONE | ||
endif " end some condition (255) | ||
unlet s:t_Co | ||
finish | ||
endif | ||
|
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,16 @@ | ||
# vim: ft=colortemplate | ||
Full name:Test 58 | ||
Short name:test58 | ||
Author:y | ||
Variant:gui | ||
Background:dark | ||
Color:black rgb(0,0,0) 16 Black | ||
Color:white #ffffff 255 White | ||
#if 1 " some condition | ||
Normal white black #if here is treated as comment | ||
#elseif '@guiblack' == '@guiwhite' " interpolation works here | ||
Normal black white #else ditto | ||
#else " A comment | ||
Normal black black #elseif ditto | ||
#endif " end some condition (@termwhite) | ||
|
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