[TxMt] Word Count

Jonas Steverud jtvrud at bredband.net
Tue May 27 21:11:47 UTC 2008


20 maj 2008 kl. 20.07 skrev Patrick McElhaney:
> CTRL+SHIFT+N. It's in the "Text" bundle.

One should make a note though that C-S-N doesn't return the number of  
characters, but the number of bytes. This is only an issue if you use  
multi-byte character, which is commonly enough to make the C-S-N  
command a bit broken IMHO.

I would be very grateful if anyone could point to a function that  
does the equivalent of C-S-N but returns the proper number of  
characters and not bytes (the ideal would be "full" statistics;  
words, characters and bytes). I made a quick hack but realised that I  
did not know how to tell Perl what character encoding there where,  
i.e. that it was UTF-8 or Latin-1.

Thanks.

/Jonas



More information about the textmate mailing list