comp.lang.ada
 help / color / mirror / Atom feed
* gnat-gps indentation
@ 2010-07-07 10:58 tonyg
  2010-07-07 11:27 ` Phil Thornley
  0 siblings, 1 reply; 8+ messages in thread
From: tonyg @ 2010-07-07 10:58 UTC (permalink / raw)


Is there a quick way to correctly indent a whole ada file in this
editor ?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnat-gps indentation
  2010-07-07 10:58 gnat-gps indentation tonyg
@ 2010-07-07 11:27 ` Phil Thornley
  2010-07-07 11:35   ` tonyg
  2010-07-07 20:32   ` Gautier write-only
  0 siblings, 2 replies; 8+ messages in thread
From: Phil Thornley @ 2010-07-07 11:27 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnat-gps indentation
  2010-07-07 11:27 ` Phil Thornley
@ 2010-07-07 11:35   ` tonyg
  2010-07-07 20:32   ` Gautier write-only
  1 sibling, 0 replies; 8+ messages in thread
From: tonyg @ 2010-07-07 11:35 UTC (permalink / raw)


On Jul 7, 12:27 pm, Phil Thornley <phil.jpthorn...@gmail.com> wrote:
> 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

Thanks Phil



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnat-gps indentation
  2010-07-07 11:27 ` Phil Thornley
  2010-07-07 11:35   ` tonyg
@ 2010-07-07 20:32   ` Gautier write-only
  2010-07-07 20:58     ` Pascal Obry
  2010-07-07 22:30     ` Jeffrey R. Carter
  1 sibling, 2 replies; 8+ messages in thread
From: Gautier write-only @ 2010-07-07 20:32 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnat-gps indentation
  2010-07-07 20:32   ` Gautier write-only
@ 2010-07-07 20:58     ` Pascal Obry
  2010-07-07 22:30     ` Jeffrey R. Carter
  1 sibling, 0 replies; 8+ messages in thread
From: Pascal Obry @ 2010-07-07 20:58 UTC (permalink / raw)
  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




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnat-gps indentation
  2010-07-07 20:32   ` Gautier write-only
  2010-07-07 20:58     ` Pascal Obry
@ 2010-07-07 22:30     ` Jeffrey R. Carter
  2010-07-08  9:27       ` tonyg
  1 sibling, 1 reply; 8+ messages in thread
From: Jeffrey R. Carter @ 2010-07-07 22:30 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnat-gps indentation
  2010-07-07 22:30     ` Jeffrey R. Carter
@ 2010-07-08  9:27       ` tonyg
  2010-07-09  1:49         ` Britt Snodgrass
  0 siblings, 1 reply; 8+ messages in thread
From: tonyg @ 2010-07-08  9:27 UTC (permalink / raw)


On Jul 7, 11:30 pm, "Jeffrey R. Carter"
<spam.jrcarter....@spam.acm.org> wrote:
> 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

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.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: gnat-gps indentation
  2010-07-08  9:27       ` tonyg
@ 2010-07-09  1:49         ` Britt Snodgrass
  0 siblings, 0 replies; 8+ messages in thread
From: Britt Snodgrass @ 2010-07-09  1:49 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-07-09  1:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-07 10:58 gnat-gps indentation tonyg
2010-07-07 11:27 ` Phil Thornley
2010-07-07 11:35   ` tonyg
2010-07-07 20:32   ` Gautier write-only
2010-07-07 20:58     ` Pascal Obry
2010-07-07 22:30     ` Jeffrey R. Carter
2010-07-08  9:27       ` tonyg
2010-07-09  1:49         ` Britt Snodgrass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox