This project is read-only.

How to disable snippets?

Topics: Developer Forum, User Forum
Apr 7, 2008 at 9:55 PM

I'm having the following experience: whenever I highlight a block of text with the intention of typing over it, if the first character typed happens to be the first character of a snippet shortcut, then the snippet is inserted. This behaviour is not desirable. Ideally it would be nice if there were some way to control this. Barring that, can snippets be disabled altogether? I've tried what I think are the obvious properties on the Scintillia control, but they don't seem to have any effect.

Apr 9, 2008 at 8:28 PM
I'll respond to my own post with a solution:

The property in question is ScintiallControl.Snippets.IsOneKeySelectionEmbedEnabled. I had set this property to false in the designer because I explicitly wanted to disable this feature. However, what I did not realize is that when you change the language (by setting the Configuration.Language property), the language configuration may actually specify a value for this property, thereby overriding whatever you have set in the designer. So the solution is to manually set IsOneKeySelectionEmbedEnabled property after you set the Language property.
Jul 25, 2008 at 4:20 PM
Hmmm... The designer isn't serializing the properties for the SnippetManager. I'll need to do some more investigating on this.
Jul 29, 2008 at 6:43 AM
OK this is all fixed up in Changeset 34534. I fixed the IsEnabled property so that it actually saves. Also I removed the entries in cs.xml and js.xml configs so that they don't set IsEnabled and IsOneKeySelectionEmbedEnabled to true when loaded. Instead the current values will be honored.