Conversation
min() comparing to if-condition, has almost the same perfermance,(in fact, min() is tiny faster than if-condition in most test cases), and min() looks more clear
Faster for large file
|
WIP,请先别合并。 |
|
嗯,期待~ |
请问为什么要
|
force highlight on WinEnter and don't clear for other windows
|
那个是强制更新时用的。比如说颜色高亮出问题了,先清一遍,再重新高亮。 |
|
历时太久,很多细节我也不记得了。我有空看看你的修改。 |
好的,我觉得可以将其删掉。 |
There was a problem hiding this comment.
我认为不需要。因为后面还有BufEnter。
There was a problem hiding this comment.
:gui 命令并不会触发 BufEnter 的呀。
我并没有查到相关都文档说明这个。而且:gui还是会高亮的。
There was a problem hiding this comment.
但是不会高亮带 alpha 值的颜色,比如 rgba(255,0,255,0.5) 这种。
|
可惜没有一个 |
嗯,或者一个 |
|
@lilydjwg ,Hi 依云,今天浏览vim的doc,发现有个 diff --git a/autoload/colorizer.vim b/autoload/colorizer.vim
index 82bd3de..a974292 100644
--- a/autoload/colorizer.vim
+++ b/autoload/colorizer.vim
@@ -308,9 +308,7 @@ function! colorizer#ColorHighlight(update, ...) "{{{1
autocmd CursorMoved,CursorMovedI * silent call s:CursorMoved()
endif
" rgba handles differently, so need updating
- autocmd GUIEnter * silent call colorizer#ColorHighlight(1)
- autocmd BufEnter * silent call colorizer#ColorHighlight(1)
- autocmd WinEnter * silent call colorizer#ColorHighlight(1)
+ autocmd Syntax * silent call colorizer#ColorHighlight(1)
autocmd ColorScheme * let s:force_group_update=1 | silent call colorizer#ColorHighlight(1)
augroup END
endfunction至少切换 |
|
@UncleBill 这个是在 |
问题:打开或进入大文件
buffer会特别卡。解决:只处理当前的可见范围。