vimwiki

Personal wiki for vim
git clone https://github.com/vimwiki/vimwiki.git
Log | Files | Refs | README | LICENSE

commit a241d458ab6155a7278d60f0b543949dad18ad1f
parent a1f1b9c290000af493bc03558ed3e12a235f162a
Author: Tinmarino <tinmarino@gmail.com>
Date:   Sun,  9 Aug 2020 21:22:04 -0400

Syntax: Emoji faster conceal with keyword

Diffstat:
Mautoload/vimwiki/emoji.vim | 3++-
Mdoc/vimwiki.txt | 4++--
Msyntax/vimwiki.vim | 13+++++++------
3 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/autoload/vimwiki/emoji.vim b/autoload/vimwiki/emoji.vim @@ -1768,8 +1768,9 @@ endfunction " Conceal function! vimwiki#emoji#apply_conceal() abort + syn iskeyword 0-9,a-z,A-Z,:-: for [name, emoji] in items(s:emoji_single) - exe 'syn match VimwikiEmoji ":' . name . ':" conceal cchar=' . emoji + exe 'syn keyword VimwikiEmoji :' . name . ': conceal cchar=' . emoji endfor endfunction diff --git a/doc/vimwiki.txt b/doc/vimwiki.txt @@ -3579,7 +3579,7 @@ The default is %%%s. ------------------------------------------------------------------------------ *g:vimwiki_emoji_enable* -Bitfield: Enable/disable emoji conceal and complete (with |i_CTRL-X_CTRL-U|). +Bitfield: Enable/disable emoji conceal and complete Note that the |completefunc| is only set if it does not exists already to keep other plugin works by default. It can be set it manualy with: > set completefunc=vimwiki#emoji#complete @@ -3592,7 +3592,7 @@ Emoji features hard copied from https://github.com/junegunn/vim-emoji Value Description~ 0 Disable emoji support 1 Enable emoji conceal -2 Enable emoji complete +2 Enable emoji complete (with |i_CTRL-X_CTRL-U|) 3 Enable both Default: 3 diff --git a/syntax/vimwiki.vim b/syntax/vimwiki.vim @@ -347,12 +347,6 @@ let s:typeface_dic = vimwiki#vars#get_syntaxlocal('dTypeface') call vimwiki#u#hi_typeface(s:typeface_dic) -" Emoji: :dog: (after tags to take precedence) -if and(vimwiki#vars#get_global('emoji_enable'), 1) != 0 && has('conceal') - call vimwiki#emoji#apply_conceal() -endif - - " Link highlighting groups """""""""""""""""""""""""" @@ -513,4 +507,11 @@ for u in syntax_dic.dTypeface.eq \ . ' keepend oneline '. b:vimwiki_syntax_concealends endfor +" Emoji: :dog: (after tags to take precedence, after nested to not be reset) +if and(vimwiki#vars#get_global('emoji_enable'), 1) != 0 && has('conceal') + call vimwiki#emoji#apply_conceal() + exe 'syn iskeyword '.&iskeyword.',-,:' +endif + + syntax spell toplevel