I'm used to textmate and I'm looking for an editor on Windows that supports this. Notepad++ seems cool, but I when I have some text selected and type an opening bracket it replaces the text with the bracket instead of wrapping it inside brackets. Can this be enabled somehow ?
2 Answers
You can try this:
First select the lines that you want surrounded. Then goto:
TextFX > TextFX Edit > Indent and surround {text line }
I don't know if there is a short cut assigned by default for this, but I'm sure that you can make a quick macro if you need it.
Hope this helps some.
I am just using notepad++ as "glorified text editor" for editing text (i.e. no coding), but in order to quickly wrap text in brackets or delete such brackets, I recorded and saved to macros: (i) cut marked text, then insert open and close parenthesis, then paste the text back in, and (ii) cut text, press delete the remaining characters before and after the cursor position, re-paste text.
I did this using the "record macro" and "save macro" functions built into notepad++, and mapped both to ctrl-alt-shift-up-arrow (for parent. wrap) and ctrl-alt-shift-down arrow (for removal of parentheses), since I mostly use this function when I am navigating the text with the cursor keys and will use ctrl-shift-arrow keys to mark text before invoking the macro.
So far, it's working for me...