I've spent the better part of the last couple hours searching through StackExchange and Google to find either a WYSIWYG style LaTeX editor, and for Windows, I have settled with TexStudio as the best offline option (I'm used to using Overleaf.)

In any case, one thing that would be a HUGE quality-of-life improvement for me would be to compile and preview my file upon save (Ctrl+S). Unfortunately, if I try to make Ctrl+S the shortcut to Build and View, it removes it as the hotkey to save.

Is there any way to set a hotkey for more than one command? Or any other way to automatically preview my document when I save?

I am using the built-in PDF viewer in TeXStudio.

Thanks in advance.

  • 1
    What's wrong with TeXstudio default shortcuts?
    – Aradnix
    Commented Jan 30, 2018 at 5:37
  • 3
    Agreed with Aradnix. Furthermore, TeXstudio does save the file before Build&View, so it sort of does what you want anyway. F5 is even shorter than Ctrl+S.
    – gusbrs
    Commented Jan 30, 2018 at 10:41
  • It seems to me that the problem is not really TeXstudio's but the user's, that is, you need to leave the WYSIWYG approach aside to be able to work with TeXstudio, at least in the traditional way. Fortunately TeXstudio supports synctex which is quite useful for both the come and go from code to PDF and vice versa. However, if you're not willing to take that step, you might as well use LyX.
    – Aradnix
    Commented Jan 30, 2018 at 15:37
  • set a hotkey for more than one command is the same as use \label{} twice to refer two different equations!!! Just use the hot key for Build&View as mentioned before. Note that what will happen in Build&View you can configure in Options Menu.
    – Sigur
    Commented Feb 20, 2018 at 14:34
  • @Winch FYI, you can use Overleaf offline. The app is open-source, so you can host (run) it on your computer and access it using a web browser, even if you aren't connected to the Internet (see the installation instructions on GitHub; even though it recommends using Toolbox, I prefer these instructions). You don't even need LaTeX on your computer. Some features are different, but most are the same. The downside is that unlike TexStudio, it stores files in MongoDB, so you can't manipulate the file tree outside of Overleaf. Commented Jul 4, 2022 at 17:03

4 Answers 4


To add to gusbrs's answer. Because Ctrl+S is in my muscle memory, I chose to bind Build & View as Ctrl+S which works great for me.


You can use TeXstudio's default shortcut for "Build & View", which is F5. Once TeXstudio already saves the file before "Build & View" it does both things you are trying to achieve with a single keystroke.


I'm using the setting "Auto-recompile document on changes" in the configuration tab "Internal PDF Viewer" to update the internal preview after saving the file.

enter image description here

  • Hello, Zoraiyo, and welcome to the TeX Stack Exchange! While the method in your answer works, it doesn't seem to answer the intended question.
    – Someone
    Commented Aug 29, 2023 at 12:49
  • @Someone Why does it not answer the question? Commented Aug 29, 2023 at 12:52
  • The question asks how to compile on-demand. If the document is particularly large, auto-recompiling could become a problem. Also, there are multiple answers that already work.
    – Someone
    Commented Aug 29, 2023 at 12:55
  • @Someone The question asks "Or any other way to automatically preview my document when I save?" Commented Aug 29, 2023 at 12:56
  • The wording implies that the OP asked that as an alternative if the first method didn't work. Multiple answers show it does.
    – Someone
    Commented Aug 29, 2023 at 12:58

You can set Option+S as a new shortcut (if you are using MacOS).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .