File: editing.rst

package info (click to toggle)
gnat-gps 5.3dfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 50,360 kB
  • ctags: 11,617
  • sloc: ada: 374,346; ansic: 92,327; python: 15,979; xml: 12,186; sh: 3,277; makefile: 1,113; awk: 154; perl: 128; java: 17
file content (33 lines) | stat: -rw-r--r-- 1,369 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 `[+]` sign
(a triangle under unix systems) 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 cross 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 `OK` in the color selection dialog.

Click on the `Apply` button and look at the effects in the source editor. If
you like the new display, click on `OK` to confirm the changes, otherwise
clicking on `Cancel` will revert to the previous color.