Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Orion/Documentation/User Guide/Reference/Coding page"

(Key Bindings)
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
= Coding page =
 
= Coding page =
Navigate to the <b>Coding</b> page by clicking any file in the [[Orion/Documentation/User_Guide/Reference/Navigator_page|Navigator page]] that has a corresponding Orion editor. This page is comprised mainly of an editor area, and a collapsible outline section on the left hand side. Error markers are shown in the gutter to the left of the line numbers, as underline squiggles in the text, and a birds-eye view of errors is shown next to the scroll bar on the right. The name of the file being edited, and the current line and column information are shown in the title area at the top of the page.
+
Navigate to the <b>Coding</b> page by clicking any file in the [[Orion/Documentation/User_Guide/Reference/Navigator_page|Navigator page]] that has a corresponding Orion editor. This page is comprised mainly of an editor area, and a collapsible navigator / code outline section on the left hand side. Error markers are shown in the gutter to the left of the line numbers, as underline squiggles in the text, and a birds-eye view of errors is shown next to the scroll bar on the right. The name of the file being edited, and the current line and column information are shown in the title area at the top of the page. Editor fonts and colors can be customized from the [[Orion/Documentation/User_Guide/Reference/Settings_page|Settings page]].
  
[[Image:Orion-editor-overview.png]]
+
[[Image:Orion-editor-overview.png|Coding page]]
 +
 
 +
== Editor features ==
  
 
When editing JavaScript, comments containing the word "TODO" will also appear as annotations in the ruler and overview bars. Hover on the annotation to see the comment associated with the TODO statement.
 
When editing JavaScript, comments containing the word "TODO" will also appear as annotations in the ruler and overview bars. Hover on the annotation to see the comment associated with the TODO statement.
  
[[Image:Orion-editor-todo.png]]
+
[[Image:Orion-editor-todo.png|TODO annotations]]
  
The editor supports many of the typical key bindings from the Eclipse editor. To find out what key bindings are available, type Alt+Shift+? (or Ctrl+Shift+? on Mac OS X).
+
You can navigate into hyperlinks in the editor by holding down the Ctrl key (Cmd on Mac).
  
[[Image:Orion-editor-key-assist.png]]
+
[[Image:Orion-editor-hyperlinks.png|Editor hyperlinks]]
 +
 
 +
The Orion editor supports folding sections of a file that you aren't interested in looking at. For example, you can fold comments in JavaScript files. Folding sections are shown as little plus or minus icons in the editor ruler. Hovering on the annotation for a folded section will let you peek at hidden the contents.
 +
 
 +
[[Image:Orion-editor-folding.png|Peek folding annotation contents]]
 +
 
 +
The editor supports many of the typical key bindings from the Eclipse editor. To find out what key bindings are available select Options > Keyboard Shortcuts or type Alt+Shift+? (or Ctrl+Shift+? on Mac OS X).
 +
 
 +
[[Image:Orion-editor-key-assist.png|Keyboard Help]]
 +
 
 +
== Key Bindings ==
 +
 
 +
The editor has a default set of keybindings. As part of the 3.0 release, an initial set of keybindings have been added for vi and emacs. These can be accessed through either the local editor settings combo or from the editor settings page.
 +
 
 +
[[Image:DefaultBindings.png|default bindings]][[Image:ViBindings.png|vi bindings]] [[Image:Emacs.png|emacs bindings]]
 +
 
 +
It is possible to choose a keybinding set from either the local settings page:
 +
 
 +
[[Image:LocalEditorSettings.png|local editor settings]]
 +
 
 +
Or from the Editor settings page:
 +
 
 +
[[Image:EditorSettings.png|editor settings]]
  
 
== Language tools ==
 
== Language tools ==
Line 18: Line 42:
 
Basic content assist is currently supported in JavaScript, CSS, and HTML files. Other file types may be supported depending on what plugins you have installed. Type Ctrl+Space to open content assist at the current cursor position in the editor. Some content assist proposals require you to fill in certain variables after the proposal is selected. For example, if you select the "for..in" proposal in JavaScript, the editor enters a linked mode to let you fill in the property name and object to be iterated.
 
Basic content assist is currently supported in JavaScript, CSS, and HTML files. Other file types may be supported depending on what plugins you have installed. Type Ctrl+Space to open content assist at the current cursor position in the editor. Some content assist proposals require you to fill in certain variables after the proposal is selected. For example, if you select the "for..in" proposal in JavaScript, the editor enters a linked mode to let you fill in the property name and object to be iterated.
  
[[Image:Orion-editor-linked-mode.png]]
+
[[Image:Orion-editor-linked-mode.png|Editor linked mode]]
  
 
Type in an appropriate value for the variable, and hit Tab key to move to the next variable. When you are finished, exit linked mode by hitting Enter.
 
Type in an appropriate value for the variable, and hit Tab key to move to the next variable. When you are finished, exit linked mode by hitting Enter.
Line 28: Line 52:
 
There are plugins available that define additional outline capabilities for various file types. Click '''Get Plugins''' in the top banner to find additional outline plugins for HTML and JavaScript. When multiple outlines are available, a drop-down menu appears at the top of the outline, allowing you to select a particular outline presentation:
 
There are plugins available that define additional outline capabilities for various file types. Click '''Get Plugins''' in the top banner to find additional outline plugins for HTML and JavaScript. When multiple outlines are available, a drop-down menu appears at the top of the outline, allowing you to select a particular outline presentation:
  
[[Image:Orion-editor-outline-menu.png]]
+
[[Image:Orion-editor-outline-menu.png|Outline dropdown menu]]
  
 
== Searching ==
 
== Searching ==
Line 36: Line 60:
 
* Ctrl+J will perform an incremental search as you type. A message in the title area will let you know you are in incremental find mode, and will turn red to indicate no matches were found.
 
* Ctrl+J will perform an incremental search as you type. A message in the title area will let you know you are in incremental find mode, and will turn red to indicate no matches were found.
 
* Ctrl+H will search for occurrences of the currently selected text across all files. The search results will pop up in a new window, from which you can navigate to files containing the matches
 
* Ctrl+H will search for occurrences of the currently selected text across all files. The search results will pop up in a new window, from which you can navigate to files containing the matches
* Typing search terms in the search box in the upper right corner of the title area will search for the terms across all files, and display matches in the [[Orion/Documentation/User_Guide/Reference/Search_Results_page|Search Results page]].
+
* Typing search terms in the search box in the upper right corner of the title area will search for the terms across all files, and display matches in the [[Orion/Documentation/User_Guide/Reference/Search_Results_page|Search Results page]]. From there you can further filter and sort the results, and initiate a replace operation across multiple files.
 +
* Ctrl+Shift+F will open the '''Find File''' dialog, where you can search for a file or bookmarked favorite by name, using simple wildcards.
 +
 
 +
[[Image:Orion-openresource.png|Find file named dialog]]

Revision as of 16:48, 21 June 2013

Coding page

Navigate to the Coding page by clicking any file in the Navigator page that has a corresponding Orion editor. This page is comprised mainly of an editor area, and a collapsible navigator / code outline section on the left hand side. Error markers are shown in the gutter to the left of the line numbers, as underline squiggles in the text, and a birds-eye view of errors is shown next to the scroll bar on the right. The name of the file being edited, and the current line and column information are shown in the title area at the top of the page. Editor fonts and colors can be customized from the Settings page.

Coding page

Editor features

When editing JavaScript, comments containing the word "TODO" will also appear as annotations in the ruler and overview bars. Hover on the annotation to see the comment associated with the TODO statement.

TODO annotations

You can navigate into hyperlinks in the editor by holding down the Ctrl key (Cmd on Mac).

Editor hyperlinks

The Orion editor supports folding sections of a file that you aren't interested in looking at. For example, you can fold comments in JavaScript files. Folding sections are shown as little plus or minus icons in the editor ruler. Hovering on the annotation for a folded section will let you peek at hidden the contents.

Peek folding annotation contents

The editor supports many of the typical key bindings from the Eclipse editor. To find out what key bindings are available select Options > Keyboard Shortcuts or type Alt+Shift+? (or Ctrl+Shift+? on Mac OS X).

Keyboard Help

Key Bindings

The editor has a default set of keybindings. As part of the 3.0 release, an initial set of keybindings have been added for vi and emacs. These can be accessed through either the local editor settings combo or from the editor settings page.

default bindingsvi bindings emacs bindings

It is possible to choose a keybinding set from either the local settings page:

local editor settings

Or from the Editor settings page:

editor settings

Language tools

Syntax highlighting for several languages is built into the Orion editor. In particular there is support for JavaScript, HTML, CSS, and Java. A CodeMirror plugin is available that provides syntax highlighting for a large variety of other languages.

Basic content assist is currently supported in JavaScript, CSS, and HTML files. Other file types may be supported depending on what plugins you have installed. Type Ctrl+Space to open content assist at the current cursor position in the editor. Some content assist proposals require you to fill in certain variables after the proposal is selected. For example, if you select the "for..in" proposal in JavaScript, the editor enters a linked mode to let you fill in the property name and object to be iterated.

Editor linked mode

Type in an appropriate value for the variable, and hit Tab key to move to the next variable. When you are finished, exit linked mode by hitting Enter.

Content outline

The Outline pane to the left of the editor shows the structure of the file you are editing. Click entries in the outline to jump to the corresponding location in the editor. When not in use, you can collapse the Outline pane using Ctrl+O.

There are plugins available that define additional outline capabilities for various file types. Click Get Plugins in the top banner to find additional outline plugins for HTML and JavaScript. When multiple outlines are available, a drop-down menu appears at the top of the outline, allowing you to select a particular outline presentation:

Outline dropdown menu

Searching

There are several ways to perform searches in the editor (some key bindings may be different on Mac OS):

  • Ctrl+F will open a dialog to search for occurrences of some text in the current editor
  • Ctrl+J will perform an incremental search as you type. A message in the title area will let you know you are in incremental find mode, and will turn red to indicate no matches were found.
  • Ctrl+H will search for occurrences of the currently selected text across all files. The search results will pop up in a new window, from which you can navigate to files containing the matches
  • Typing search terms in the search box in the upper right corner of the title area will search for the terms across all files, and display matches in the Search Results page. From there you can further filter and sort the results, and initiate a replace operation across multiple files.
  • Ctrl+Shift+F will open the Find File dialog, where you can search for a file or bookmarked favorite by name, using simple wildcards.

Find file named dialog

Back to the top