필터 지우기
필터 지우기

2012b Editor missing features "Change Case"?

조회 수: 1 (최근 30일)
Heiko
Heiko 2012년 10월 22일
Hi.
Am I the only one that's missing the possibility to change case of text in the 2012b MatLab editor? Or is it still there and I just don't find it? No infos in the help and doc...
In earlier versions there has been the Text Menu with functions "Change to Upper Case" and "Change to Lower Case".
Greets, Heiko

채택된 답변

Friedrich
Friedrich 2012년 10월 24일
편집: Friedrich 2012년 10월 24일
Hi,
it's there, or better it needs to be enabled again. Go to the ML preferences => Keyboard => Shortcuts. There you will find "change to lower case" and "change to upper case". Give/assign both a shortcut and it works again.
Seems like by default no shortcut is assigned to it.
  댓글 수: 1
Heiko
Heiko 2012년 10월 24일
Thank you very much. This actually works, although I had to unassign other shortcuts to get the old ones back.

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

추가 답변 (4개)

Andreas Goser
Andreas Goser 2012년 10월 22일
Indeed this seems to be reomoved as also the keyboard shortcuts Ctrl U and Ctrl Shift U are not working. I will see if I can find out more.
Can you describe me the use case where you use(d) this feature? I personally can't think of a use.

Heiko
Heiko 2012년 10월 22일
Thanks for the fast response!
When writing help comments in my functions I used this for instance to repeat the function name at the beginning:
function out = xyz(in)
% XYZ function for doing stuff
Also, it helped me to see dependencies between functions if I repeated function names in upper case letetrs in m-files with multiple functions.
I could work without these functions just fine; I was just wondering...
  댓글 수: 2
Andreas Goser
Andreas Goser 2012년 10월 22일
OK. I contacted Development. At the minimum, this is an enhancement request now.
teresa
teresa 2012년 10월 24일
I'm missing this function too.

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


Sean de Wolski
Sean de Wolski 2012년 10월 24일
편집: Sean de Wolski 2012년 10월 24일
This is kind of a kludgy workaround but it should work pretty easily for you:
hEditor = matlab.desktop.editor.getActive; %get active editor
hEditor.insertTextAtPositionInLine(upper(hEditor.SelectedText),...
hEditor.Selection(1),hEditor.Selection(2)); %insert upper version of selected text.
Then hit delete to remove the current version. You could make a shortcut for each of these (upper and lower) so that it's a one button click on the shortcuts tab or Quick Access Toolbar, and then one hit of the delete button.
  댓글 수: 2
Heiko
Heiko 2012년 10월 24일
Thank you for your answer. I will give it a try, and maybe it is possible to delete the selected text as well. Right now I prefer the shortcut solution by Friedrich.
Sean de Wolski
Sean de Wolski 2012년 10월 24일
편집: Sean de Wolski 2012년 10월 24일
Friedrich's answers is certainly the best!
The editor API doesn't allow for removing text easily.

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


Michael
Michael 2013년 3월 23일
Use a 3rd party editor such as notepad++ which already has Matlab m-file syntax highlighting as default. Also has advantage you can continue to browse m files while Matlab scripts are running, unlike the built-in editor. Don't save files though while they are in use or likely to be used by active script - that just results in Matlab crashes/hangs!

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by