globals() thing works perfectly thanks. I didn't try too hard but editor properties seem to be per document rather than global? I understand there are separate editor objects for views 1 & 2, but in my quick testing in the same view, I could only get 42 out when on the same document as it was set in.
globals() thing works perfectly thanks. I didn't try too hard but editor properties seem to be per document rather than global? I understand there are separate editor objects for views 1 & 2, but in my quick testing in the same view, I could only get 42 out when on the same document as it was set.
Thanks Claudia will check it out.
Help! I've gone down a rabbit (snake?) hole.... I'm trying to create a script that can "remember" the current active document (Buffer ID I think) on the first run of the day (ie: since npp was launched). Then on subsequent runs perform some action against that document even if a different document is currently active. How do I persist the buffer ID from one script execution to the next? I think I'm missing something obvious scope wise, but I've been looking at creating a new document (overkill and...
Help! I've gone down a rabbit (snake?) hole.... I'm trying to create a script that can "remember" the current active document (Buffer ID I think) on the first run of the day (ie: since npp was launched). Then on subsequent runs perform some action against that document even if a different document is currently active. How do I persist the buffer ID from one script execution to the next? I think I'm missing something obvious, but I've been looking at creating a new document (overkill and how do I...
Thanks both for looking at this. @Claudia The getTag function does appear to return the required submatches when searching forward, but not when searching backwards. My requirement is to extract the function-name as one regEx group and the function-parameters as a 2nd group from this example line (at pos 6048 of my test doc)... function CheckNeighbors(ent, itemname) Looking specifically at the findText test in my original post above (now highlighted in red), the exact same search is run forwards...
Thanks both for looking at this. @Claudia The getTag function does appear to return the required submatches when searching forward, but not when searching backwards. My requirement is to extract the function-name as one regEx group and the function-parameters as a 2nd group from this example line (at pos 6048 of my test doc)... function CheckNeighbors(ent, itemname) Looking specifically at the findText test in my original post above (now highlighted in red), the exact same search is run forwards...
Hi. I want to do a regEx search backwards to find the first match above the caret and extract the resulting regEx groups. I don't think I understand getTag properly... I can't even figure out how to get a count of the number of groups it contains!? I've tried several different methods - only some of them find a match backwards and none of them return the groups... can someone give me a firm shove in the right direction please? Here is what I've tried... import re def match_found(m): console.write("research:...