• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Auto Formatting (Keyboard shortcuts or format on save)

Community Beginner ,
Aug 21, 2020 Aug 21, 2020

Copy link to clipboard

Copied

Hi is there a way i can press a keyboard shortcut for autoformatting as the default setup requires two clicks and maybe its the way i have dreamweaver setup but the indentation of code is not very good in relation to html.

Views

147

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 21, 2020 Aug 21, 2020

Copy link to clipboard

Copied

You can set your own keyboard shortcut for it under...

1. Edit > Keyboard Shortcuts
2. If you're not working with custom shortcuts yet, click the Duplicate Set (two squares icon) in the dialogue that comes up
3. Select "Menu Commands" from the "Commands" dropdown menu
4. Open the "Edit" list by clicking the > icon
5. Scroll down to "Code" and open it by clicking its > icon
6. Click "Apply Source Formatting" to highlight it
7. Click the + icon next to "Shortcuts"
8. In the "Press Key" field, pres the keyboard shortcut you want to use
9. If there are no conflicts with currently set shortcuts, click the "Change" button
10. Click "OK"

From there on out, you can select your code and hit the keyboard shortcut you set to apply source formatting.

Setting how your code behaves is a little longer process, and can be done on a per tag basis under Edit > Preferences > Code Format (set the tab sizes here) > Tag Libraries (set tabs, line breaks and more here). Apply Source Formatting uses the rules you set here to modify your code.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 21, 2020 Aug 21, 2020

Copy link to clipboard

Copied

LATEST

Thanks ill try that

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines