Skip to main content
Participating Frequently
January 15, 2021
Answered

Modification de l'indentation automatique du code

  • January 15, 2021
  • 4 replies
  • 796 views

Bonjour tout le monde.

 

Comment puis-je modifier le format d'indentation automatique du code qu'on obtient en passant par "Edition - Code - Appliquer le format source" ?

Je voudrai avoir une tabulation pour chaque balise avec la bonne indentation, au lieu des 2 espaces.

 

Merci d'avance.

    This topic has been closed for replies.
    Correct answer Nancy OShea

    Hello @philippeh76967859,

    Go to Preferences > Code Format.

    Check the box to Indent and select Tab from the drop-down list.

    Post back if you need more help.

     

    4 replies

    Participating Frequently
    January 20, 2021

    Donc, il fausdra reprendre ce fichier pour chaque site ???

    C'est lourd.
    J'espère qu'une solution sera rapidement trouvé interne à DW.

    Ce logiciel devient de plus en plus une usine à gaz et c'est bien dommage.

    Participating Frequently
    January 18, 2021

    Tank you for your reponses.

     

    Et comment garder le format des IF ?

    J'ai l'habitude d'utiliser ce format :

    if (condition)

    {

    }

    else

    {

    }

     

    Est-ce que c'est possible ?

    Participating Frequently
    January 18, 2021

    En fait, je voudrai que " { " soit sur la ligne suivante.

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    January 15, 2021

    Hello @philippeh76967859,

    Go to Preferences > Code Format.

    Check the box to Indent and select Tab from the drop-down list.

    Post back if you need more help.

     

    Nancy O'Shea— Product User & Community Expert
    Nayan_Kankariya
    Community Manager
    Community Manager
    January 15, 2021

    Hi @philippeh76967859 ,

     

    Thanks for writing to us. You can modify the preference of Tab/Spaces indentation by setting Tabs in Indent dropdown under Code Format section of Preferences dialog. You will have to click on Apply button after making the change and Close the Preferences dialog. Please see if setting this resolved the issue for you else we will further investigate the issue.

     

     

    Have a pleasant day!

     

    Regards,

    Nayan

    Dreamweaver Team