Home

Editing in Simply Fortran

Simply Fortran incorporates a powerful Fortran editor based on the Scintilla source code editing engine. Along with this editing component, Simply Fortran provides additional tools to aid a developer in editing source code efficiently.

Common Operations

Simply Fortran conforms to common editing standards. Cut, Copy, and Paste operations can all be found in the Edit menu , and may be accessed via the usual hotkeys. All text in a document may also be selected via the Control+A hotkey or the appropriate Edit menu entry.

Navigating to Definitions

In supported languages, users can immediately navigate to the definition of any variable or procedure by holding the Control key and clicking the variable or procedure name.

Indenting and Dedenting

Selected text can either be indented or dedented using the Indent and Dedent entries in the Edit menu respectively. Alternatively, the hotkeys Tab and Shift+Tab can be used to indent and dedent. The indents added (and dedents subtracted) are dictated by the tab settings in the Editor options dialog .

Entire files can be indented automatically in an intelligent manner using the Smart Indent File entry in the Edit menu. For supported languages, which include fixed- and free-format Fortran, this option will indent entries according to the program structure.

Continuing Lines

In supported situations, namely when editing Fortran source code or comments in most supported languages, Simply Fortran can automatically and intelligently continue lines by pressing the Control+ENTER hotkey combination. If editing Fortran code, the appropriate line continuation control characters will be entered regardless of whether the code is fixed- or free-format Fortran. Multiline comments are also intelligently extended using this hotkey.

Commenting

Simply Fortran has the ability to comment and uncomment selections in supported languages . The current engine supports commenting and uncommenting entire lines of text only. To comment a line, text is first selected, then either the Comment Line entry in the Edit menu or the Control+R hotkey is used. The reverse can be performed by selecting commented lines and either clicking the Uncomment Line entry in the Edit menu or pressing the Control+T hotkey combination.

Context Menu

By right-clicking in the editor, a user will open the editor context menu, offering quick access to some common operations. The context menu appears below:

Editor Context Menu

Depending on the current conditions in Simply Fortran, some option may be disabled. Cut, Copy, and Paste perform the expected editing operations.

The two related multiple selection options, Select Matching and Select Matching Words, are enabled when text is selected. The former will search for and select any text within the current document that matches the currently selected text. The latter will perform a similar action, but it requires the selection to be restricted to matching words rather than simply text fragments. After multiple selections are highlighted, typing will replace all selections simultaneously.

The Indent Line and Dedent Line items indent and dedent respectively the current line or selected lines. Continue onto Next Line will insert the proper line continuation characters if the current editor tab’s language is supported. Comment Line and Uncomment Line will convert the current line or selected lines into comments when supported by the current editor’s language settings.

The Continue onto Next Line will insert the proper Fortran line continuation marker at the current location and move any trailing text to the next line.

The two search options, Search Project for Text and Search Project for Element, will launch searches based on currently selected text. The first will perform a general text search. The second will locate matching elements within Simply Fortran’s index of project elements (procedures, programs, derived types, etc.).

The Insert submenu contains select programming structures that can be inserted into the code using a popup window rather than having to manually type these structures. This menu will change or be entirely disabled based on the current language mode in the editor.

The Rename option allows the user to perform an automated renaming of the selected element. Currently, only modules are supported by renaming, and this menu option is only enabled when the module’s definition statement is selected. This feature will be expanded in future versions. More about renaming is covered in the Refactoring topic .

The Goto Definition works similarly to the procedure described above. Based on the selected text, Simply Fortran will open the definition of the selected element if the location of the definition is known.

The Bookmarks submenu contains functions for managing bookmarks within the current editor tab. Toggle Bookmark will create or remove a bookmark on the current line in the editor. Next Bookmark and Previous Bookmark will navigate to the next or previous bookmark in the file, respectively; these functions do not wrap around in the editor. The Clear All Tab Bookmarks will remove all bookmarks in the current editor tab.

The Debugging submenu is only enabled when the current project’s target program is being debugged.

See Also

Languages and Syntax Highlighting
Movement and Bookmarks
Search and Replace
Refactoring