Loading ...
Sorry, an error occurred while loading the content.

Python folding

Expand Messages
  • Dr. Detlef Groth
    Hello all, my boss insits that I have to learn Python as well. So I was struggling with the hkpython.emf. I would suggest two fixes to get proper folding and a
    Message 1 of 1 , Apr 28, 2005
    • 0 Attachment
      Hello all,

      my boss insits that I have to learn Python as well. So I was
      struggling with the hkpython.emf.

      I would suggest two fixes to get proper folding and a item list of
      classes and defs:

      ; Set up collapse for python
      set-variable .fhook-python.collapse-open "^\\(class \\|def \\)"
      set-variable .fhook-python.collapse-close "^\\(class \\|def
      \\|#eof\\)"
      ;set-variable .fhook-python.collapse-mopen "-1"
      set-variable .fhook-python.collapse-mclose "0"
      set-variable .fhook-python.collapse-mnext "-1"

      ; setup item-list
      set-variable .fhook-python.item-list-s1 "^[ \t]*def[ \t]+\\(\\w+\\)"
      set-variable .fhook-python.item-list-r1 "Defn \ecB\\1\ecA"
      set-variable .fhook-python.item-list-s2 "^[ \t]*class*[
      \t]+\\(\\w+\\)"
      set-variable .fhook-python.item-list-r2 "Clss \ecB\\1\ecA"

      The original version folds via curly braces, but as far as I know
      python does not use this.

      regards,
      Detlef
    Your message has been successfully submitted and would be delivered to recipients shortly.