I was editing a syntax file and added a keyword. I then closed down Textpad reopened the file (you really need a refresh command for that), and instantly noticed that the syntax hadn't taken hold. Perplexed I opened the syntax file and there it was - staring back at me.
So I deleted the document class and recreated it. Still didn't work - it was the same as the previous version.
Thinking that Windows had cached it I rebooted my PC. *bing* Still the same as before.
Annoyed I copied all the syn files from System to a folder in My Documents, deleted the document class from the list, closed Textpad, restarted it, created my class, went to select the only remaining .syn file and found a fully populated list!? Where did this populated list come from?
I quickly discounted the idead that maybe it listed all the syn files employed by other file types since where did the awk and autolisp stuff come from?
Then I went and totalled the registry entries regarding the document classes (I backed them up first) and reopened TextPad. They were gone. Create a new syntax and the list is still there.
I then checked out the other directories. Samples had syn files in it too. So I delete all those, go to create a document class and the remaining syntax in System appears - lo and behold it works.
So which directory should syntax files go into? Samples or system?
Syntax files revisited
Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard
-
- Posts: 9
- Joined: Thu Jun 26, 2003 11:31 pm
- Location: Middlesbrough, England
I wrote an AutoIt program that lets you automatically reload the syntax file for the active document.
Create a user-defined tool with:
- Command: AutoIt3.exe
- Parameters: "Reload Syn File.au3"
(The script works--at least it works on my computer--by right-clicking the document, Properties > Syntax > unchecking syntax highlighting > Apply changes > recheck syntax highlighting > selecting the original SYN file > OK)
Create a user-defined tool with:
- Command: AutoIt3.exe
- Parameters: "Reload Syn File.au3"
(The script works--at least it works on my computer--by right-clicking the document, Properties > Syntax > unchecking syntax highlighting > Apply changes > recheck syntax highlighting > selecting the original SYN file > OK)
-
- Posts: 9
- Joined: Thu Jun 26, 2003 11:31 pm
- Location: Middlesbrough, England
I know it doesn't answer your question; I'm not sure of the answer my self!
But take a look here:
TextPad > Configure > Preferences > Folders
You'll the see the folder where you should probably install user syn files....
Just make sure you don't have syn files in Sample or System with the same name (or you could perhaps have conflicts)
Hope that helps
But take a look here:
TextPad > Configure > Preferences > Folders
You'll the see the folder where you should probably install user syn files....
Just make sure you don't have syn files in Sample or System with the same name (or you could perhaps have conflicts)
Hope that helps
-
- Posts: 9
- Joined: Thu Jun 26, 2003 11:31 pm
- Location: Middlesbrough, England