Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-01

Adding code indentation without Lazarus

6 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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

Vinzent Höfler
to luciano de souza
luciano de souza wrote
So I ask: Does someone know a commandline tool that indents the code automatically?

Try 'ptop'. It comes with FPC already.

Vinzent.

Unknown author
to luciano de souza: A blind programer doesn't matter whether a code is indented. That's my case. For us, it's…
luciano de souza wrote 20 lines
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.

Marco van de Voort
to Unknown author

In our previous episode, said:

Show quoted text 9 lines
> 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.

Luciano de Souza
to Marco van de Voort

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.

Marco van de Voort wrote 13 lines
In our previous episode, 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 - http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Sven Barth
to Luciano de Souza

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

Luciano de Souza wrote 22 lines
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, 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 - > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/mailman/listinfo/fpc-pascal