Author Topic: Wrap It Up With "Surround With"  (Read 7312 times)


  • Senior Community Member
  • Posts: 238
  • Hero Points: 24
  • User-friendly geek-speak translator extraordinaire
Wrap It Up With "Surround With"
« on: April 01, 2008, 02:24:46 PM »
If you need to wrap a selection with a structure or any other text, use the Surround With feature. For example, in C/C++, you may want to surround a code block with braces, or in HTML, you may want to wrap a selection with start and end tags. Common wrappers for each supported language are predefined. To use Surround With, first select the text that you want to surround. Then, right-click and select Surround Selection With from the context menu (or use the surround_with command). The Surround With dialog is displayed. Select the structure you want to wrap around your selection, line, or code block, and click OK.

Bonus tip: If you find yourself using Surround With a lot, bind surround_with to a key or key sequence. I use it so much in HTML and DocBook that I bind the command to Ctrl+W, which is an otherwise unused sequence for me and easy to remember and use. See "key bindings: creating" in the Help > Index for instructions on binding commands to keys.
« Last Edit: May 15, 2008, 01:47:46 PM by Lisa »