Unfortunately the Komodo UDL does not have support for code folding based on indent or blocks that do not end with a non-space character. This is a significant limitation for markup languages. I wrote a custom markup language (once) that colors syntax and sometimes I also need code folding because the documents are long. The YAML file type code folding works for my custom language but it does not color my syntax.
My workaround is a macro for each language, shown below, that can be run with keyboard shortcuts or buttons. If I want to fold the code I view it as a YAML file type. If I need syntax coloring I view it as a once file type. The folded state is retained between language toggling.
Python or JS can be used for the macro.
language 1 (macro in JS)
komodo.assertMacroVersion(5);
if (komodo.view) { komodo.view.setFocus();}
var curs1 = ko.views.manager.currentView.scimoz.currentPos;
ko.views.manager.currentView.koDoc.language ="once";
ko.views.manager.currentView.scimoz.gotoPos(curs1);
language 2 (macro written in Python)
import eollib
from xpcom import components
viewSvc = components.classes["@activestate.com/koViewService;1"].getService(components.interfaces.koIViewService)
view = viewSvc.currentView
view = view.queryInterface(components.interfaces.koIScintillaView)
sm = view.scimoz
curs1 = sm.currentPos
view.koDoc.language ="YAML"
sm.gotoPos(curs1)