Most text editors support auto-folding import lines, and with this package, Atom does too!
Install this package and it will automatically start folding lines that begin with
import when you open any file.
If you don't want to automatically fold the imports when you open each editor, you can turn that setting off in this package's configs.
To toggle folding the imports, use the
Fold Imports: Toggle command or the default hotkey
ctrl-alt-i. You can disable this hotkey in the package configs and you can create your own hotkey in your
In the future I hope to add
The way the folder currently works is by finding the first and last lines that begin with
import. It then folds in the range from the space after the first
import to the last character in the last line that begins with
import. This will fold any comments you have between those two lines. I'm not sure if this is a bug or a feature, but please raise an issue if this bothers you.
Contributions are appreciated! If you would like to contribute, please raise an issue first.
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.