Menu

How to count no of lines in all open tabs?

SashaY
2009-06-09
2012-11-13
  • SashaY

    SashaY - 2009-06-09

    Is it possible to count lines of code in all opened tabs?
    Thanks,

     
    • cchris

      cchris - 2009-06-09

      I'm not sure there is a simple way to do that, since several tabs may relate to the same file, and you must avoid counting the lines twice.

      Also, do blank/comment lines count? What if some opened document does not contain code?
      Does
      int n1;
      int n2;

      count for 2 lines, while
      int n1, n2;

      counts for 1?

      Net result: that could be an idea for a plugin writer. But the specification at this point is woefully incomplete.

      CChris

       
      • Fool4UAnyway

        Fool4UAnyway - 2009-06-09

        My simple reasoning dictates me the following, if I want to simply know the total number of lines for all opened documents.

        Do a Find in open documents with Regular Expression mode and as search string ^.*$

        I guess the results would show all lines, this is not very convenient, but it would also show the total number of matches... voila.