jamalsenouci / sublimetext-syntaxfold

Sublime Text Plugin that provides a configurable command and popup for folding code based on syntax
MIT License
40 stars 6 forks source link

feature_request(enhancement): single line folding #35

Open Kristinita opened 6 years ago

Kristinita commented 6 years ago

1. Summary

It would be nice, if Sublime Text SyntaxFold will support folding text in single line.

2. Argumentation

I use Sublime Text TableEditor plugin for tables creating. Example table:

Normal table

I can have a long text in a cell.

Big monitor:

Big monitor

Small monitor — bad table:

Small monitor

I want fold text, if line length in a cell is long. But I can't do it.

3. Configuration

User/syntax_fold.sublime-settings:

{
    "config":
    [
        {
            "scope": "text.genius.kira",
            "startMarker": "!fold",
            "endMarker": "!end"
        }
    ]
}

Demo__SyntaxFold--Kireopardy.kira:

Example table

Parts of Demo__SyntaxFold--Kireopardy.kira:

!fold Sasha Best !end
!fold
   Sasha Leader
!end

4. Steps to reproduce

I run fold_all command (Alt+0, Alt+0).

5. Expected behavior

Multiline and single-line texts fold:

Expected

6. Actual behavior

Multiline text fold, single-line not:

Actual

Thanks.