# shortcut for collapse and expand in texstudio

How can I set the shortcut for collapse and expand for various levels in texstudio? I think this way the navigation would be much easier. For instance, I can collapse all sections and then go through them.

The collapse and expand shortcuts have no default values. You can set them manually. As mentioned by Torbjørn T., the collapse and expand shortcuts can be set under:

Options -> Configure TeXstudio -> Shortcuts -> Menus -> View -> Collapse / Expand


In the following example, we have:

Level 1: \begin{document}

Level 2: All \chapter{} commands

Level 3: All \section{} commands

So just collapse and expand the appropriate levels.

\documentclass{report}
\begin{document}

\chapter{C1}
zzz
\section{C1S1}
zzz
\section{C1S2}
zzz

\chapter{C2}
zzz
\section{C2S1}
zzz
\section{C2S2}
zzz

\chapter{C3}
zzz
\section{C3S1}
zzz
\section{C3S2}
zzz

\end{document}