From 0446d4d6916d27041de5ac24ba0c741ae4ad5a39 Mon Sep 17 00:00:00 2001 From: Gabriel Holodak Date: Fri, 10 Nov 2017 23:27:00 -0500 Subject: Highlight backspaced characters --- runtime/syntax/man.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'runtime/syntax') diff --git a/runtime/syntax/man.vim b/runtime/syntax/man.vim index 0975b160ae..9eb613169c 100644 --- a/runtime/syntax/man.vim +++ b/runtime/syntax/man.vim @@ -18,6 +18,18 @@ highlight default link manOptionDesc Constant highlight default link manReference PreProc highlight default link manSubHeading Function +function! s:init_highlight_groups() + highlight default manUnderline cterm=underline gui=underline + highlight default manBold cterm=bold gui=bold +endfunction + +augroup man_init_highlight_groups + autocmd! + autocmd ColorScheme * call s:init_highlight_groups() +augroup END + +call s:init_highlight_groups() + if &filetype != 'man' " May have been included by some other filetype. finish -- cgit From 6740c94562cc1b271a6ea2458ebb847a6e3665e2 Mon Sep 17 00:00:00 2001 From: Gabriel Holodak Date: Thu, 30 Nov 2017 22:15:39 -0500 Subject: Add support for escape sequences --- runtime/syntax/man.vim | 1 + 1 file changed, 1 insertion(+) (limited to 'runtime/syntax') diff --git a/runtime/syntax/man.vim b/runtime/syntax/man.vim index 9eb613169c..0544fb29e2 100644 --- a/runtime/syntax/man.vim +++ b/runtime/syntax/man.vim @@ -21,6 +21,7 @@ highlight default link manSubHeading Function function! s:init_highlight_groups() highlight default manUnderline cterm=underline gui=underline highlight default manBold cterm=bold gui=bold + highlight default manItalic cterm=italic gui=italic endfunction augroup man_init_highlight_groups -- cgit From eb44519b5debf740f692bb4ea19ad83b29749484 Mon Sep 17 00:00:00 2001 From: Gabriel Holodak Date: Sun, 24 Dec 2017 12:16:58 -0500 Subject: Address PR comments --- runtime/syntax/man.vim | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'runtime/syntax') diff --git a/runtime/syntax/man.vim b/runtime/syntax/man.vim index 0544fb29e2..b8e605cb9a 100644 --- a/runtime/syntax/man.vim +++ b/runtime/syntax/man.vim @@ -18,18 +18,9 @@ highlight default link manOptionDesc Constant highlight default link manReference PreProc highlight default link manSubHeading Function -function! s:init_highlight_groups() - highlight default manUnderline cterm=underline gui=underline - highlight default manBold cterm=bold gui=bold - highlight default manItalic cterm=italic gui=italic -endfunction - -augroup man_init_highlight_groups - autocmd! - autocmd ColorScheme * call s:init_highlight_groups() -augroup END - -call s:init_highlight_groups() +highlight default manUnderline cterm=underline gui=underline +highlight default manBold cterm=bold gui=bold +highlight default manItalic cterm=italic gui=italic if &filetype != 'man' " May have been included by some other filetype. -- cgit From 9ebe2ad3312088d1a899e830bd414d4893c3e073 Mon Sep 17 00:00:00 2001 From: "Vadim A. Misbakh-Soloviov" Date: Sun, 25 Mar 2018 20:45:02 +0700 Subject: runtime/dircolors.vim: support termguicolors (#8175) --- runtime/syntax/dircolors.vim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'runtime/syntax') diff --git a/runtime/syntax/dircolors.vim b/runtime/syntax/dircolors.vim index 1b598c39b5..3d7f63dc55 100644 --- a/runtime/syntax/dircolors.vim +++ b/runtime/syntax/dircolors.vim @@ -32,7 +32,7 @@ syntax match dircolorsEscape '\\[abefnrtv?_\\^#]' syntax match dircolorsEscape '\\[0-9]\{3}' syntax match dircolorsEscape '\\x[0-9a-f]\{3}' -if !has('gui_running') && &t_Co == '' +if !(has('gui_running') || &termguicolors) && &t_Co == '' syntax match dircolorsNumber '\<\d\+\>' highlight default link dircolorsNumber Number endif @@ -84,7 +84,7 @@ endfunction function! s:get_hi_str(color, place) abort if a:color >= 0 && a:color <= 255 - if has('gui_running') + if has('gui_running') || &termguicolors return ' gui' . a:place . '=' . s:termguicolors[a:color] elseif a:color <= 7 || &t_Co == 256 || &t_Co == 88 return ' cterm' . a:place . '=' . a:color @@ -169,7 +169,7 @@ function! s:preview_color(linenr) abort \ ' "\_s\zs' . colordef . '\ze\_s"' let hi_attrs_str = '' if !empty(hi_attrs) - if has('gui_running') + if has('gui_running') || &termguicolors let hi_attrs_str = ' gui=' . join(hi_attrs, ',') else let hi_attrs_str = ' cterm=' . join(hi_attrs, ',') @@ -199,11 +199,11 @@ endfunction let b:dc_next_index = 0 -if has('gui_running') +if has('gui_running') || &termguicolors call s:set_guicolors() endif -if has('gui_running') || &t_Co != '' +if has('gui_running') || &termguicolors || &t_Co != '' call s:reset_colors() autocmd CursorMoved,CursorMovedI call s:preview_color('.') -- cgit