# Navigation

Beside the common actions to move the cursor and select ranges or blocks in text editors Eclipse, the R editor offers additional content aware ways to navigate inside the R editor and the Eclipse workspace.

## Commands

| Name | Description | Availability
--- | --- | --- | ---
Expand selection This commands provides syntax aware code selection including a selection history. The menu items can be found in the submenu Edit > Expand Selection To.
| Select Enclosing Element | Expands the selection to the enclosing element of the current selection | Main menu (Edit) Local command `Ctrl+Shift+Up`
| Select Next Element | Expands the selection to include the element following the current selection | Main menu (Edit) Local command `Ctrl+Shift+Left`
| Select Previous Element | Expands the selection to include the element previous to the current selection | Main menu (Edit) Local command `Ctrl+Shift+Right`
| Restore Last Selection | Restores the selection to the last selection (only for commands above) | Main menu (Edit) Local command `Ctrl+Shift+Down`
Show R element
| Open Declaration | Opens the declaration of the R element referenced by the current selection | Main menu (Navigate) Local command `F3`
| Show In | Shows the element or related information of the current selection in another view, for example the R help page in the R Help view | Main menu (Navigate) Context menu
Other
| Go to matching bracket | Moves the cursor to the matching bracket | Main menu (Navigate) Local command `Ctrl+Shift+P`
| Open Hyperlink | Opens the hyperlink for the caret location | Main menu (Navigate) Local command

## Hyperlinks

Hyperlinks allow to access context sensitive actions using the mouse. Hyperlinks are enabled on demand by pressing a modifier key or key combination; if the hyperlink action is available at the mouse position, the link is shown in the editor and can be triggered by a mouse click.

There are several hyperlink actions for the R editor including actions to navigate:

Name | Description / Action | Default Modifier(s)
--- | --- | ---
Element Declaration | Opens the declaration of an R element in Eclipse (available for detected R element names), like the command Open Declaration | `Ctrl`
Local File Path | Opens the file in an editor in Eclipse (available for detected path names in string) | `Ctrl`

If more than one hyperlink actions are available for the current position, a chooser is opened and the user can selected the desired target.

#### Configuration

The different kinds of hyperlinks can be configured in the preferences (Window > Preferences) at: General > Editors > Text Editors > Hyperlinking Only items listed as Available In "R Source" in the table are relevant for R code.