QML style guide
Matt Williams
lists at milliams.com
Tue Oct 30 12:22:21 UTC 2012
On 30 October 2012 12:16, Aaron J. Seigo <aseigo at kde.org> wrote:
> On Tuesday, October 30, 2012 15:01:04 Dmitry Ashkadov wrote:
>> 30.10.2012 14:35, Aaron J. Seigo пишет:
>> >>>> 5. Vim:
>> >>>>> The {{{ and }}} are just for the sakes of vim's automatic folding.
>> >>>>
>> >>>> Do we all use vim? I think no. So, we must never force developers use
>> >>>> vim.
>> >>>
>> >>> i mostly agree :) i don't think this forces anyone to use vim, but i
>> >>> would
>> >>> like to see a solution that works with katepart before adding it to the
>> >>> style guide.
>> >>
>> >> Do you want force developers use kate?
>> >
>> > of course not :)
>> >
>> > but i'd like to make the lives of people who use kate, vim, etc. easier if
>> > possible. if we have to chose between "no one benefits from code folding"
>> > or "some people get to benefit", we should pick "some people" every
>> > single time. "some" is better than "none".
>> >
>> > this does not prevent you from using any editor you wish -> you might not
>> > get the cute little bonus of code folding, but otherwise it's the same as
>> > it is right now already.
>>
>> An editor should handle braces and provide folding functionality. I
>> don't think, that forcing all developer always put "{{{" and "}}}" in
>> addition to braces { }, is good idea.
>
> the suggestion was to only do this for the different sections such as property
> definitions. example:
>
> Item {
> id: foo
>
> /* property definitions {{{ */
> property bar: true
> inheritedProperty: 123
> /* }}} */
>
> /* JS functions {{{ */
> function myFunc() {
> }
>
> function myOtherFunc() {
> }
> /* }}} */
> }
>
> the idea is that lets you fold down allthe js functions or all the property
> definitions.
It's just a shame that it doesn't align with the Doxygen grouping
syntax http://www.stack.nl/~dimitri/doxygen/grouping.html
Matt
More information about the Plasma-devel
mailing list