@MU-Software
you would need a plugin like python script or lua script to automate this task
becasue it is not a general setting but per buffer setting. Each time you open
a new c/cpp file the property needs to be set.
A python version would look like this
def setFoldProperty():
if editor.getLexerLanguage() == 'cpp' and editor.getProperty('fold.cpp.comment.explicit') != '0':
editor.setProperty('fold.cpp.comment.explicit', '0')
def callbackLANGCHANGED(args):
setFoldProperty()
def callbackBUFFERACTIVATED(args):
setFoldProperty()
notepad.clearCallbacks()
notepad.callback(callbackBUFFERACTIVATED, [NOTIFICATION.BUFFERACTIVATED])
notepad.callback(callbackLANGCHANGED, [NOTIFICATION.LANGCHANGED])
If you haven’t installed python script plugin already than I would suggest
to download the msi from here instead using plugin manager.
If you want to have this script executed each time you start npp you need to change the python script configuration from LAZY to ATSTARTUP and the content of this script needs to be in a file called
startup.py.
Note, both, c and cpp lexer are identified as cpp.
Cheers
Claudia