Share

You can certainly do it easily enough with styles.    Format a snippet of code the way you want it to appear (indentation, font face, font size, etc.) and select it.  Right-click and from the drop-down that appears select Styles, then Save Selection As a New Quick Style.

Give it a name and click on Modify…

Make sure this style is available to all documents by clicking on New documents based on this template.

Now you can add a shortcut to the style.  Click on the Format button at the bottom and select Shortcut Key.

Select a combination of keys.  In this case I chose Shift+Ctrl+Alt+C (which is currently unassigned).

Click on the Assign button to assign the shortcut to those keys.  Now whenever you enter a code snippet, select it and press Shift+Ctrl+Alt+C.

 

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Share