Sublime Forum

Shortcuts and document type

#1

how can i make a shortcut like cmd (or super) + i to grab the selected text and replace it with \textit{selected text} ? and is it possible to do this shortcut work only when the document is defined as a latex document?

thank you.

0 Likes

#2

Sorry for the short answer, but take a look at:

sublimetext.info/docs/extensibil … ppets.html

Paraphrasing Obama, yes you can!

0 Likes

#3

Please be patient… the LaTeXTools plugin will have this functionality. FYI you can grab the most up-to-date version at GitHub:

github.com/SublimeText/LaTeXTools

CTRL+I (CMD-I on the Mac) is coming soon for sure. In the meantime, you can use the autocompletion system. IF you type

em

you will get \emph{}; a will exit the braces. Similarly, “it” gives you “\textit{}” in text mode and “\mathit{}” in math mode; “bf” gives you “\textbf{}”. It’s pretty cool!

0 Likes

#4

thanks for the quick replies. will look into that.

0 Likes