I created a RegEx preset - and since I spent a long time trying to figure out how to do it (RegEx is something I still struggle with), I though I will share
What I want to do: create presets that comments code out (and next up uncomments it as well) for AHK, Latex and Python - however since only the comment character differs the implementation follow naturally from the first (AHK given in example):
for example, to change:
Line 1
Line 2 ;space
Line 3 ;tab
Line 4 ;2space
Line 5 ;2tab
; Line 6 ;already commented
; Line 7 ;already commented
;Line 8 ;already commented, with indent
to:
;Line 1
; Line 2 ;space
; Line 3 ;tab
; Line 4 ;2space
; Line 5 ;2tab
; Line 6 ;already commented
; Line 7 ;already commented
; ;Line 8 ;already commented, with indent
(off topic - you might not want to double comment Line 8 - but this is the way I prefer it )
you can use
Add Stuff|Add to Lines|Prefix : ";" (obviously without the quotes
Find and replace - enable RegEx
Find "^[;;]" (no quotes)
Replace "" (empty string - no quotes)
The RegEx prevents Line 6 and 7 from being double commented (and subsequently upon running this twice or more - maybe with a wider selection - prevents endless comment characters)
To remove
Trimming and Wrapping|Strip Leading Stuff|";"
Mouser - is there somehow that the internal stuff (i.e. presets not using custom tools) like this can be packaged as part of an add-on for CHS? Or packaged with CHS and then have a preset manager where you can delete/disable/enable the unneeded ones. I am more than willing to share my files (stuff like paragraph stripping - for copying from Adobe reader etc - but nothing fancy).