File: editing.rst

package info (click to toggle)
gnat-gps 18-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 45,716 kB
  • sloc: ada: 362,679; python: 31,031; xml: 9,597; makefile: 1,030; ansic: 917; sh: 264; java: 17
file content (33 lines) | stat: -rw-r--r-- 1,300 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
***************
Editing sources
***************

In the project view, open the `common` directory by clicking on the triangle
on the left of `common`.  This will open the directory and display a list of
source files located in this directory.

Now, double click on :file:`sdc.adb`: this will open a source editor on this
file. The source code is syntax-highlighted: keywords, comments, strings and
characters have different colors.

As with many other properties, colors are configurable in GPS:

Select the menu `Edit->Preferences...`. This will open a preferences dialog
window.

Select the `Editor->Fonts & Colors` page by clicking on the triangle next to the
item `Editor` and then selecting the `Fonts & Colors` item.

As you go over the various lines and labels, you will notice that by holding
the mouse over a label, a tool tip pops up displaying on-line help about the
selected item.

Change the background color of the `Keywords` by clicking on the last button,
at the right of the `Keywords` line.

Choose a color, e.g a light green. When you're done with the color selection,
click on `Select` in the color selection dialog.

After selecting a color, look at the effects in the source editor. If
you like the new display, click on `Close` to close dialog, otherwise
select another color.