Is there a shortcut, plugin or code to wrap text with quotation marks (""
or ''
) in Notepad++?
Eg "text"
.
I don't know Python and other advanced programming languages, so please explain in a simple way ...
To create the new macro functions:
Into "macro" section add the following code:
<Macro name="Selection Into Double Quotes" Ctrl="yes" Alt="yes" Shift="no" Key="50">
<Action type="0" message="2177" wParam="0" lParam="0" sParam="" />
<Action type="1" message="2170" wParam="0" lParam="0" sParam='"' />
<Action type="0" message="2179" wParam="0" lParam="0" sParam="" />
<Action type="1" message="2170" wParam="0" lParam="0" sParam='"' />
</Macro>
<Macro name="Selection Into Single Quotes" Ctrl="yes" Alt="yes" Shift="no" Key="49">
<Action type="0" message="2177" wParam="0" lParam="0" sParam="" />
<Action type="1" message="2170" wParam="0" lParam="0" sParam="'" />
<Action type="0" message="2179" wParam="0" lParam="0" sParam="" />
<Action type="1" message="2170" wParam="0" lParam="0" sParam="'" />
</Macro>
Save, close, the file, restart N++: You will find the new functions into "Macro" Menu.
To use it: Simply select the text and choose the desired menu item or use the desired keyboard shortcut showed at the right side of the menu item itself.
I'm not sure if you want the whole line or just each word. This will do each line:
Open replace (ctrl H)
Find: ^.
Replace with: "
make sure you select "regular expression" in the search mode.
Select replace all.
That will add a " at the start of each non-blank link.
For the ending one:
Find: .$
Replace with: "
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