Insertion of LineNumber
-
Hello all.
I just discover NP++, and I think it’s the better tool I’ve ever seen.
I have just a question : Is it possible to make a macro for example to insert in a line the number of the line itself ?
To obtain this sort of thing :
logit (“my debug : line #5447 - zz : '” + zz + “'”);
Many thanks for your answers.Cigalou
-
@Philippe-Giraud Not sure exactly what you want to do.
If you just want to see line numbers, then use the menus: Settings–>Preferences–>Editing and check the Display line number checkbox.
If you want to actually insert line numbers into a file, then you can do it using Edit–>Column Editor…. Begin by moving the cursor to the very beginning of the file, then press Alt-C (or use the menu entry Edit–>Column Editor…), select the Number to Insert button, then fill in the options as you desire. When you press OK, the numbers will be inserted into the file as text. That is, this:
=============================================================================== TOPIC: HOTKEYS (INCLUDING MOUSE-RELATED): =============================================================================== Tagging: (needs TagsJump) Find Definition -- <Alt>+<Down Arrow> Return from Definition -- <Alt>+<Up Arrow> Generate tags file -- <Alt>+t
will change to something like this:
01=============================================================================== 02TOPIC: HOTKEYS (INCLUDING MOUSE-RELATED): 03=============================================================================== 04 05Tagging: (needs TagsJump) 06 07 Find Definition -- <Alt>+<Down Arrow> 08 Return from Definition -- <Alt>+<Up Arrow> 09 Generate tags file -- <Alt>+t
Regards,
Jim