Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #19911
    jic
    Participant

    Greetings!

    I am trying to find out if there is a way of counting the highlighted lines. I know I can subtract the top from the bottom, but, it would be nice to have a footer with the line count of the highlighted lines. This is good when you are creating groups of items and they all need to be the same amount of lines. Highlighting it will tell you the line count and you can check if you are missing or have extra, etc. Is this a possibility? Thanks.

    #19913
    Stefan
    Participant

    “””have a footer with the line count of the highlighted lines”””

     
    Try     “Tools > Customize… >       [Status]   >   [X] Number of Lines”

     

    #19928
    jic
    Participant

    So easy. Thanks.

    #30318
    jic
    Participant

    Ok, so highlighted lines in sequences work. But, I would like to count highlighted lines that are not sequencial. For example:
    a
    b
    c
    d
    e
    f
    g

    if I highlight a, b, and c, the highlighted line status shows 3/7. However, if I choose a, c, e and f, the highlighted line status shows 0/7. That is not correct. How do I fix this, or is this a bug? I am using version 25.2.0. Thanks.

    #30319
    Patrick C
    Participant

    Perhaps you ticked the wrong boxes.

    “Tools > Customize… > [Status] > [X] Number of Lines”

    Actually reads
    Number of Lines (in the selection/total)
    So this has nothing to do with bookmarks.
    The option to display the number of bookmarked lines in the status bar is.
    Tools → Customize… → Status → Bookmark Count in the Entire Document

    In version 25.2.0 the status bar then displays.
    … | 0/7 lines | 4 Bookmarks

    4 Bookmarks actually means “4 bookmarked lines”. Adjacent bookmarked lines are counted individually, i.e. are seen as separate bookmarks.

    #30320
    Patrick C
    Participant

    Sorry, just realised that what you mean by “highlighted lines” is “lines in the selection(s)” rather than bookmarks.
    In my case EmEditor’s behaviour with selected lines is just as you described.

    #30321
    Patrick C
    Participant

    What you could do is bookmark the lines in the selection(s) (Ctrl + F2) and then remove the bookmarks (Ctrl + F2).
    However, this will only work well when your document hasn’t got any pre-existing bookmarked lines.

    #30322
    jic
    Participant

    I can’t be bookmarking the lines all the time. I do a lot of reporting and I copy the data to EmEditor and massage it, search/replace, etc. in EmEditor. But, as I do things, I want to know the count of certain lines that contain specific charateristics. I don’t like to compare, but this is possible in Notepad++. I don’t know why it’s not available in EmEditor. It should be.

    #30323
    Patrick C
    Participant

    You could do the following regular expression search, limit it to the selection(s) and count the matches:
    .*
    Regex search for .* in the selection + count matches.
    EmEditor’s status bar will display both the number of lines and the number of selections.

    Moreover, the search could be automated in a macro.

    PS Though, I’d suggest to first wait for Yutaka’s opinion on whether this is intended or rather an oversight that will be fixed in one of the next updates.

    #30324
    Yutaka Emura
    Keymaster

    PS Though, I’d suggest to first wait for Yutaka’s opinion on whether this is intended or rather an oversight that will be fixed in one of the next updates.

    Could you clarify the issue/question? Thank you.

    #30325
    jic
    Participant

    I know how to do too, but, what I need is simpler.

    #30326
    jic
    Participant

    To replicate my problem, follow these steps:
    – open a new document in emeditor
    – copy this string:
    <string>
    a
    b
    c
    d
    e
    f
    g
    </string>
    – paste that string on the new document.
    – double click on the line containing a
    – hit the CTRL key and click on the c, e and g with the CTRL key pressed.
    – look at the bottom right of the emeditor, it shows “0/7 lines” when it should say “4/7 lines”.

    Now, hightlight a, b and c, it shows 3/7 lines.

    #30327
    Patrick C
    Participant

    Status bar word and line count fail when multiple selections are present

    #30332
    Yutaka Emura
    Keymaster

    Thank you for bringing this to my attention.
    The character count was correct because it included newlines (CR+LF) when the “Always insert newlines when copying multiple selections” option is enabled on the Edit page in Customize. However, I will change this behavior in the next version. The word and line counts will also be fixed in the next version.

    #30334
    jic
    Participant

    Thank you, Yutaka.

    #30336
    Patrick C
    Participant

    Thank you from my side too Yutaka!

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.