Skip to content

Commit

Permalink
update vimplus
Browse files Browse the repository at this point in the history
chxuan committed Aug 12, 2018
1 parent eadfc3d commit 98a0af6
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ftplugin/vim/vim.vim
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
autocmd BufEnter .vimrc execute ":call EnterVimrc()"
autocmd BufLeave .vimrc execute ":call LeaveVimrc()"

let s:lines = []

function! EnterVimrc()
if match(getline(18), "vimplus") != -1
call timer_start(0, 'HighlightLogoAsync', {'repeat': 1})
@@ -42,9 +44,12 @@ function! s:highlight_logo()
highlight default 240a130 ctermfg=240 ctermbg=130 cterm=bold
highlight default 87a83 ctermfg=87 ctermbg=83 cterm=bold

" let lines = readfile(expand($HOME . "/.vim/ftplugin/vim/vimplus_logo_light.txt"))
let lines = readfile(expand($HOME . "/.vim/ftplugin/vim/vimplus_logo_black.txt"))
for line in lines
if empty(s:lines)
" let s:lines = readfile(expand($HOME . "/.vim/ftplugin/vim/vimplus_logo_light.txt"))
let s:lines = readfile(expand($HOME . "/.vim/ftplugin/vim/vimplus_logo_black.txt"))
endif

for line in s:lines
let ret = split(line, "-")
call matchaddpos(ret[2], [[ret[0], ret[1] + 2]], 10, -1)
endfor

0 comments on commit 98a0af6

Please sign in to comment.