MackieLoeffel / atom-auto-fold

Atom package for folding
MIT License
1 stars 1 forks source link

Fold on current line #1

Closed sherghan closed 8 years ago

sherghan commented 8 years ago

This is a change that allows to fold on current line. Additionally settings page gains ability to set default markers for both fold on next line and fold on current line.

I find your package essential for my notes text files. This change allows me to keep everything lean & clean - without loosing space for additional lines with fold markers. My default marker (for current line) is " ><$" (where $ is EOL). In text file looks like this:

My great new project  ><
    Description
        Next big idea to conquer the world
    ToDo
        Write the idea down

Another fine idea   ><
   Haven't came to me yet ;-)

Folded:

My great new project  ><
Another fine idea   ><

Had to change existing @atom-fold here marker to @atom-fold next to keep the naming consistent. I hope this isn't a big problem. ...In case it is, settings page allows to overwrite the defaults. :wink:

The only thing that is lacking in this commit is an updated demo graphic.

MackieLoeffel commented 8 years ago

I first want to say, that I'm glad, that you like this package. I like the option for changing the markers, but couldn't you simply use @auto-fold regex instead of changing the sematics of @auto-fold here? There could be an option, with which you can define global @auto-fold regexes. Would this solve your problem?

MackieLoeffel commented 8 years ago

I've merged this for now, but I'm probably going to make some adjustments before publishing.