20Tauri / DoxyDoxygen

The last word in code documentation generation
140 stars 5 forks source link

Possible to use tabs instead of spaces? #163

Open graylaurenm opened 2 years ago

graylaurenm commented 2 years ago

My files have a Tab Size of 4, which I'd like to inherit.

For example, instead of

/**
 * { function_description }
 *
 * @param      <type>  $args   The arguments
 *
 * @return     <type>  ( description_of_the_return_value )
 */

We'd see

 /**
 * { function_description }
 *
 * @param   <type>      $args   The arguments
 *
 * @return  <type>      ( description_of_the_return_value )
 */

(Not sure if comments on here respect tabs vs spaces...)

20Tauri commented 2 years ago

Tabs in a comment are converted to spaces when the comment is updated (only tabs used for indentation are preserved). But your need is probably related to the preferred_tabs_sizes setting. Please refer to the user manual for further informations

graylaurenm commented 2 years ago

Thanks @20Tauri.

Tabs in a comment are converted to spaces when the comment is updated (only tabs used for indentation are preserved).

So there's no support for tabs, then? Or maybe there is, based on your next sentence?

But your need is probably related to the preferred_tabs_sizes setting.

I'm unclear how to use that setting to create tabs. The documentation shows the default value is [ 12, 6, 8, 8, 8, 8 ] and from the example I can that after the 12th character you're adding 6 spaces. What do the next four "8"s mean? How do I convert those 6 spaces into 2 tabs?

20Tauri commented 2 years ago

True tabs (in the editor's meaning) at the beginning of the line are accepted. Not in a docblock (as you expect)

"Tabs" behave has "rulers". The fist tab add up to 12 spaces to align the content. This ensure the alignement (but no tab are used in the generated snippet

The meaning of 8 depends of the previous values

Here the example from documentation

    //     :caption: Example with the value '[ 13, 6, 8, 8, 8, 8 ]'
    //
    //     /**
    //      * @param[in]  a     { parameter_description }
    //      * 123456789012      12345678...and continue because there is no more tab
    //      *             123456
    //      */
graylaurenm commented 2 years ago

Awesome, thank you for your written explanation, I understand now.

I know there's the whole tabs-vs-spaces debate but I'm personally trying to use tabs as I feel that formatting with them "just works." I'll consider this a non-option now, though.