Open zyrolasting opened 11 years ago
First of all, I must say that I really like the idea of a convention-driven repository of snippets.
However, I never expect someone to edit the ftd file themselves. (That's why I didn't notice this bug I think)
But I need some time to look for the error. I can replicate the bug and I think it's due to the loose coding of how to deal with the [>END<] so that it cannot process [>$[![END]!]<] properly.
At this point of time I cannot think of an easy way to do what you want to do. But I will try to fix this bug and also think of a better way to let people do this convention-driven repository of snippets more easily.
Allowing for multiple scopes in an FTD file would be a great first step. I cannot type, say, Lang:HTML|Lang:PHP
on one line in an FTD file. I can only do that in the Snippet Editor. Outside of N++, I have to copy the snippet for each scope.
Imagine if you want to use Ext:
for scopes that Lang:
could not support. If the language you wanted to use Ext:
for had multiple file extensions, then you have to copy the snippet once for each extension.
If you were running a repository with many users and thousands of snips, this one feature can significantly reduce disk usage and maintenance work.
I just noticed something. I had similar weird behavior when I tried to use a normal .ftd file that did not have another .ftd file embedded in it. I compared what FingerText exports to what I am importing, and I found out that my lines closing snippets contained [>END<]$[FingerTextData FingerTextData]@#
, which is incorrect because it lacks an exclamation point before the $
. The correct string is [>END<]!$[FingerTextData FingerTextData]@#
That being said, look at the very last line of the sample I gave you in the OP.
On a side note, I also sent you an email about the repo.
I am trying to start a convention-driven repository of snippets. One of the .ftd files I wrote is supposed to expand to the contents of an .ftd file that would contain reserved snippet names.
In order to make sure that FingerText would not stop parsing early, the multiple
[>END<]
blocks that were supposed to be part of a snippet were changed to[>$[![END]!<]
so I could just hit TAB a couple of times after typing a scope. I am guessing that not doing the same to the$[]@#
blocks caused some trouble, because when I attempted to import this content, both Notepad++ and Fingertext went bonkers."Bonkers" means that every last item in the FingerText menu at the top of the window would yield an "Unknown exception" error, and I could not even close Notepad++. Attempts to do so would yield a "bad allocation" error. I could not even delete the snippet database through N++.
After terminating the process, I tried to open other files and got the same behavior. I then opened the original FTD file for editing and saw this.
I say again: This happened when I tried to open the original FTD file for editing. This did not happen with other files, which only resulted in "Unknown Exception" or "bad allocation" errors.
After clicking the first error away, this pops up.
N++ then froze and became simply unusable. I had to actually go in and remove the FingerText DLL to even open N++ again after that.
The code below is the WIP contents of the ftd file I tried importing to text how FingetText would treat it. Paste the following into an ftd file and import it to see what happens.
Since I could not use N++ or FingerText, I am unable to look up the version info. I should be able to use FingerText again if I manually delete the snippet database. I can also provide a dump if you tell me how to do it.