Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Insertion of LineNumber

    Help wanted · · · – – – · · ·
    2
    2
    2039
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Philippe Giraud
      Philippe Giraud last edited by

      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

      1 Reply Last reply Reply Quote 0
      • Jim Dailey
        Jim Dailey last edited by

        @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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright © 2014 NodeBB Forums | Contributors