Notepad++ Multi editing

前端 未结 9 1425
一向
一向 2020-12-12 13:09

How can I have multiple cursors in Notepad++?

I will have a couple of tab delimited values . I need to write a query for all of these values. For example, if I get a

9条回答
  •  天涯浪人
    2020-12-12 13:52

    The easiest method to solve your problem (without going to a different editor or learning regex) is to record a macro.

    • Place your cursor at the start of your text, click the 'record' button in the ribbon, and then edit just that one row of text. You may only use arrow keys or ctrl+arrow keys to move around characters/words rather than clicking with your mouse. The 'home' and 'end' keys are also useful.
    • When you're finished with that one line, move your cursor (again without using the mouse) to the start of the next line.
    • Click the 'stop recording' button.
    • Click the 'play macro' button to check that it works on the next line as expected.
    • Click the 'run macro multiple times' to do it again, and again, and again... :P
    One advantage of this over 'multi-editing' cursors is you don't have to manually click and place cursors on every single row. The second advantage is that you can work with tab-delimited data that doesn't have consistent size/length - just use ctrl+left/right to skip words.

    Honestly, macros in N++ have saved about a year of my life.

提交回复
热议问题