From 6749ecfac5621834e7a141b17b102155eac60156 Mon Sep 17 00:00:00 2001 From: jdhao Date: Fri, 9 Oct 2020 01:07:15 +0800 Subject: [PATCH] clear cmdline msg after some time --- autocommands.vim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/autocommands.vim b/autocommands.vim index 7355538..aea00de 100644 --- a/autocommands.vim +++ b/autocommands.vim @@ -64,4 +64,16 @@ augroup highlight_yank autocmd! au TextYankPost * silent! lua vim.highlight.on_yank{higroup="YankColor", timeout=300} augroup END + +" Clear cmd line message +function! s:empty_message(timer) + if mode() !=# 'c' + echo '' + endif +endfunction + +augroup cmd_msg_cls + autocmd! + autocmd CmdlineLeave : call timer_start(5000, funcref('s:empty_message')) +augroup END "}