Multi-cursor in Notepad++ You can easily do it by pressing Shift + Alt + down arrow . Then we press Shift +Alt + the down arrow by selecting the lines that we want to start editing.
Select the lines you want and then press: Windows: Shift + Alt + i. Mac: shift + option + i.
You can get this in notepad++ with CTRL+ALT+Move Mouse to where you want across multiple lines, but I want to be able to do this with keyboard shortcuts across the entire document.
Yes: simply press and hold the Alt key, click and drag to select the lines whose columns you wish to edit, and begin typing.
You can also go to Settings > Preferences..., and in the Editing tab, turn on multi-editing, to enable selection of multiple separate regions or columns of text to edit at once.
It's much more intuitive, as you can see your edits live as you type.
In the position where you want to add text, do:
Shift
+ Alt
+ down arrow
and select the lines you want. Then type. The text you type is inserted on all of the lines you selected.
You can add/edit content on multiple lines by using control button. This is multi edit feature in Notepad++, we need to enable it from settings. Press and hold control, select places where you want to enter text, release control and start typing, this will update the text at all the places selected previously.
Ref: http://notepad-plus-plus.org/features/multi-editing.html
Notepad++ also handles multiple cursors now.
Go into Settings => Preferences => Editing and check "Enable" in "Multi editing settings" Then, just use Ctrl+click to use multiple cursors.
Feature demo on official website here : https://npp-user-manual.org/docs/editing/
You can use Edit > Column Editor...
to insert text at the current and following lines. The shortcut is Alt + C.
Notepad++ has a powerful regex engine, capable to search and replace patterns at will.
In your scenario:
Click the menu item Search\Replace...
Fill the 'Find what' field with the search pattern:
^(\d{4})\s+(\w{3})\s+(\w{3})$
Fill the replace pattern:
Insert into tbl (\1, \2) where clm = \3
Click the Replace All
button.
And that's it.
The easiest method to solve your problem (without going to a different editor or learning regex) is to record a macro.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With