Forgive me as I am not a coder, but how can you adapt the code so that it folds away lines that DO match the pattern? And/or to allow regex search?

Also, sylvanaar's suggestion is a good one (as otherwise you have to do something like press ctrl-a, then ctrl-shift-] to unfold), but two problems:

1. After running the command on a particular file, when command rerun it folds for the same text as before and the selection box no longer appears.2. I bound a "all_toggle" command but it does nothing.

stopped the repeating of the filter. And having a single command to switch between folding state seems a sensible behaviour. I had a similar usage scenario to yours, though I also wanted to allow filtering out of lines (e.g. those with a @done tag).

The argument is also quite handy, because it means you can set up commands in the palette to fold for standard tags like @home, @calls, etc. (I also list agenda items by @person, as in @bob.)

I've been thinking of adding an exclusion filter for the same reason (the files I'm using are loosely based on todo.txt so I would be looking to exclude a regex like `^x \d{4}-\d{2}-\d{2}`). It shouldn't be too tricky, but I don't entirely understand the code of the all function. I'll take a stab at it when I can. Let me know if you come up with anything.

This regex filter in the link would be useful for destructive removal of items (e.g. @done lines)

Use of regex with negative look arounds can also be used to filter out instances, so this:^((?!DONE).)*$Will match any string, or line without a line break, not containing the (sub) string 'DONE'. You could then combine that with regex term to exclude dones and include something else, which means the regex would start getting complicated, but running from the palette would help.

That's a nice find. Although I suspect the folding, rather than the regex, is the tricky bit.

Actually, I don't really like the folding on this plugin, I would prefer the fold market at the end. You mention SmartMarkdown elsewhere, which has a similar problem: the folding marker is underneath the `# heading`, which makes it more likely I will leave something behind when moving chunks around. I would prefer if it folded like so:

I guess, without really being aware of its existence, that I have inadvertently being trying to emulate foldingtext which I recently discovered, which is a freeform outliner/task manager from the maker of taskpaper (of which plaintasks is a copy of).

To avoid overly complicated and lengthy nested structures, markdown headings (with folding) allow structure, but still provide nesting if you want with tabbed bullet points below them (which can also be folded with native sublime), and it all looks nice in markdown. One minor issue with markdone syntax is that the state of item (e.g. + for completed) isn't shown in markdown view, which is why appending @done to items is useful. There is the itodo plugin which works well with markdone to make converting todo items ( starting with -) to done items, e.g.:

+ done task @done (2012-11-16 16:59)

One thing that I haven't seen in sublime is a "zoom" mode, which is what workflowy does well, and is found in foldingtext and writemonkey - so you press a hotkey and you only see the current scope (e.g. the level of the heading within markdown), and "zoom out" to see the whole document.

Anyway, putting all these things together makes for something pretty similar to foldingtext and potentially quite a nice and powerful tool. If I was more technically minded I would think about creating a package.

After about a year of using half-baked workflows I had cobbled together from orgmode, todotxt, iTodo, and various other packages, I decided to switch to Plain Tasks a few weeks ago. Almost immediately I started re-writing it to make it more Markdown-like. After a few days I gave up and went back to my half-baked system, which currently consists of the following:

* A syntax almost identical to todo.txt, along with some useful commands to add and complete actions. This is where I find use for the All Fold command, because the syntax is just one item per line. I've taken the plunge and am trying to implement a full GTD system, and, although I dislike this format, I found I have the least resistance to using it.

* A syntax which is a sort of fast-and-loose Markdown. For example, you can cram things next to each other without empty lines (which is not valid in strict Markdown):

I have some mostly working code for opening local files with Wiki style links `[other-file.md]`. (From the Wiki plugin).

I use SmartMarkdown but it doesn't "feel" right, although it's probably an improvement over what Sublime provides by default. Navigating a file with lots of folded coded is very annoying and very easy to erase entire chunks. I wish there was a plugin that made folded text indestructible.

I think that "zoom" is an interesting idea. It should be possible to write a plugin that does this by folding the text above and below the current location. I think a sane way of doing this is to re-write the Markdown (or whatever) syntax so that there's a scope defined between headings (including the heading itelf), otherwise you have to resort to regexs at the plugin level. (Does this make sense?)

I just watched the Folding Text video again, and I noticed that the ".todo" lists use checkboxes. I've been trying to figure out how to use checkboxes or checkbox-like things with the minimum of conversion difficulties (via Pandoc and the like) and have encountered the difficulty you also point out. I think I'll go back to combining the Markdown syntax with the checkboxes (and maybe some bits of the GTD syntax/commands) and worry about how to convert to other formats later.

Although I like the Workflow/PaperTasks/FoldingText simplicity, one of the things I've found really useful is to date everything, so I can refer to it later. I only need the date, not the time, but it's pretty intrusive: