Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gnat-gps indentation

402 views
Skip to first unread message

tonyg

unread,
Jul 7, 2010, 6:58:00 AM7/7/10
to
Is there a quick way to correctly indent a whole ada file in this
editor ?

Phil Thornley

unread,
Jul 7, 2010, 7:27:44 AM7/7/10
to
On 7 July, 11:58, tonyg <tonytheg...@googlemail.com> wrote:
> Is there a quick way to correctly indent a whole ada file in this
> editor ?

Ctrl-Tab indents the current line or all selected lines.

(Ctrl-A selects all the lines in a file.)

Cheers,

Phil

tonyg

unread,
Jul 7, 2010, 7:35:35 AM7/7/10
to

Thanks Phil

Gautier write-only

unread,
Jul 7, 2010, 4:32:43 PM7/7/10
to
On Jul 7, 7:27 am, Phil Thornley wrote:

> Ctrl-Tab indents the current line or all selected lines.

Cool - do you know how to unindent, comment, uncomment a block as
well ?
It something that is very easily available in AdaGIDE (key+buttons)
and that woud be great in GPS.
Gautier

Pascal Obry

unread,
Jul 7, 2010, 4:58:56 PM7/7/10
to Gautier write-only
Le 07/07/2010 22:32, Gautier write-only a écrit :
> Cool - do you know how to unindent, comment, uncomment a block as
> well ?

Yes, ctrl+- and ctrl+_ (to comment/uncomment), all this is in the Edit
menu with the corresponding key short cut displayed :)

--

--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net - http://v2p.fr.eu.org
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver keys.gnupg.net --recv-key F949BD3B

Jeffrey R. Carter

unread,
Jul 7, 2010, 6:30:01 PM7/7/10
to
On 07/07/2010 01:32 PM, Gautier write-only wrote:
> On Jul 7, 7:27 am, Phil Thornley wrote:
>
>> Ctrl-Tab indents the current line or all selected lines.
>
> Cool - do you know how to unindent, comment, uncomment a block as
> well ?

Actually, Ctrl-Tab *reformats* the current or selected lines. That may involve
indenting, unindenting, or leaving the indentation the same.

--
Jeff Carter
"Unix and C are the ultimate computer viruses."
Richard Gabriel
99

tonyg

unread,
Jul 8, 2010, 5:27:09 AM7/8/10
to
On Jul 7, 11:30 pm, "Jeffrey R. Carter"

I think I twisted the english language a bit when I said 'correctly
indent' when I should of said 'correctly format'. I asked because I've
been using gnat-gps for the first time to do an ada project moving
from gedit and vi.

Britt Snodgrass

unread,
Jul 8, 2010, 9:49:44 PM7/8/10
to
On Jul 8, 4:27 am, tonyg <tonytheg...@googlemail.com> wrote:
>
> I think I twisted the english language a bit when I said 'correctly
> indent' when I should of said 'correctly format'. I asked because I've
> been using gnat-gps for the first time to do an ada project moving
> from gedit and vi.

I'd recommend you also try using the ASIS based "gnatpp" pretty-
printer. It's very configurable (using a Pretty_Printer package in
the GNAT Project file) and is what you probably want to use once the
your code is complete and correct enough to compile. You can invoke
it from GPS's Edit menu. The formatting options are described in the
GNAT Users Guide.

- Britt

0 new messages