# Hiding and Collapsing Output

The menu items **View → Hide** and **View → Unhide** allow the user to hide/collapse and unhide/uncollapse part of IDA's output.

## Hiding instructions or data items

It is possible to hide or replace some parts of the listing by a short text.

To do so:

1. Select some instructions or data items
2. Invoke **View → Hide** (or <kbd>Ctrl</kbd>+<kbd>Numpad-</kbd>)
3. Enter the replacement text and optionally pick a color.

![](https://3899235193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4yKxBBBv1qcoSuL2US4%2Fuploads%2Fgit-blob-e49e3a14e80c0a1c6263fb48c24ef51e43fd9858%2Fhiding-code.png?alt=media)

The selected instructions, or data, are replaced by the entered text. They are not removed from the database. They can be made visible again by using **View → Unhide** (or <kbd>Ctrl</kbd>+<kbd>Numpad+</kbd>)

![](https://3899235193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4yKxBBBv1qcoSuL2US4%2Fuploads%2Fgit-blob-27b9ff0d8c898769002c44e31323705a012f822b%2Funhiding-code.png?alt=media)

## Hiding a whole function

To hide a whole function, place the cursor on the function name, then **View → Hide** (or <kbd>Ctrl</kbd>+<kbd>Numpad-</kbd>). You can also right-click on the function as shown below:

![](https://3899235193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4yKxBBBv1qcoSuL2US4%2Fuploads%2Fgit-blob-83f6a9f435509e509b1aef19937b885fe923f580%2Fcollapsing-a-function.png?alt=media)

![](https://3899235193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4yKxBBBv1qcoSuL2US4%2Fuploads%2Fgit-blob-b115af44c335d11c1ce315c56fbf0df6726fd2af%2Fcollapsed-function.png?alt=media)

## Terse struct representation

When defining structure instances in data, IDA will, by default, try to display them in terse form, with everything on one line. By using **Unhide**, you can have it in full, or verbose form, with each field on a separate line and a comment with the field name. Conversely, you can use **Hide** to collapse a structure instance into a terse form. Note that it may not work due to the specific structure's layout.

![](https://3899235193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4yKxBBBv1qcoSuL2US4%2Fuploads%2Fgit-blob-e2146d2db5cd35ebbbc87c708779d5796142de5e%2Fstruct-tersed-form.png?alt=media)

![](https://3899235193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4yKxBBBv1qcoSuL2US4%2Fuploads%2Fgit-blob-08a62323f737a5b872e2a546db9972bb8ae1cb75%2Fstruct-full-form.png?alt=media)

## Collapsing blocks in the decompiler

The decompiler also has a similar pair of actions. They are available via the context menu or the **Numpad-** and **Numpad+** hotkeys.

![](https://3899235193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4yKxBBBv1qcoSuL2US4%2Fuploads%2Fgit-blob-80e042fe4037b1fde427ffbce2f6058d9060637c%2Fexpanded-decompilation.png?alt=media)

![](https://3899235193-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fd4yKxBBBv1qcoSuL2US4%2Fuploads%2Fgit-blob-4464f4f3ede8fd7ed36a33f4e795aa6f428122fc%2Fcollapsed-decompilation.png?alt=media)
