Vim is a wonderfully extensible text editor. I use it to work with all sorts of
text. While I was browsing reddit, I saw a thread asking for a way to prevent
:number from counting blank lines. I checked it out to see if there were any
cool answers. None of what I saw were adequate. For instance, :%s/\S\+//n
makes every match highlight, clobbering the last text that was searched for.
I figured it was time for me to learn a little more about Vimscript, and so I
wrote a function that will tell you how many actual lines of code are in your
file:
Read more...