Menu

How to use indentation for folder definition?

2006-01-02
2012-11-13
  • Nobody/Anonymous

    Hi,

    In a defined user language in Notepad++ 3.4, I need to define folder definition with open and close folder defintion not defined by keywords but by indentation, as it is done, for example, in the Python language.

    For example, in Python language mode, the following code will show two separate folders, one with the first two lines, and the other with the two last lines :
    def main():
        print "Test"
    if __name__ == '__main__':
        main()

    How to do this in a user defined language ?

    Thanks in advance for your answer.

     
    • Nobody/Anonymous

      Sorry, but the tabs were not taken into account in my example. It is in fact:
      def main():
      print "Test"
      if __name__ == '__main__':
      main()

       
    • Nobody/Anonymous

      ...still not.
      So, there are tabs at the beginning of the 2nd and the last lines...
      Sorry for those posts...

       
    • Nobody/Anonymous

      I can't use Python highlighter, because I'm using a different language. It was just an example, and the language I'm using is proper to my work, so I can't use any other language.

       
    • Chris Severance

      Chris Severance - 2006-01-03

      Sourceforge does not allow leading spaces or tabs which makes it hard to post code.

      Why not just use the Python highlighter?