Set languages with custom keyboard shortcuts

You can use a custom keyboard shortcut to set a language. To do this, follow the steps below.

  • Make sure that the syntax coloring mode is “active” (i.e., “selected” in the Preferences pane of SnippetsLab).

  • Choose Editor > Syntax Coloring from the menu bar and take note of the name of the syntax coloring mode that you want to create a shortcut—for example, Objective-C.

  • Open System Settings, choose Keyboard, then select Keyboard Shortcuts.

  • Choose App Shortcuts from the left list and click the + button below the right list.

  • Choose SnippetsLab in the Application field and enter the exact name of the language you obtained in step 2 in the Menu Title field. Enter your desired key combination in the Keyboard Shortcut field.

  • Click Add to submit.

  • All done! Now you can press your assigned keyboard shortcut to set the currently displayed snippet’s language.

To learn more about app-specific shortcuts, see Create keyboard shortcuts for apps.

img-lang-shortcut