using Notepad++ how can i make a macro type situation in which a number increments?

前端 未结 6 1170
走了就别回头了
走了就别回头了 2021-01-07 19:48

for example i have about 500 lines. in the beginning of each line i want to add a number. so in line 1 i would want \"1)\" and then line 2 i would want \"2)\"

i know

6条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-07 19:48

    Notepad++ Macros only playback keyboard actions. They can't do anything dynamic.

    However there is a built-in(?) plugin that can do this for you.

    Highlight all the code, then choose "TextFX / TextFX Tools / Insert Line Numbers"

    One thing to be aware of is that it is the absolute line number within the file. You can't start numbering on line 10 and make it say line 03 or something like that.

提交回复
热议问题