I googled for word count vim and found a script https://gist.github.com/cormacrelf/d0bee254f5630b0e93c3. Example configuration using this function:
let g:lightline = {
\ 'active': {
\ 'right': [ [ 'lineinfo' ], [ 'percent', 'wordcount' ], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_function': {
\ 'wordcount': 'WordCount',
\ },
\ }
Hi, I tried your solution but it doesn't work - nothing is shown in the statusline... Do I have to enable/do something else to make this work? Calling the WordCount function directly does work, though.
Thanks a lot!
@andreas-bulling It works for me. Please paste your configuration or link to your vimrc.
Worked like a charm!
If you are having trouble with a separate file, just put the function directly into .vimrc
Most helpful comment
I googled for
word count vimand found a script https://gist.github.com/cormacrelf/d0bee254f5630b0e93c3. Example configuration using this function: