Cut-and-paste Folded View

After I’ve folded up the document using filters on various tags, it looks awesome!

I’d like to then cut-and-paste this folded down version of my outline. But, when I use the regular cut-and-paste, it grabs all the text that is hidden in the folds.

I see that the Print option under File outputs the folded view. If the same could be cut-and-pasted, that would be awesome.

(I also requested a feature to Hide Tags… this cut-and-paste feature along with an option to Hide Tags would be a fast way to port over just the part of the document that I want to use in a different application, say an email or a more clunky heavy word processing utility).

I think this script will do what you want:

And you can modify that script to not include tags (trailing tags anyway) by changing this line:




Thanks! The version with


worked well.

But, if I try it with just


I do lose the tags (which is good), but I also lose all the markup and modeContext. I lose the #, bullets and square checkboxes.

Is there a way to “push” all the properties of a line except the tags?

I think I figured it out with a little javascript… I used the following:

				var theLine = each.line();
				theLine = theLine.split('@')[0];

in place of


This seemed to do the trick with the file that I tested. Many thanks for your pointers!