I want to add another shortcut to compile a document in Texpad.

The default one is cmd + T, while I'd like to create another one with cmd + enter (enter key).

Here you can find a short guide about snippet on Texpad for OS X.

A sample code used to create a bold text is

% Snippet to make text bold
% Insert a \textbf command, or surround any selected text with \textbf
ctrl key = b
group = Inline
insert at cursor = \textbf{<SELECTION>}

I can simply change the b with enter, but I don't know how to make the command running the whole document just written.


What you are trying to do is not what snippets are meant for:

Since version 1.5, Texpad has supported Snippets functionality to make it easy to insert regularly used blocks of text into your document.

Build scripts, on the other hand, let you define custom build sequences but as far as I know there's no way to set a different shortcut to each of them (you usually select a script from the Typeset menu and keep using cmd+T to build the project).

A workaround is replacing cmd+T by cmd+enter (I know it isn't exactly what you asked for):

enter image description here

  • head to  > System Preferences > Keyboard;
  • go to the Shortcuts tab;
  • select App Shortcuts in the left hand side menu;
  • click on the + sign;
  • select Texpad.app from the Application dropdown menu;
  • fill in Menu Title with Typeset;
  • click on the Keyboard Shortcut box and press cmd+enteron your keyboard;
  • click on Add.

Once you're done cmd+enter will have replaced cmd+T in Texpad:

enter image description here

Support page on on apple.com

  • 1
    It works! Thank you. Only one addition to your post: the name given to the "Menu Title" should be given in the language set on Texpad, i.e. mine is in Italian, hence I've used "Compila" instead of "Typeset". – Francesco Bianchi Jan 28 '17 at 17:40

You can use TextEdit to write the changes you want to the snippet, name it whatever you want and save as .snippet in the snippets folder TexPad already has. You then need to quit TexPad and open it again for the snippet to be loaded. enter will not work as a choice I do not know if it is recognized as return or Enter but I think it needs to just be the letters, symbols or numbers on the keyboard. Even if you use a key such as Tab or enter, your snippet will work but you need to access it from the snippets menu then since the keyboard shortcut won't work.

Also, since it is to compile the code you will likely need to change the type into Environment since you are not placing anything inline.

Hope this helps.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.