-1

Many compilers will only take into account active lines when counting line numbers, and ignore those who are empty or entirely commented out, whereas NPP is counting them. In case of an error, it means I cannot find the incriminated line and have to use search.

Is there a way to only count active lines in NPP?

eddie
  • 415
  • 4
  • 13
  • Which compiler? – mjwills May 25 '19 at 03:54
  • https://stackoverflow.com/a/35093275/34092 ? – mjwills May 25 '19 at 03:55
  • It's not about removing empty lines, it's about abstracting them while counting line numbers – eddie May 25 '19 at 04:28
  • 1
    Npp is an editor, not a compiler. This can't be done. – Toto May 25 '19 at 08:50
  • Suggest use development environment suitable for your language. It will integrate the compilation and messages into the code. The leading development environment are technology specific and require extensive experience. For students I suggest simple `VS Code` or `Eclipse`. – Dudi Boy May 27 '19 at 14:29
  • What forms of `comments` can you find? Are there multiline comments? What are the syntax for both cases? – Julio Jun 02 '19 at 15:46

1 Answers1

0

The problem I guess is that npp doesn't know implicitly what an active line to a compiler means.

As @mjWills mentioned, I think you can achieve this by

  • removing the blank lines (which will be ignored by compiler)
  • removing the comments etc (by using regex, bookmark lines, remove bookmarked lines from menu)

depends on the language and compiler you are using ..

Monster Brain
  • 1,950
  • 18
  • 28
  • How is this answering the question? It should be a comment. – Toto May 25 '19 at 08:49
  • He wants NPP to show active lines. I just showed him my solution. It's too long for a comment I guess. Just specific for his use case I guess. Maybe I'll move it comment later. – Monster Brain May 25 '19 at 08:53