Difference between revisions of "IDE tricks"

From Free Pascal wiki
Jump to navigationJump to search
Line 1: Line 1:
 
{{IDE tricks}}
 
{{IDE tricks}}
  
== Create a new file with Open file ==
+
= Create a new file with Open file =
  
 
You can create a new file and save it, or you can create a new file with filename and filetype in one step:
 
You can create a new file and save it, or you can create a new file with filename and filetype in one step:
 
Just open file (Ctrl+o) and select an non existing file. For example: unit1.pas. The IDE will ask you if it should be created.
 
Just open file (Ctrl+o) and select an non existing file. For example: unit1.pas. The IDE will ask you if it should be created.
  
== IDE macros ==
+
= IDE macros =
  
 
[[IDE Macros in paths and filenames]]
 
[[IDE Macros in paths and filenames]]
  
== Getting the compiler command line parameters created by the IDE ==
+
= Getting the compiler command line parameters created by the IDE =
  
 
You can copy the parameters from Project -> Compiler Options -> Show Options. Here the paths are relative to the project directory. So in most cases you can copy them without adjusting.
 
You can copy the parameters from Project -> Compiler Options -> Show Options. Here the paths are relative to the project directory. So in most cases you can copy them without adjusting.
Line 20: Line 20:
 
This way, you can compile your (hopefully working and bugfree) code, outside of the lazarus IDE.
 
This way, you can compile your (hopefully working and bugfree) code, outside of the lazarus IDE.
  
== Closing all editor files except one ==
+
= Closing all editor files except one =
  
 
Under gtk (available for linux, macosx and freebsd) the source editor pages have a close button right to their page name. Press the Ctrl key while clicking on the button, closes all files except the clicked one.
 
Under gtk (available for linux, macosx and freebsd) the source editor pages have a close button right to their page name. Press the Ctrl key while clicking on the button, closes all files except the clicked one.
 +
 +
= Component palette =
 +
 +
== Finding a component in the palette ==
 +
 +
You know the component name, or part of it, but you don't know in which page it was? This tool finds it:
 +
Right click on a component in the palette to open the popup menu. Choose 'Find component'. Type part of the name to filter the list.
 +
 +
== Open the package of a component in the palette ==
 +
 +
Right click on the component to open the popup menu, then choose open package.
 +
 +
== Find the source declaration of a component in the palette ==
 +
 +
Right click on the component to open the popup menu, then choose open unit.

Revision as of 17:45, 11 July 2006

Deutsch (de) English (en) français (fr) magyar (hu) 日本語 (ja) 한국어 (ko) русский (ru) slovenčina (sk) 中文(中国大陆)‎ (zh_CN)

Create a new file with Open file

You can create a new file and save it, or you can create a new file with filename and filetype in one step: Just open file (Ctrl+o) and select an non existing file. For example: unit1.pas. The IDE will ask you if it should be created.

IDE macros

IDE Macros in paths and filenames

Getting the compiler command line parameters created by the IDE

You can copy the parameters from Project -> Compiler Options -> Show Options. Here the paths are relative to the project directory. So in most cases you can copy them without adjusting.

The parameters are also saved to the *.compiled file. For example if your project is called test1.lpi, then a test1.compiled is created. It is a simple text xml file, so you can just copy the options and adjust the paths to compile on another computer. The file is put into the same directory, where the executable is created.

For packages this works the same.

This way, you can compile your (hopefully working and bugfree) code, outside of the lazarus IDE.

Closing all editor files except one

Under gtk (available for linux, macosx and freebsd) the source editor pages have a close button right to their page name. Press the Ctrl key while clicking on the button, closes all files except the clicked one.

Component palette

Finding a component in the palette

You know the component name, or part of it, but you don't know in which page it was? This tool finds it: Right click on a component in the palette to open the popup menu. Choose 'Find component'. Type part of the name to filter the list.

Open the package of a component in the palette

Right click on the component to open the popup menu, then choose open package.

Find the source declaration of a component in the palette

Right click on the component to open the popup menu, then choose open unit.