7.   Navigation

<< Previous Table of Contents   |   Detailed Index Next >>
1. Display Quick Buttons Click < Make the File Window Taller > icon at the bottom of the Crystal Window.

Or click pull-down menu View → Tall Window

2. Outer indent Click to move the cursor to the outer indent level.
3. Skip Deeper Indents

Click any one - .

For example:

-   to go from a function to the previous / next function

-   skip the body of a loop

-   to go from a case to the previous / next case

4. Sentence wise navigation

Click or buttons to go to the next or previous sentence.

You can skip a declaration with a very long initializer - with just a single click.

5. Function wise navigation Click or to go to the next or previous function
6. Go back and Go forward

To go back to the just previous position - you were editing at - click

To go back to the point where you clicked the previous < Go Back >, click

7. Pop Context Click to return to the file-and-location preceding the most recent browse operation.
8. Go to Modified lines

Visit the lines of code that were modified by you by clicking and .

Crystal REVS for C and C++ remembers modified lines even across sessions.

9. Go to Marked lines To visit the marked lines: click and .
10. Scroll half a page

-   Click to bring the current line to the top of the screen.

-   Click to bring the current line to the middle of the screen.

-   Click to bring the current line to the bottom of the screen.

11. Next or Previous word

To search for a whole word:

-   Place the cursor on a function name or identifier

-   Click the or

12. Next or Previous object

To search for an object as per the C/C++ scope rules:

-   Place the cursor on the object

-   Click or

13. Find and Replace  
      Plain Text Search /
    Object Search
You can use the search-panel in the search toolbar or the Find dialog.
      Lexical Search

To search for a sequence of tokens as per C/C++ lexical rules

(ignore differences in amount of white space, match across line boundaries)

-   Click the in the search toolbar or press + to bring the Find dialog.

-   Set the mode to Lexical Search

-   Enter the search string in the "Search for" panel.

-   Set the Scope - File/Function/Selected text.

-   Click < Find >

      Regular Expression Search

To search a regular expression

-   Click in the search toolbar or press + to bring the Find dialog.

-   Set the mode to Regular Expression Search

-   Enter the regular expression in the "Search for" panel.

-   Set the Scope - File/Function/Selected text.

-   Click < Find >

      Mark Lines

To mark all lines that contain a matching string

-   Click in the search toolbar or press + to bring the Find dialog.

-   Set the search mode

-   Enter the search string

-   Set the Scope - File/Function/Selected text.

-   Click < Mark All >.

14. Find in Files (GREP)

Press + or click on the in the search toolbar to display the Find in Files dialog.

-   Set the Search Mode: Text, Lexical, Regular Expression, Object, Modified Object.

-   Specify the search string into "Search For " panel.

-   Specify the target folders: You can select one of CURRENT FILE, DESKTOP FILES, or PROJECT FILES, or, use the
    Browse button and select the folder.

-   Click < Perform > button.

The search results are displayed in the output window under the GREP card.
 

You can view the results as a list or as a tree with

      Where modified     occurrences

Modified occurrences of an object are those occurrences where the object is being used on the left hand side of an assignment, or, contents of the object are being modified by passing the object as a reference to a function, or, the object is being subjected to pre or post increment or decrements.
 

To find all such occurrences of an object in the project

-   Place the cursor on the desired identifier.

-   Right-click, then click "Where Modified Occurrences".

      GREP and Replace

In the output window, in the GREP card

-   Click to bring the Replace dialog.

-   Specify the Replace By text.

-   Check/Uncheck the desired File Modification items.

-   Specify one of the Replace Occurrences option - Current", "All in current file" and "In all files".

-   Click < Replace >.

15. Go to Definition, Declaration and Prototype

-   Right click in the File WIndow, then click < ShowDefinition > to go to any object's definition.

-   Right click in the File Window, then click < ShowDeclaration > to go to any object's nearest declaration.

-   Place the cursor on a function name and click Goto → Prototypes to view a function's prototype

16. Perfect pair match

When the cursor is at one of:   (,   [,   {,   /*   and you click , the cursor moves to the corresponding   ),   ],   },   */   and vice versa.

When matching braces, i.e. { and }, it is not necessary to place the cursor exactly at the brace.
You can place the cursor anywhere on the line

17. From a   #if,   #ifdef   to matching   #else,   #endif and vice-versa When the cursor is on a   #if,   #ifdef,   #ifndef   click to go to the matching   #else,   #elif   or   #endif.
18. Viewing undeclared object Click on to move the cursor downward to an occurrence of an object that is undeclared and not #defined either.
19. Viewing unused object Clicking on moves the cursor to the declaration of a local object that has not been used in the program.
20 Viewing unmatched braces

Click on Goto → Find Errors → Unmatched else, (, /* etc to move the cursor downward

-   to an unmatched brace i.e. "{" or "}",

-   an unmatched comment delimiter i.e. "/*" or "*/", or,

-   an unmatched "else" i.e. an "else" for which there is no "if".

21 Viewing syntax errors

Clicking on Goto → Find Errors → Next Syntax Error moves the cursor downward to the next Syntactically Incorrect C/C++ sentence (if one is present).

With this operation you can find syntax errors in a program (even without having to compile it)

22 Outline Margin

Click Tools → Show Fold Level Margin to view the Outline Margin for every function within the file.

-   Click on '-' to collapse the current level in the function.

-   Click on '+' to expand a level in the function.

-   Right click on '+' to expand all levels under the current level.

<< Previous Table of Contents   |   Detailed Index Next >>