Tab Completion is a popup that can be found in both the Command Window and the Editor. After you type a key (or a few) you can hit the tab key and a popup will appear and show you all of the possible completions, including variable names and figure properties. If you are a horrible typist like I am, this can save you from having to type the whole string and hit backspace over the typos. It is also useful when you just can’t remember the functionname. I find myself sometimes thinking, “I know that the function I want to call here starts with ‘str’…”. Hitting tab in this case shows me all of the functions that start with that string.
Once the popup has appeared, you can continue to type to narrow your choices or you can arrow to the correct item and then hit tab or enter to insert that completion into the window.
Some long-time users of MATLAB will fondly recall the old days when the completions printed to the window. Hitting tab 2x would display any completions in the output area. If your fingers still try to do this, there is a preference in the “Keyboard” section of Preferences called “Tab key narrows completions”. This preference changes the behavoir of tab completion to work more like the old tab completion. When the popup is showing, you can type a few keys and hit tab again to narrow the completions. Hit enter to select a completion.
Do you use the tab completion popup in the default mode or in the “tab narrows” mode?
댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.