BashSupport Pro provides code folding for shell scripts.
BashSupport Pro adds folding to the syntax elements of your shell scripts. See below for detailed list elements, which can be collapsed and expanded.
Vim-Style Custom Folding Region
BashSupport Pro supports Vim’s default markers, in addition to IntelliJ’s custom markers.
Code Folding Settings
Here you can configure the default behaviour of code folding. The checked elements will be collapsed by default. You can find the settings at Settings/Preferences… → Editor → General → Code Folding .