mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
'listchars': Whitespace
highlight group #6367
This commit is contained in:
parent
6afa7d66cd
commit
bc6d868d00
@ -3171,29 +3171,17 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
Think twice when using ":q!" or ":qa!".
|
Think twice when using ":q!" or ":qa!".
|
||||||
|
|
||||||
*'highlight'* *'hl'*
|
*'highlight'* *'hl'*
|
||||||
'highlight' 'hl' string (default (as a single string):
|
'highlight' 'hl' string (default: string of "c:group,..." pairs)
|
||||||
"8:SpecialKey,~:EndOfBuffer,z:TermCursor,
|
|
||||||
Z:TermCursorNC,@:NonText,d:Directory,
|
|
||||||
e:ErrorMsg,i:IncSearch,l:Search,
|
|
||||||
m:MoreMsg,M:ModeMsg,n:LineNr,
|
|
||||||
N:CursorLineNr,r:Question,s:StatusLine,
|
|
||||||
S:StatusLineNC,c:VertSplit,t:Title,
|
|
||||||
v:Visual,w:WarningMsg,W:WildMenu,
|
|
||||||
f:Folded,F:FoldColumn,A:DiffAdd,
|
|
||||||
C:DiffChange,D:DiffDelete,T:DiffText,
|
|
||||||
>:SignColumn,B:SpellBad,P:SpellCap,
|
|
||||||
R:SpellRare,L:SpellLocal,-:Conceal,
|
|
||||||
+:Pmenu,=:PmenuSel,x:PmenuSbar,
|
|
||||||
X:PmenuThumb")
|
|
||||||
global
|
global
|
||||||
This option can be used to set highlighting mode for various
|
This option can be used to set highlighting mode for various
|
||||||
occasions. It is a comma separated list of character pairs. The
|
occasions. It is a comma separated list of character pairs. The
|
||||||
first character in a pair gives the occasion, the second the mode to
|
first character in a pair gives the occasion, the second the mode to
|
||||||
use for that occasion. The occasions are:
|
use for that occasion. The occasions are:
|
||||||
|hl-SpecialKey| 8 Meta and special keys listed with ":map"
|
|hl-SpecialKey| 8 Meta and special keys listed with ":map"
|
||||||
|hl-EndOfBuffer| ~ lines after the last line in the buffer
|
|hl-Whitespace| 0
|
||||||
|
|hl-EndOfBuffer| ~ lines after the last line in the buffer
|
||||||
|hl-TermCursor| z Cursor in a focused terminal
|
|hl-TermCursor| z Cursor in a focused terminal
|
||||||
|hl-TermCursorNC| Z Cursor in an unfocused terminal
|
|hl-TermCursorNC| Z Cursor in an unfocused terminal
|
||||||
|hl-NonText| @ '@' at the end of the window and
|
|hl-NonText| @ '@' at the end of the window and
|
||||||
characters from 'showbreak'
|
characters from 'showbreak'
|
||||||
|hl-Directory| d directories in CTRL-D listing and other special
|
|hl-Directory| d directories in CTRL-D listing and other special
|
||||||
@ -3205,11 +3193,11 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
|hl-ModeMsg| M Mode (e.g., "-- INSERT --")
|
|hl-ModeMsg| M Mode (e.g., "-- INSERT --")
|
||||||
|hl-LineNr| n line number for ":number" and ":#" commands, and
|
|hl-LineNr| n line number for ":number" and ":#" commands, and
|
||||||
when 'number' or 'relativenumber' option is set.
|
when 'number' or 'relativenumber' option is set.
|
||||||
|hl-CursorLineNr| N like n for when 'cursorline' or 'relativenumber' is
|
|hl-CursorLineNr| N like n for when 'cursorline' or 'relativenumber' is
|
||||||
set.
|
set.
|
||||||
|hl-Question| r |hit-enter| prompt and yes/no questions
|
|hl-Question| r |hit-enter| prompt and yes/no questions
|
||||||
|hl-StatusLine| s status line of current window |status-line|
|
|hl-StatusLine| s status line of current window |status-line|
|
||||||
|hl-StatusLineNC| S status lines of not-current windows
|
|hl-StatusLineNC| S status lines of not-current windows
|
||||||
|hl-Title| t Titles for output from ":set all", ":autocmd" etc.
|
|hl-Title| t Titles for output from ":set all", ":autocmd" etc.
|
||||||
|hl-VertSplit| c column used to separate vertically split windows
|
|hl-VertSplit| c column used to separate vertically split windows
|
||||||
|hl-Visual| v Visual mode
|
|hl-Visual| v Visual mode
|
||||||
@ -3233,6 +3221,15 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
|hl-PmenuSbar| x popup menu scrollbar
|
|hl-PmenuSbar| x popup menu scrollbar
|
||||||
|hl-PmenuThumb| X popup menu scrollbar thumb
|
|hl-PmenuThumb| X popup menu scrollbar thumb
|
||||||
|
|
||||||
|
|hl-TabLine| *
|
||||||
|
|hl-TabLineFill| _
|
||||||
|
|hl-TabLineSel| #
|
||||||
|
|
||||||
|
|hl-ColorColumn| o
|
||||||
|
|hl-CursorColumn| !
|
||||||
|
|hl-CursorLine| .
|
||||||
|
|hl-QuickFixLine| q
|
||||||
|
|
||||||
The display modes are:
|
The display modes are:
|
||||||
r reverse (termcap entry "mr" and "me")
|
r reverse (termcap entry "mr" and "me")
|
||||||
i italic (termcap entry "ZH" and "ZR")
|
i italic (termcap entry "ZH" and "ZR")
|
||||||
@ -3917,9 +3914,8 @@ A jump table for the options with a short description can be found at |Q_op|.
|
|||||||
:set lcs=tab:>-,trail:-
|
:set lcs=tab:>-,trail:-
|
||||||
:set lcs=tab:>-,eol:<,nbsp:%
|
:set lcs=tab:>-,eol:<,nbsp:%
|
||||||
:set lcs=extends:>,precedes:<
|
:set lcs=extends:>,precedes:<
|
||||||
< The "NonText" highlighting will be used for "eol", "extends" and
|
< |hl-NonText| highlighting will be used for "eol", "extends" and
|
||||||
"precedes". "SpecialKey" for "nbsp", "space", "tab" and "trail".
|
"precedes". |hl-Whitespace| for "nbsp", "space", "tab" and "trail".
|
||||||
|hl-NonText| |hl-SpecialKey|
|
|
||||||
|
|
||||||
*'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'*
|
*'lpl'* *'nolpl'* *'loadplugins'* *'noloadplugins'*
|
||||||
'loadplugins' 'lpl' boolean (default on)
|
'loadplugins' 'lpl' boolean (default on)
|
||||||
|
@ -4899,32 +4899,28 @@ PmenuThumb Popup menu: Thumb of the scrollbar.
|
|||||||
*hl-Question*
|
*hl-Question*
|
||||||
Question |hit-enter| prompt and yes/no questions
|
Question |hit-enter| prompt and yes/no questions
|
||||||
*hl-QuickFixLine*
|
*hl-QuickFixLine*
|
||||||
QuickFixLine The selected |quickfix| item in the quickfix window.
|
QuickFixLine Current |quickfix| item in the quickfix window. Combined with
|
||||||
|hl-CursorLine| is combined with this when the cursor is on
|
|hl-CursorLine| when the cursor is there.
|
||||||
the currently selected quickfix item.
|
|
||||||
*hl-Search*
|
*hl-Search*
|
||||||
Search Last search pattern highlighting (see 'hlsearch').
|
Search Last search pattern highlighting (see 'hlsearch').
|
||||||
Also used for highlighting the current line in the quickfix
|
Also used for similar items that need to stand out.
|
||||||
window and similar items that need to stand out.
|
|
||||||
*hl-SpecialKey*
|
*hl-SpecialKey*
|
||||||
SpecialKey Meta and special keys listed with ":map", also for text used
|
SpecialKey Unprintable characters: text displayed differently from what
|
||||||
to show unprintable characters in the text, 'listchars'.
|
it really is. But not 'listchars' whitespace. |hl-Whitespace|
|
||||||
Generally: text that is displayed differently from what it
|
|
||||||
really is.
|
|
||||||
*hl-SpellBad*
|
*hl-SpellBad*
|
||||||
SpellBad Word that is not recognized by the spellchecker. |spell|
|
SpellBad Word that is not recognized by the spellchecker. |spell|
|
||||||
This will be combined with the highlighting used otherwise.
|
Combined with the highlighting used otherwise.
|
||||||
*hl-SpellCap*
|
*hl-SpellCap*
|
||||||
SpellCap Word that should start with a capital. |spell|
|
SpellCap Word that should start with a capital. |spell|
|
||||||
This will be combined with the highlighting used otherwise.
|
Combined with the highlighting used otherwise.
|
||||||
*hl-SpellLocal*
|
*hl-SpellLocal*
|
||||||
SpellLocal Word that is recognized by the spellchecker as one that is
|
SpellLocal Word that is recognized by the spellchecker as one that is
|
||||||
used in another region. |spell|
|
used in another region. |spell|
|
||||||
This will be combined with the highlighting used otherwise.
|
Combined with the highlighting used otherwise.
|
||||||
*hl-SpellRare*
|
*hl-SpellRare*
|
||||||
SpellRare Word that is recognized by the spellchecker as one that is
|
SpellRare Word that is recognized by the spellchecker as one that is
|
||||||
hardly ever used. |spell|
|
hardly ever used. |spell|
|
||||||
This will be combined with the highlighting used otherwise.
|
Combined with the highlighting used otherwise.
|
||||||
*hl-StatusLine*
|
*hl-StatusLine*
|
||||||
StatusLine status line of current window
|
StatusLine status line of current window
|
||||||
*hl-StatusLineNC*
|
*hl-StatusLineNC*
|
||||||
@ -4943,6 +4939,8 @@ Title titles for output from ":set all", ":autocmd" etc.
|
|||||||
Visual Visual mode selection
|
Visual Visual mode selection
|
||||||
*hl-WarningMsg*
|
*hl-WarningMsg*
|
||||||
WarningMsg warning messages
|
WarningMsg warning messages
|
||||||
|
*hl-Whitespace*
|
||||||
|
Whitespace "nbsp", "space", "tab" and "trail" in 'listchars'
|
||||||
*hl-WildMenu*
|
*hl-WildMenu*
|
||||||
WildMenu current match in 'wildmenu' completion
|
WildMenu current match in 'wildmenu' completion
|
||||||
|
|
||||||
|
@ -147,6 +147,7 @@ Highlight groups:
|
|||||||
|hl-Substitute|
|
|hl-Substitute|
|
||||||
|hl-TermCursor|
|
|hl-TermCursor|
|
||||||
|hl-TermCursorNC|
|
|hl-TermCursorNC|
|
||||||
|
|hl-Whitespace| highlights 'listchars' whitespace
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
4. Changed features *nvim-features-changed*
|
4. Changed features *nvim-features-changed*
|
||||||
|
@ -464,6 +464,7 @@ typedef enum {
|
|||||||
, HLF_CUL // 'cursurline'
|
, HLF_CUL // 'cursurline'
|
||||||
, HLF_MC // 'colorcolumn'
|
, HLF_MC // 'colorcolumn'
|
||||||
, HLF_QFL // selected quickfix line
|
, HLF_QFL // selected quickfix line
|
||||||
|
, HLF_0 // Whitespace
|
||||||
, HLF_COUNT // MUST be the last one
|
, HLF_COUNT // MUST be the last one
|
||||||
} hlf_T;
|
} hlf_T;
|
||||||
|
|
||||||
@ -472,7 +473,7 @@ typedef enum {
|
|||||||
#define HL_FLAGS { '8', '~', 'z', 'Z', '@', 'd', 'e', 'i', 'l', 'm', 'M', 'n', \
|
#define HL_FLAGS { '8', '~', 'z', 'Z', '@', 'd', 'e', 'i', 'l', 'm', 'M', 'n', \
|
||||||
'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', 'f', 'F', \
|
'N', 'r', 's', 'S', 'c', 't', 'v', 'V', 'w', 'W', 'f', 'F', \
|
||||||
'A', 'C', 'D', 'T', '-', '>', 'B', 'P', 'R', 'L', '+', '=', \
|
'A', 'C', 'D', 'T', '-', '>', 'B', 'P', 'R', 'L', '+', '=', \
|
||||||
'x', 'X', '*', '#', '_', '!', '.', 'o', 'q' }
|
'x', 'X', '*', '#', '_', '!', '.', 'o', 'q', '0' }
|
||||||
|
|
||||||
EXTERN int highlight_attr[HLF_COUNT]; /* Highl. attr for each context. */
|
EXTERN int highlight_attr[HLF_COUNT]; /* Highl. attr for each context. */
|
||||||
EXTERN int highlight_user[9]; /* User[1-9] attributes */
|
EXTERN int highlight_user[9]; /* User[1-9] attributes */
|
||||||
|
@ -245,7 +245,8 @@ typedef struct vimoption {
|
|||||||
"A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal," \
|
"A:DiffAdd,C:DiffChange,D:DiffDelete,T:DiffText,>:SignColumn,-:Conceal," \
|
||||||
"B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel," \
|
"B:SpellBad,P:SpellCap,R:SpellRare,L:SpellLocal,+:Pmenu,=:PmenuSel," \
|
||||||
"x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill," \
|
"x:PmenuSbar,X:PmenuThumb,*:TabLine,#:TabLineSel,_:TabLineFill," \
|
||||||
"!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine"
|
"!:CursorColumn,.:CursorLine,o:ColorColumn,q:QuickFixLine," \
|
||||||
|
"0:Whitespace"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* options[] is initialized here.
|
* options[] is initialized here.
|
||||||
|
@ -3409,7 +3409,7 @@ win_line (
|
|||||||
|| (c == ' ' && lcs_space && ptr - line <= trailcol))) {
|
|| (c == ' ' && lcs_space && ptr - line <= trailcol))) {
|
||||||
c = (c == ' ') ? lcs_space : lcs_nbsp;
|
c = (c == ' ') ? lcs_space : lcs_nbsp;
|
||||||
n_attr = 1;
|
n_attr = 1;
|
||||||
extra_attr = hl_attr(HLF_8);
|
extra_attr = hl_attr(HLF_0);
|
||||||
saved_attr2 = char_attr; // save current attr
|
saved_attr2 = char_attr; // save current attr
|
||||||
mb_c = c;
|
mb_c = c;
|
||||||
if (enc_utf8 && (*mb_char2len)(c) > 1) {
|
if (enc_utf8 && (*mb_char2len)(c) > 1) {
|
||||||
@ -3424,7 +3424,7 @@ win_line (
|
|||||||
if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ') {
|
if (trailcol != MAXCOL && ptr > line + trailcol && c == ' ') {
|
||||||
c = lcs_trail;
|
c = lcs_trail;
|
||||||
n_attr = 1;
|
n_attr = 1;
|
||||||
extra_attr = hl_attr(HLF_8);
|
extra_attr = hl_attr(HLF_0);
|
||||||
saved_attr2 = char_attr; // save current attr
|
saved_attr2 = char_attr; // save current attr
|
||||||
mb_c = c;
|
mb_c = c;
|
||||||
if (enc_utf8 && (*mb_char2len)(c) > 1) {
|
if (enc_utf8 && (*mb_char2len)(c) > 1) {
|
||||||
@ -3525,8 +3525,8 @@ win_line (
|
|||||||
c_extra = lcs_tab2;
|
c_extra = lcs_tab2;
|
||||||
}
|
}
|
||||||
n_attr = tab_len + 1;
|
n_attr = tab_len + 1;
|
||||||
extra_attr = hl_attr(HLF_8);
|
extra_attr = hl_attr(HLF_0);
|
||||||
saved_attr2 = char_attr; /* save current attr */
|
saved_attr2 = char_attr; // save current attr
|
||||||
mb_c = c;
|
mb_c = c;
|
||||||
if (enc_utf8 && (*mb_char2len)(c) > 1) {
|
if (enc_utf8 && (*mb_char2len)(c) > 1) {
|
||||||
mb_utf8 = TRUE;
|
mb_utf8 = TRUE;
|
||||||
|
@ -5916,6 +5916,7 @@ static char *highlight_init_both[] =
|
|||||||
"default link EndOfBuffer NonText",
|
"default link EndOfBuffer NonText",
|
||||||
"default link QuickFixLine Search",
|
"default link QuickFixLine Search",
|
||||||
"default link Substitute Search",
|
"default link Substitute Search",
|
||||||
|
"default link Whitespace NonText",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ describe('ui/cursor', function()
|
|||||||
blinkwait = 700,
|
blinkwait = 700,
|
||||||
cell_percentage = 25,
|
cell_percentage = 25,
|
||||||
cursor_shape = 'vertical',
|
cursor_shape = 'vertical',
|
||||||
hl_id = 45,
|
hl_id = 46,
|
||||||
id_lm = 46,
|
id_lm = 47,
|
||||||
mouse_shape = 0,
|
mouse_shape = 0,
|
||||||
short_name = 'ci' },
|
short_name = 'ci' },
|
||||||
cmdline_normal = {
|
cmdline_normal = {
|
||||||
@ -40,8 +40,8 @@ describe('ui/cursor', function()
|
|||||||
blinkwait = 700,
|
blinkwait = 700,
|
||||||
cell_percentage = 0,
|
cell_percentage = 0,
|
||||||
cursor_shape = 'block',
|
cursor_shape = 'block',
|
||||||
hl_id = 45,
|
hl_id = 46,
|
||||||
id_lm = 46,
|
id_lm = 47,
|
||||||
mouse_shape = 0,
|
mouse_shape = 0,
|
||||||
short_name = 'c' },
|
short_name = 'c' },
|
||||||
cmdline_replace = {
|
cmdline_replace = {
|
||||||
@ -50,8 +50,8 @@ describe('ui/cursor', function()
|
|||||||
blinkwait = 700,
|
blinkwait = 700,
|
||||||
cell_percentage = 20,
|
cell_percentage = 20,
|
||||||
cursor_shape = 'horizontal',
|
cursor_shape = 'horizontal',
|
||||||
hl_id = 45,
|
hl_id = 46,
|
||||||
id_lm = 46,
|
id_lm = 47,
|
||||||
mouse_shape = 0,
|
mouse_shape = 0,
|
||||||
short_name = 'cr' },
|
short_name = 'cr' },
|
||||||
insert = {
|
insert = {
|
||||||
@ -60,8 +60,8 @@ describe('ui/cursor', function()
|
|||||||
blinkwait = 700,
|
blinkwait = 700,
|
||||||
cell_percentage = 25,
|
cell_percentage = 25,
|
||||||
cursor_shape = 'vertical',
|
cursor_shape = 'vertical',
|
||||||
hl_id = 45,
|
hl_id = 46,
|
||||||
id_lm = 46,
|
id_lm = 47,
|
||||||
mouse_shape = 0,
|
mouse_shape = 0,
|
||||||
short_name = 'i' },
|
short_name = 'i' },
|
||||||
more = {
|
more = {
|
||||||
@ -76,8 +76,8 @@ describe('ui/cursor', function()
|
|||||||
blinkwait = 700,
|
blinkwait = 700,
|
||||||
cell_percentage = 0,
|
cell_percentage = 0,
|
||||||
cursor_shape = 'block',
|
cursor_shape = 'block',
|
||||||
hl_id = 45,
|
hl_id = 46,
|
||||||
id_lm = 46,
|
id_lm = 47,
|
||||||
mouse_shape = 0,
|
mouse_shape = 0,
|
||||||
short_name = 'n' },
|
short_name = 'n' },
|
||||||
operator = {
|
operator = {
|
||||||
@ -86,8 +86,8 @@ describe('ui/cursor', function()
|
|||||||
blinkwait = 700,
|
blinkwait = 700,
|
||||||
cell_percentage = 50,
|
cell_percentage = 50,
|
||||||
cursor_shape = 'horizontal',
|
cursor_shape = 'horizontal',
|
||||||
hl_id = 45,
|
hl_id = 46,
|
||||||
id_lm = 45,
|
id_lm = 46,
|
||||||
mouse_shape = 0,
|
mouse_shape = 0,
|
||||||
short_name = 'o' },
|
short_name = 'o' },
|
||||||
replace = {
|
replace = {
|
||||||
@ -96,8 +96,8 @@ describe('ui/cursor', function()
|
|||||||
blinkwait = 700,
|
blinkwait = 700,
|
||||||
cell_percentage = 20,
|
cell_percentage = 20,
|
||||||
cursor_shape = 'horizontal',
|
cursor_shape = 'horizontal',
|
||||||
hl_id = 45,
|
hl_id = 46,
|
||||||
id_lm = 46,
|
id_lm = 47,
|
||||||
mouse_shape = 0,
|
mouse_shape = 0,
|
||||||
short_name = 'r' },
|
short_name = 'r' },
|
||||||
showmatch = {
|
showmatch = {
|
||||||
@ -106,8 +106,8 @@ describe('ui/cursor', function()
|
|||||||
blinkwait = 175,
|
blinkwait = 175,
|
||||||
cell_percentage = 0,
|
cell_percentage = 0,
|
||||||
cursor_shape = 'block',
|
cursor_shape = 'block',
|
||||||
hl_id = 45,
|
hl_id = 46,
|
||||||
id_lm = 45,
|
id_lm = 46,
|
||||||
short_name = 'sm' },
|
short_name = 'sm' },
|
||||||
statusline_drag = {
|
statusline_drag = {
|
||||||
mouse_shape = 0,
|
mouse_shape = 0,
|
||||||
@ -121,8 +121,8 @@ describe('ui/cursor', function()
|
|||||||
blinkwait = 700,
|
blinkwait = 700,
|
||||||
cell_percentage = 0,
|
cell_percentage = 0,
|
||||||
cursor_shape = 'block',
|
cursor_shape = 'block',
|
||||||
hl_id = 45,
|
hl_id = 46,
|
||||||
id_lm = 46,
|
id_lm = 47,
|
||||||
mouse_shape = 0,
|
mouse_shape = 0,
|
||||||
short_name = 'v' },
|
short_name = 'v' },
|
||||||
visual_select = {
|
visual_select = {
|
||||||
@ -131,8 +131,8 @@ describe('ui/cursor', function()
|
|||||||
blinkwait = 700,
|
blinkwait = 700,
|
||||||
cell_percentage = 35,
|
cell_percentage = 35,
|
||||||
cursor_shape = 'vertical',
|
cursor_shape = 'vertical',
|
||||||
hl_id = 45,
|
hl_id = 46,
|
||||||
id_lm = 45,
|
id_lm = 46,
|
||||||
mouse_shape = 0,
|
mouse_shape = 0,
|
||||||
short_name = 've' },
|
short_name = 've' },
|
||||||
vsep_drag = {
|
vsep_drag = {
|
||||||
|
@ -200,57 +200,30 @@ describe('Default highlight groups', function()
|
|||||||
|
|
||||||
it('insert mode text', function()
|
it('insert mode text', function()
|
||||||
feed('i')
|
feed('i')
|
||||||
|
screen:try_resize(53, 4)
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^ |
|
^ |
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{1:-- INSERT --} |
|
{1:-- INSERT --} |
|
||||||
]], {[0] = {bold=true, foreground=Screen.colors.Blue},
|
]], {[0] = {bold=true, foreground=Screen.colors.Blue},
|
||||||
[1] = {bold = true}})
|
[1] = {bold = true}})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('end of file markers', function()
|
it('end of file markers', function()
|
||||||
|
screen:try_resize(53, 4)
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^ |
|
^ |
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
{1:~ }|
|
|
||||||
{1:~ }|
|
|
||||||
{1:~ }|
|
|
||||||
{1:~ }|
|
|
||||||
{1:~ }|
|
|
||||||
{1:~ }|
|
|
||||||
{1:~ }|
|
|
||||||
{1:~ }|
|
|
||||||
{1:~ }|
|
|
||||||
{1:~ }|
|
|
||||||
{1:~ }|
|
{1:~ }|
|
||||||
|
|
|
|
||||||
]], {[1] = {bold = true, foreground = Screen.colors.Blue}})
|
]], {[1] = {bold = true, foreground = Screen.colors.Blue}})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('"wait return" text', function()
|
it('"wait return" text', function()
|
||||||
|
screen:try_resize(53, 4)
|
||||||
feed(':ls<cr>')
|
feed(':ls<cr>')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
:ls |
|
:ls |
|
||||||
1 %a "[No Name]" line 1 |
|
1 %a "[No Name]" line 1 |
|
||||||
@ -259,23 +232,15 @@ describe('Default highlight groups', function()
|
|||||||
[1] = {bold = true, foreground = Screen.colors.SeaGreen}})
|
[1] = {bold = true, foreground = Screen.colors.SeaGreen}})
|
||||||
feed('<cr>') -- skip the "Press ENTER..." state or tests will hang
|
feed('<cr>') -- skip the "Press ENTER..." state or tests will hang
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('can be cleared and linked to other highlight groups', function()
|
it('can be cleared and linked to other highlight groups', function()
|
||||||
|
screen:try_resize(53, 4)
|
||||||
execute('highlight clear ModeMsg')
|
execute('highlight clear ModeMsg')
|
||||||
feed('i')
|
feed('i')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
^ |
|
^ |
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
-- INSERT -- |
|
-- INSERT -- |
|
||||||
]], {[0] = {bold=true, foreground=Screen.colors.Blue},
|
]], {[0] = {bold=true, foreground=Screen.colors.Blue},
|
||||||
[1] = {bold=true}})
|
[1] = {bold=true}})
|
||||||
@ -287,37 +252,19 @@ describe('Default highlight groups', function()
|
|||||||
^ |
|
^ |
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{1:-- INSERT --} |
|
{1:-- INSERT --} |
|
||||||
]], {[0] = {bold=true, foreground=Screen.colors.Blue},
|
]], {[0] = {bold=true, foreground=Screen.colors.Blue},
|
||||||
[1] = {foreground = Screen.colors.Red, background = Screen.colors.Green}})
|
[1] = {foreground = Screen.colors.Red, background = Screen.colors.Green}})
|
||||||
end)
|
end)
|
||||||
|
|
||||||
it('can be cleared by assigning NONE', function()
|
it('can be cleared by assigning NONE', function()
|
||||||
|
screen:try_resize(53, 4)
|
||||||
execute('syn keyword TmpKeyword neovim')
|
execute('syn keyword TmpKeyword neovim')
|
||||||
execute('hi link TmpKeyword ErrorMsg')
|
execute('hi link TmpKeyword ErrorMsg')
|
||||||
insert('neovim')
|
insert('neovim')
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
{1:neovi^m} |
|
{1:neovi^m} |
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
|
|
|
|
||||||
]], {
|
]], {
|
||||||
@ -330,18 +277,34 @@ describe('Default highlight groups', function()
|
|||||||
neovi^m |
|
neovi^m |
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
{0:~ }|
|
|
|
||||||
{0:~ }|
|
]], {[0] = {bold=true, foreground=Screen.colors.Blue}})
|
||||||
{0:~ }|
|
end)
|
||||||
{0:~ }|
|
|
||||||
{0:~ }|
|
it('Whitespace highlight', function()
|
||||||
{0:~ }|
|
screen:try_resize(53, 4)
|
||||||
{0:~ }|
|
execute('highlight NonText gui=NONE guifg=#FF0000')
|
||||||
{0:~ }|
|
execute('set listchars=space:.,tab:>-,trail:*,eol:¬ list')
|
||||||
|
insert(' ne \t o\tv im ')
|
||||||
|
screen:expect([[
|
||||||
|
ne{0:.>----.}o{0:>-----}v{0:..}im{0:*^*¬} |
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
{0:~ }|
|
{0:~ }|
|
||||||
|
|
|
|
||||||
]], {[0] = {bold=true, foreground=Screen.colors.Blue}})
|
]], {
|
||||||
|
[0] = {foreground=Screen.colors.Red},
|
||||||
|
[1] = {foreground=Screen.colors.Blue},
|
||||||
|
})
|
||||||
|
execute('highlight Whitespace gui=NONE guifg=#0000FF')
|
||||||
|
screen:expect([[
|
||||||
|
ne{1:.>----.}o{1:>-----}v{1:..}im{1:*^*}{0:¬} |
|
||||||
|
{0:~ }|
|
||||||
|
{0:~ }|
|
||||||
|
:highlight Whitespace gui=NONE guifg=#0000FF |
|
||||||
|
]], {
|
||||||
|
[0] = {foreground=Screen.colors.Red},
|
||||||
|
[1] = {foreground=Screen.colors.Blue},
|
||||||
|
})
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -510,7 +473,7 @@ describe("'listchars' highlight", function()
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
execute('highlight clear ModeMsg')
|
execute('highlight clear ModeMsg')
|
||||||
execute('highlight SpecialKey guifg=#FF0000')
|
execute('highlight Whitespace guifg=#FF0000')
|
||||||
execute('set cursorline')
|
execute('set cursorline')
|
||||||
execute('set tabstop=8')
|
execute('set tabstop=8')
|
||||||
execute('set listchars=space:.,eol:¬,tab:>-,extends:>,precedes:<,trail:* list')
|
execute('set listchars=space:.,eol:¬,tab:>-,extends:>,precedes:<,trail:* list')
|
||||||
@ -606,7 +569,7 @@ describe("'listchars' highlight", function()
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
execute('highlight clear ModeMsg')
|
execute('highlight clear ModeMsg')
|
||||||
execute('highlight SpecialKey guifg=#FF0000')
|
execute('highlight Whitespace guifg=#FF0000')
|
||||||
execute('set cursorline')
|
execute('set cursorline')
|
||||||
execute('set tabstop=8')
|
execute('set tabstop=8')
|
||||||
execute('set nowrap')
|
execute('set nowrap')
|
||||||
@ -653,7 +616,7 @@ describe("'listchars' highlight", function()
|
|||||||
[3] = {foreground=Screen.colors.Green1},
|
[3] = {foreground=Screen.colors.Green1},
|
||||||
})
|
})
|
||||||
execute('highlight clear ModeMsg')
|
execute('highlight clear ModeMsg')
|
||||||
execute('highlight SpecialKey guifg=#FF0000')
|
execute('highlight Whitespace guifg=#FF0000')
|
||||||
execute('highlight Error guifg=#00FF00')
|
execute('highlight Error guifg=#00FF00')
|
||||||
execute('set nowrap')
|
execute('set nowrap')
|
||||||
feed('ia \t bc \t <esc>')
|
feed('ia \t bc \t <esc>')
|
||||||
|
Loading…
Reference in New Issue
Block a user