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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
Sorry, but the tabs were not taken into account in my example. It is in fact:
def main():
print "Test"
if __name__ == '__main__':
main()
...still not.
So, there are tabs at the beginning of the 2nd and the last lines...
Sorry for those posts...
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.
Sourceforge does not allow leading spaces or tabs which makes it hard to post code.
Why not just use the Python highlighter?