How to disable snippets?

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

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.

jon
Apr 9, 2008 at 7: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.
Coordinator
Jul 25, 2008 at 3:20 PM
Hmmm... The designer isn't serializing the properties for the SnippetManager. I'll need to do some more investigating on this.
Coordinator
Jul 29, 2008 at 5: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.