Can variable renaming tooltip be disabled?

I know that the variable/function renaming behavior can be disabled entirely. That's not my goal. I use the feature all the time, but the popup/tooltip constantly gets in the way and I'd like to know if there's any hope of disabling just the message.
I imagine the answer is no, but I might as well ask.

댓글 수: 3

Adam Danz
Adam Danz 2021년 3월 29일
I'm intrigued. What is the variable/function renaming tooltip? Asking for a friend. 🤣
DGM
DGM 2021년 3월 29일
편집: DGM 2021년 3월 29일
I'm referring to the popup message associated with the automatic variable and function renaming feature that was introduced circa R2011b. If you click on a variable name on the LHS of an assignment and start changing the variable name, you'll get a message that says "Press shift-enter to rename $num instances of 'thisvariablename' to 'thatvariablename'".
It's under preferences > editor > language > variable and function renaming.
Adam Danz
Adam Danz 2021년 3월 29일
Ah ok. My mind was elsewhere. Thanks.

댓글을 달려면 로그인하십시오.

 채택된 답변

Adam Danz
Adam Danz 2021년 3월 30일
편집: Adam Danz 2021년 3월 30일

0 개 추천

I don't know how to disable just the message while maintaining the ability to rename all using shift+enter.
You could create a shortcut that temporarily sets the EnableVariableAndFunctionRenaming property to off until it's turned back on or until Matlab closes and restarts but that will also disable the shift+enter option.
function toggleRenamingProperty(TF)
% TF is either true|false.
% false turns off the EnableVariableAndFunctionRenaming property.
% true turns it back on. Restarting matlab negates any changes.
S = settings;
S.matlab.editor.language.matlab.EnableVariableAndFunctionRenaming.TemporaryValue = TF;
end
I'd bet that the message could be disabled with some java wizardry.

댓글 수: 5

DGM
DGM 2021년 3월 31일
Yeah, the "java wizardry" possibility was kind of what I was imagining. I didn't really think of using a shortcut, but now that you mention it, that might just work well enough. I use the feature, but I tend to be very cautious and deliberate about it. Needing to explicitly enable the functionality is something that's not really at odds with that behavior.
Thank you.
Adam Danz
Adam Danz 2021년 3월 31일
Yeah, what makes the function my answer a bit safer is that it only chagnes the TemporaryValue so that even if the feature is not toggled back on before shutting down matlab, it will return to its default value when matlab restarts.
Adam Danz
Adam Danz 2021년 3월 31일
@DGM, I ran into this blog post today from Yair Altman's blog. I didn't have time to sift through it but it may be helpful.
DGM
DGM 2021년 4월 1일
Hmm. I'll check that out, but I admit, most of his blog tends to go over my head.
Adam Danz
Adam Danz 2021년 4월 1일
I played around with it a bit and it seems to only affect tooltips on graphics objects.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 MATLAB에 대해 자세히 알아보기

제품

릴리스

R2015b

질문:

DGM
2021년 3월 29일

댓글:

2021년 4월 1일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by