Automatic selected text wrapping

Code Writer App Suggestions and Support Forum

Posted 11 years ago by Mikko Tikkanen
Avatar

When I select text and press any of the keys that usually starts a block of sorts...

',",(,{,[

...the editor should wrap the selected text with said "block markers" (since it's really rare case when any of these will be pressed in order to overwrite anything). Also, this could do automatic quote escaping as well, so that if I want to wrap the text with quotes, quotes inside the selected text block would be escaped automatically...

" -> \"

So...

Mike "Mad" Meyers -> "Mike \"Mad\" Meyers"

 

Bonus round - This could be taken step further and do intelligent HTML element wrapping (instead of hotkeys). So, with text selected I press...

<

...the selected text would immediately be wrapped with empty element blocks...

<|>selected text</>

...cursor("|") being in the middle of the beginning block. When I hit the next keys...

div

...these keypresses would be replicated to the ending block and thus I'd have block of text wrapped with div -element. Ta-daa!

<div>selected text</div>

 

This would be really cool if I'd just done multi-line select, that it would also indent the stuff.

So...

text
on
multiple
lines   

...would become...

<div>
    text
    on
    multiple
    lines   
</div>  

Comments (1)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Mikko,

Those are interesting ideas.  Thanks for the suggestions.


Actipro Software Support

The latest build of this product (v4.2.42) was released 4 years ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.