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

From Free Pascal wiki
Jump to navigationJump to search
Line 34: Line 34:
 
*If you have placed an editor to an important location, and you do not want Lazarus to move this editor to another 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.
 
::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.
+
::In this case you can "[[#About_Page-Locking|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 ==
 
== Order to use for editors matching the same criteria ==
 +
 +
If after evaluation the [[#Priority_list_of_criteria_to_choose_an_editor|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 ===
 +
 +
=== Editor (for file) in most recent focused window ===
 +
  
 
== Priority list of criteria to choose an editor ==
 
== 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_to_use_for_editors_matching_the_same_criteria|Order for editors matching one criteria]]
 +
 +
 +
= 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.

Revision as of 14:55, 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

Editor (for file) in most recent focused 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


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.