开发者

Netbeans CSS auto format

In Netbeans 6.9.1 (PHP bundle) the code format (ALT+SHIFT+F) doesn't seem to work on CSS files, that is when I try to run it nothing happens. Is it normal or am I missing something?开发者_运维百科


I've check it in my version of Neatbeans (Also 6.9.1) and it seems to work fine.

If it's not working for you, perhaps you need to check your Keymap settings.

To do so,

  1. click Tools

  2. Choose Options

  3. Select the Keymap tab

  4. Perform the Alt+Shift+F keymap in the "Search in shortcuts" input field

  5. Make sure you get the following:

    Actions = Format
    
    Shortcut = Alt+Shift+F
    
    Category = Source
    

Also check that your tabs and indents are setup in the Formatting tab under the Editor Section of the Options panel.

Hope that helps, Tom


(tested with Netbeans 12.0) You can use regular expressions to add newlines:

  1. press Ctrl+H or click Menu Edit -> Replace...
  2. Find What: "([{};])" (without quotes)
  3. activate regular expressions (button with caption .* or Alt+G)
  4. Replace With: "$1\n" (without quotes)
  5. Replace All

Then you can use Alt+Shift+F to auto-indent

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜