1. just add ;{& ;} in the hotkey define line & return line, you'll get perfect folding in SciTE4AutoHotkey.
Code: Select all
#k:: ;{
sendinput abcde
return ;}
2. Vim can also use this solution with: se fdm=marker; se foldmarker={,}
3. Vim has a better solution, with se fdm=marker; se foldmarker=::,return
notes:
1. maybe SciTE can be hacked or configured to fold ahk scripts without any extra markers. But since I'm not familiar with it , so I just hack the data instead of the app.
2. I use TAB indent in ahk scripts, so se fdm=indent is more easy, but the result is not perfect. ( vim users should know what I mean)
3. se fdm=marker; se foldmarker=::,return is perfect, but you should change one line code into 3 lines to avoid fold level bugs. that is
#k::sendinput abcde should be:
Code: Select all
#k::
sendinput abcde
return