Difference between revisions of "IDE Window: Editor Options MultiWindow"

From Free Pascal wiki
Jump to navigationJump to search
Line 65: Line 65:
  
 
=== Unlocked, if text in centered view ===
 
=== Unlocked, if text in centered view ===
 +
 +
Similar to "Locked, if text in view".
 +
 +
The centered view, is the area of the text where a jump does not scroll the editor. Depending on the size of your window, if you jump to the first or last 2 to 5 lines on the screen the editor will be scrolled.
 +
 +
However currently some jumps force a reposition of the editor, and will scroll anyway.
 +
 +
This is a separate option, because a locked editor is always assumed to be intentionally located to it's position. An unlocked editor may just to be at some location. Choosing this option is therefore more likely to sometimes unexpectedly change the window/editor.
  
 
=== Unlocked ===
 
=== Unlocked ===

Revision as of 14:41, 22 April 2010

  • You can get this dialog via:
Menu / Environment / Editor options / Mouse
Source editor / popup menu / Editor properties ...


Tabs

Hide tab in single page window

If a window contains only one editor, the tab will be hidden. The Name and modified status ("*") of the editor is shown in the window's title.

Find jump target editor

If you have more than one editor for a file open and you want to jump to a new location in the file, then there are several possibilities how to choose which editor to use.

  • This does not affect normal editor navigation, such as page up/down, simple find/replace, next occurrence of word, ...
  • It does affect how:
    • clicking on a find-in-files result
    • clicking a compiler message
    • jumping to a bookmark or history point works.
    • jumping to a declaration (in another file, if the other file has more than one editor)
    • ...
  • In some cases it can also affect codetool jumps (jumps to declaration or between interface and implementation) within the same file.
(e.g. if you jump to the declaration in the interface, and the declaration is already shown in another editor with the same file, you may want to switch to the other editor)


By default Lazarus will use the current editor. Or if you jump to a different file, it will use the most recent used editor for that file.

Lazarus offers you to change how the target editor for any of the above actions is to be found:

  • When you jump to a code location that is within the visible screen area of one of the editors.
If one of the editors showing the target file has the target location already on it's visible screen, but this editor wasn't used for longer, then the editor chosen by the above default would be a different editor. The result would be that the editor chosen by the above default would have to scroll to the same location than the other editor. You may instead want Lazarus to use the editor that is already at the correct location.
  • If you have placed an editor to an important location, and you do not want Lazarus to move this editor to another location.
You may have set an editor to show the definition of a data structure which you need to see. Now if Lazarus needs to show any other location in this file, you do not want that editor to be used, because then you would no longer see the selected structure.
In this case you can "lock" the page that you do not want to scroll, and force Lazarus to use another editor.


Order to use for editors matching the same criteria

If after evaluation the prioritized list of criteria more than one editor can be used to display whatever code you requested to jump to Lazarus will choose the editor according to the selected order.

Most recent focused editor for this file

The default setting. Lazarus remembers for each editor, when it last was focused. It will find the editor that was focused most recently.

This can be the currently active editor, if the current editor displays the requested file and matches the criteria.

Editor (for file) in most recent focused window

With this setting Lazarus looks at the window, that holds each editor. It selects the editor in the most recently focused/active Window (including the current active window).

In many cases the setting are leading to the same result. But consider the following example
The current active window has an editor for file "A". But it currently shows file "B". File "A" is also shown in another window. And the editor for "A" in the other window was more recently used, than the one in the current window. Now if you select let's say a find-in-files-result for file "A".
Last editor focus
will select the editor in the other window
Last window focus
will select the editor in the current window

Priority list of criteria to choose an editor

If Lazarus needs to find an editor in order to jump to the code you requested, then it will go through this list and use the editor from the first matching criteria. If the criteria matches more than one editor see Order for editors matching one criteria

Locked, if text in view

Will check if any locked editor already has the requested target in it's visible screen area.

Unlocked, if text in centered view

Similar to "Locked, if text in view".

The centered view, is the area of the text where a jump does not scroll the editor. Depending on the size of your window, if you jump to the first or last 2 to 5 lines on the screen the editor will be scrolled.

However currently some jumps force a reposition of the editor, and will scroll anyway.

This is a separate option, because a locked editor is always assumed to be intentionally located to it's position. An unlocked editor may just to be at some location. Choosing this option is therefore more likely to sometimes unexpectedly change the window/editor.

Unlocked

New tab in existing window / New tab in new window

Ignore Locks, longest unused editor

Ignore Locks, if editor is current / if editor in current window

New tab, existing or new window

About Page-Locking

Page locking can be found in the context menu of each editor. It tells Lazarus that you don't want this editor to be moved away from it's current location. If a page is locked and you try to jump to a location in your code (bookmark, declaration, find in file results) then Lazarus will use another editor (of the same file) to display the target location. (incremental and simple search/replace are not considered jumps, and therefore relocate the editor)