• Packages
  • Themes
  • Documentation
  • Blog
  • Discuss
Sign in

atom-cpp-template-foldings

Fold C++ template definitions to make them more readable
  • #c++
  • #folding
  • #template
octomarat
0.1.4 1,694
1
  • Repo
  • Bugs
  • Versions
  • License
Flag as spam or malicious

atom-cpp-template-foldings

Atom plugin that folds C++ template definitions to make them more readable.

Description

C++ template definitions are wordy. This plugin finds all templates in your source file and folds their parameter lists making some simplifications. For example:

screenshot

Here folding hides typename keywords.

Simplification rules are very simple:

  • type template parameter: typename and class keywords are removed; if parameter has no name, _ symbol is displayed;
  • non type template parameters: not simpified;
  • template template parameters: parameters are simplified recursively; typename and class keywords are removed; if parameter has no name, _ symbol is displayed.

The example below demonstates most of these cases:

screenshot

You can apply foldings manually or turn on auto folding on file open (from package settings).

Installation

Just install the package from Atom (Edit > Prederences > Install > [type 'atom-cpp-template-foldings']).

Current issues

  • Templates that contain tab charactes are not processed. So, if you use tabs to indent your code, multiline template parameter lists will not be processed.
  • Folding is not performed when Soft Wrap option is enabled in Atom. However, if you also enable Soft Wrap At Preferred Line Length, everything will work.

I think this package is bad news.

Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.

  • Terms of Use
  • Privacy
  • Code of Conduct
  • Releases
  • FAQ
  • Contact
with by