vim-capslock
vim-capslock copied to clipboard
Using CmdlineLeave to disable automatically
My first pull request! haha. So, I manage to get capslock disable automatically when leaving cmdline. Vim does not refresh the statusline when entering an ex command (discussed in this link), then I put this in .vimrc to get statusline working:
autocmd CmdlineEnter * redraws
autocmd CmdlineChanged * redraws
Cmap:
cmap <c-l> <plug>CapsLockToggle
And it's working! \o/
Feel free to correct me, I'm adventuring into vimscript and Github!
I haven't had a chance to test this so I'm just going to trust that it works, thanks!
Actually CmdlineLeave
was added in 8.0.1206, this needs a version guard.