Adding code indentation without Lazarus

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding code indentation without Lazarus

Luciano de Souza
hello listers,

A blind programer doesn't matter whether a code is indented. That's my
case. For us, it's natural to disregard all code  formatation.

In spite of that, the indentation is crucial. If my code is read by
sighted programers, they will be disturbed. So if it's possible, I
want to type my code without indentation and after I want to process
de dcoe with a commandline tool which adds the indentation.

A friend told me: "Use Lazarus. It indents the code automatically".
No, Lazarus is not a alternative for me. The graphical interface of
Lazarus has severe restrictions in terms of accessibility.

My editor is Gedit. In Linux, there are not lots of accessible
editors. For this reason, I don't think I will get a plugin to do it
for me.

So I ask: Does someone know a commandline tool that indents the code
automatically?

Regards,

Luciano
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Adding code indentation without Lazarus

Vinzent Höfler
On Mon, 02 Jan 2012 15:12:15 +0100, luciano de souza <[hidden email]>  
wrote:

> So I ask: Does someone know a commandline tool that indents the code
> automatically?

Try 'ptop'. It comes with FPC already.


Vinzent.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Adding code indentation without Lazarus

michael.vancanneyt
In reply to this post by Luciano de Souza


On Mon, 2 Jan 2012, luciano de souza wrote:

> hello listers,
>
> A blind programer doesn't matter whether a code is indented. That's my
> case. For us, it's natural to disregard all code  formatation.
>
> In spite of that, the indentation is crucial. If my code is read by
> sighted programers, they will be disturbed. So if it's possible, I
> want to type my code without indentation and after I want to process
> de dcoe with a commandline tool which adds the indentation.
>
> A friend told me: "Use Lazarus. It indents the code automatically".
> No, Lazarus is not a alternative for me. The graphical interface of
> Lazarus has severe restrictions in terms of accessibility.
>
> My editor is Gedit. In Linux, there are not lots of accessible
> editors. For this reason, I don't think I will get a plugin to do it
> for me.
>
> So I ask: Does someone know a commandline tool that indents the code
> automatically?

Yes. FPC comes with a tool ptop. It indents code. It is probably not as
powerful as the lazarus code formatter, but it does the job.

Michael.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Adding code indentation without Lazarus

Marco van de Voort
In our previous episode, [hidden email] said:
> > My editor is Gedit. In Linux, there are not lots of accessible
> > editors. For this reason, I don't think I will get a plugin to do it
> > for me.
> >
> > So I ask: Does someone know a commandline tool that indents the code
> > automatically?
>
> Yes. FPC comes with a tool ptop. It indents code. It is probably not as
> powerful as the lazarus code formatter, but it does the job.

Hasn't been dialect updated for quite a while I think.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Adding code indentation without Lazarus

Luciano de Souza
I have tested ptop with very good results. It does really what I want.
As it is possible to get the default cfg with '-g", we can change it and
call the changed cfg with '-c'. It's really  a powerful and easy tool.

Em 02-01-2012 14:29, Marco van de Voort escreveu:

> In our previous episode, [hidden email] said:
>>> My editor is Gedit. In Linux, there are not lots of accessible
>>> editors. For this reason, I don't think I will get a plugin to do it
>>> for me.
>>>
>>> So I ask: Does someone know a commandline tool that indents the code
>>> automatically?
>> Yes. FPC comes with a tool ptop. It indents code. It is probably not as
>> powerful as the lazarus code formatter, but it does the job.
> Hasn't been dialect updated for quite a while I think.
> _______________________________________________
> fpc-pascal maillist  -  [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Adding code indentation without Lazarus

Sven Barth-2
As Marco said the tool wasn't updated for quite some time (according to
SVN around 4 years), so if you find language constructs that aren't
indented correctly you should add a bug report to
http://bugs.freepascal.org/ (I don't know though how friendly the bug
tracker is for blind people).

Regards,
Sven

Am 03.01.2012 00:43, schrieb Luciano de Souza:

> I have tested ptop with very good results. It does really what I want.
> As it is possible to get the default cfg with '-g", we can change it and
> call the changed cfg with '-c'. It's really a powerful and easy tool.
>
> Em 02-01-2012 14:29, Marco van de Voort escreveu:
>> In our previous episode, [hidden email] said:
>>>> My editor is Gedit. In Linux, there are not lots of accessible
>>>> editors. For this reason, I don't think I will get a plugin to do it
>>>> for me.
>>>>
>>>> So I ask: Does someone know a commandline tool that indents the code
>>>> automatically?
>>> Yes. FPC comes with a tool ptop. It indents code. It is probably not as
>>> powerful as the lazarus code formatter, but it does the job.
>> Hasn't been dialect updated for quite a while I think.
>> _______________________________________________
>> fpc-pascal maillist - [hidden email]
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
> _______________________________________________
> fpc-pascal maillist - [hidden email]
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal