Skip to content
| Marketplace
Sign in
Visual Studio>Tools>ungarianNotation
ungarianNotation

ungarianNotation

Preview

Maarten Los

|
3 installs
| (0) | Free
Hide Hungarian notation to improve code readability.
Download

Hide Hungarian notation from your source code.

Applies to C/C++ and C# code.

About

This extension allows you to toggle the display of Hungarian notation in your source code. This may come in handy to make code that uses this notation more readable.

Note that the extension only changes the display of the code, it does not alter the code itself. For that purpose, Visual Studio already offers ample refactoring support.

Built-in Prefixes

The extension has the following built-in prefixes, that should cover most variants of the notation.

  • ac, auc – Array of (unsigned) characters
  • bo – Boolean
  • c, uc – (Unsigned) character
  • Permutations and combinations of signed / unsigned integer in various bit widths:
    • u8…u64, ui8…ui64, i8…i64.
  • e – enum
  • o – Object
  • r – struct
  • v – Void
  • s, str – std::string
  • sz – Zero terminated string
  • size – size_t

Each of the above prefixes has an implied additional prefix with a pointer modifier, e.g. po, pb, psz, etc.

An option to configure the prefixes is planned for a future version.

Prefix detection

A prefix is considered as such, if:

  • it follows an empty space, or a non-word character such as -> or ::
  • it is followed a by an uppercase character in the range A…Z, a number or an underscore.

Display

The extension is implemented using the Visual Studio Outlining feature, collapsing the detected notation prefixes and replacing them with empty text. This results in vertical bars, which are IMO still more readable than the ellipsis.

An option to configure the replaced text with somehing other than empty text is planned for a future version.

Usage

In the editor context menu, choose Show/Hide Hungarian Notation.

Keyboard mapping

The feature is mapped to the <alt> <shift> U key combination.

In Visual Studio, it is represented by the EditorContextMenus.CodeWindow.ShowHideHungarianNotation key.

Known Issues / Limitations

  • Comment lines are also included in the process. This may or may not be desired. An option to configure this may be included in a future version.

Please use the Github project page to file any bugs or feature requests.

Credits

Portions of the code that deal with Collapsible internals are heavily inspired by the Unobtrusive Code project. This is attributed in the corresponding source files.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft