More custom embedding using CodeRush

I’ve just read Mark Miller’s post regarding this other great post on how to create custom embedding using CodeRush. I had actually done that before, but had not hooked it up to shortcuts. That’s extremely easy, useful, and fun!

That got me to go back and improve my custom embedding that wraps up a selection into either an if-block or else-if block. I’ve customized it so that when I have some code selected in the editor, I can hit either i (as in if) or e (as in else), which causes the code to be wrapped in an if or if-else block, respectively:

if[7] 

if[5]

Below is what my custom if-else embedding looks like (you can figure out the if one…):

embbed

And this is what the shortcut look like:

shortcut

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: