0
$\begingroup$

I need to use variables like \$ + capital letters(\$A,\$B,...) frequently in a project, the default autocomplete always pops up automatically, in most cases, it's a distraction. Can we set Mathematica to ignore the first $ symbol when autocomplete? enter image description here

$\endgroup$

1 Answer 1

2
$\begingroup$

The easiest option would of course be to simply change the variable names to start e.g. with § or any other letter-like character that's easily accessible on your keyboard.

Another option is to remove all symbols, at least as far as the front-end is concerned (see also this Q&A):

FrontEndExecute@
 FrontEnd`UpdateKernelSymbolContexts[
  "System`", $ContextPath, {{"System`", {}, 
    Names["System`$*"], {}, {}}}]

enter image description here

This has the side-effect of causing all $* symbols to be colored blue, because the front-end thinks they don't exist. The only way I found to work around this is to use the (rather heavy-handed) mechanism described here: You can add all unwanted symbols to your FileNameJoin@{$InstallationDirectory, "SystemFiles", "Components", "AutoCompletionData", "Main", "obsoleteFunctions.m"} file.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.