Still, I think the following function works great!
function! WordCount()
let s:old_status=v:statusmsg
exe "silent normal g\<c-g>"
let s:word_count=str2nr(split(v:statusmsg)[11])
let v:statusmsg=s:old_status
return s:word_count
endfunction
As for the errors when open the macvim, I think it may be lying on this sentence
exe "silent normal g\<c-g>"
It seems like this command does not execute at all.
The function can update the statusline instantly as I type. So if anyone can solve this
problem, it will be well appreciate.
Thanks!
Arthur Lee
Sent with Sparrow
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment