[anjuta-devel] Indentation in project wizard.



Hi,


I have worked on the custom indentation for the project wizard.

autogen is quite powerful and I have been able to find a way to make it rewrite the output with the right indentation.

For someone writing a template, it just means

1. Add the following line at the beginning
[+INCLUDE (string-append "indent.tpl") \+]

2. Enclose the part to be indented between
[+INVOKE START-INDENT\+]
and
[+INVOKE END-INDENT\+]

3. Use one tab character for each indentation level.
All tabs will be replaced by the right indentation.



Then, the issue comes rather on how the project wizard get the needed information: width of one tab, width of one indentation level, allow to use tabs or only space.

Currently these informations are part of the editor settings (scintilla or gtksourceview). So the project wizard has no easy access to them. I see 2 solutions.

1. Move these settings in a common part by example anjuta/editor:
+ The project wizard can access them
- They can still be changed in the editor preferences. So we have to register them manually as they are not at the same place than other preferences.
I have already implement this.

2. Move these settings in the language support plugin:
+ The project wizard can access them if we indicate the language of the file.
+ We can have different settings depending on the language (python/C)
- It changes the place of these settings for the user

What do you think? Do you have other ideas?


Regards,

Sébastien



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]