- Home /
Monodevelop suggestions without autocomplete
I'm just starting out with Monodevelop and Unity, and the autocomplete feature of monodevelop is really useful.
I have come up against a problem with it though. If I have a local variable called mode
, this sometimes doesn't appear in the autocomplete list of options, but something from the Unity API like FogMode
does. Then if I type mode
followed by =2;
, it will autocomplete to FogMode=2;
.
This has led to me introducing quite a few bugs into my code as my variables are being replaced with other random similar sounding things from the API. Is there a way to keep the useful list of autocomplete suggestions, without having to have one of them added unless I specifically select it from the list?
Answer by Jeff-Kesselman · Nov 17, 2014 at 06:31 PM
This pretty much always indicates a syntax error higher up from the place you are having trouble. Often mismatched {}, () or quotes.
if the compiler doesn't understand your code it cannot make good suggestions.
(If you are used to Netbeans it actually has a particularly smart AI system called the "fuzzy compiler" that tries to guess and gets it right a surprising amount of the time, but most IDEs aren't that sophisticated.)
There's not a syntax error in my code - I don't want perfect code completion, I'm just looking for a way to stop it automatically using one of its own suggestions if I haven't asked for it.
As the Bored $$anonymous$$ormon says, hit escape to remove the popup without selecting anything.
or go into preferences and turn it off completely.
Answer by Kiwasi · Nov 17, 2014 at 06:35 PM
If you press escape the list goes away, allowing you to type whatever you want.
Ha this re$$anonymous$$ds of breaking my CTRL key from playing Painkiller.
Be prepared to spam Escape key :P
Yeah, this might have to be the workaround. Still not ideal though, as I would prob type mode=
before I even realised it had come up with a suggestion
Answer by meat5000 · Nov 17, 2014 at 06:50 PM
The answer you seek is contain-ed within these pages
http://answers.unity3d.com/questions/408956/monodevelop-autocorrect-annoyance.html
Ben Stoneman says :
Open "MonoDevelop"
Click "Tools"
Click "Options"
Select "General" under "Text Editor"
Un-check "Enable code completion"
Twice Circled says :
Anyone having this problem in more recent versions of MonoDevelop, try switching to "Sugggestion Mode". Go to Edit -> Toggle Completion Suggestion Mode.
It only autocompletes if you confirm with Enter or Tab.
Ben Stoneman's is no good as I still want the list - the comment under his answer by sgmongo looks like exactly what I want, I just can't find any "Commit completion list selection with space or punctuation" option in my monodevelop
And TwiceCircled's solution is a step in the right direction, but as the comments say a full stop still triggers the autocomplete
Well you've led me closer to the secret! $$anonymous$$aybe the answer is out there somewhere...
It may well be found in Visual Studio. There is nothing saying you are tied to $$anonymous$$onoDevelop for your Unity project. I have seen some people that prefer the autocomplete features of Visual Studio. Never tried it myself.