Smart Tab

When the Smart Tab command is used at various positions in your source code, Source Insight moves the selection to the next "field". A field is an interesting position, depending on the current context. Smart Tab lets you move the cursor around easily, especially when typing new function calls.

When the Smart Tab option is on (Preferences: Typing), then pressing the regular Tab key will invoke the Smart Tab command. The Simple Tab command simply inserts a tab, and avoids the Smart Tab behavior. Therefore, if you have the Smart Tab option turned on, you can use the Simple Tab command to occasionally override the Smart Tab behavior.

Smart Tab Examples

Here are some examples, starting with step 1 as the initial selection state, and steps 2 and later are the new selections after using Smart Tab. The current insertion point is marked by ^ and a selected range of text is underlined like this:

Example 1:

1. Beg^inPaint(hwnd, pps);  

2. BeginPaint(hwnd, pps);  

Example 2:

1. BeginPaint^(hwnd, pps);  

2. BeginPaint(hwnd, pps);  

3. BeginPaint(hwnd, pps);  

4. BeginPaint(hwnd, pps^);  

5. BeginPaint(hwnd, pps)^;  

Example 3:

1. ResetAbc(^)

2. ResetAbc()^

Smart Tab works like a regular tab when you use it at the beginning or end of line text, or on a line that doesn't have a function call.

The Smart Tab works well with auto-completion of function calls. When you insert a function call via the popup auto-completion window, the function's parameter types and names are also inserted, and the first parameter is selected. You only have to start typing over the first parameter, then press Smart Tab to select the next parameter.