search

Home  >  Q&A  >  body text

java - mac下的idea如何格式化代码?

天蓬老师天蓬老师2805 days ago870

reply all(6)I'll reply

  • PHP中文网

    PHP中文网2017-04-18 10:14:53

    Is this what you are talking about? Code -> Reformat Code:

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 10:14:53

    option+command+L

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-18 10:14:53

    ...Mac下大部分WindowCtrl都可以用小菊花 instead.

    windowsCtrl + Alt + L
    Mac小菊花 + Alt + L

    reply
    0
  • 黄舟

    黄舟2017-04-18 10:14:53

    option+command+L, just look at the Reformat Code in the code menu

    reply
    0
  • 迷茫

    迷茫2017-04-18 10:14:53

    I often use this function:
    Windows is obviously ctrl + alt + L
    Mac is command + alt + L
    Why do some people always say the wrong answer? In addition, you can see the shortcut keys when entering the menu

    reply
    0
  • 迷茫

    迷茫2017-04-18 10:14:53

    cmd option l
    建议配合.editorconfig

    http://editorconfig.org

    root = true

    [*]
    charset = utf-8
    end_of_line = lf
    indent_size = 2
    indent_style = space
    insert_final_newline = true
    max_line_length = 80
    trim_trailing_whitespace = true
    spaces_around_brackets = both
    spaces_around_operators = true

    [*.md]
    max_line_length = 0
    trim_trailing_whitespace = false
    insert_final_newline = false
    trim_trailing_whitespace = false

    reply
    0
  • Cancelreply