2011-11-12 6 views

答えて

4

効果があります。私はコード/再フォーマットオプションを使用すると、それは次のようになった

<!DOCTYPE html> 
<html> 
<head> 
    <title>The page you were looking for doesn't exist (404)</title> 
    <style type="text/css"> 
    body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } 
    div.dialog { 
     width: 25em; 
     padding: 0 4em; 
     margin: 4em auto 0 auto; 
     border: 1px solid #ccc; 
     border-right-color: #999; 
     border-bottom-color: #999; 
    } 
    h1 { font-size: 100%; color: #f00; line-height: 1.5em; } 
    </style> 
</head> 

<body> 
    <!-- This file lives in public/404.html --> 
    <div class="dialog"> 
    <h1>The page you were looking for doesn't exist.</h1> 
    <p>You may have mistyped the address or the page may have moved.</p> 
    </div> 
</body> 
</html> 

<!DOCTYPE html> 
<html> 
<head> 
    <title>The page you were looking for doesn't exist (404)</title> 
    <style type="text/css"> 
     body { 
      background-color: #fff; 
      color: #666; 
      text-align: center; 
      font-family: arial, sans-serif; 
     } 

     div.dialog { 
      width: 25em; 
      padding: 0 4em; 
      margin: 4em auto 0 auto; 
      border: 1px solid #ccc; 
      border-right-color: #999; 
      border-bottom-color: #999; 
     } 

     h1 { 
      font-size: 100%; 
      color: #f00; 
      line-height: 1.5em; 
     } 
    </style> 
</head> 

<body> 
<!-- This file lives in public/404.html --> 
<div class="dialog"> 
    <h1>The page you were looking for doesn't exist.</h1> 

    <p>You may have mistyped the address or the page may have moved.</p> 
</div> 
</body> 
</html> 

あなたはそれを再フォーマット方法を見ることができ、生成された標準404.htmlファイルを使用して

特に(もし私が改行などを変更すると、それも修正されます)。

[ファイル/設定]、[IDE設定]、[エディタ]の順に選択すると、[再フォーマットコードの表示]ダイアログボックスが表示されていることを確認してください。選択したテキストのみを修正するように設定されている可能性がありますか?または...

+0

私はあなたが正しいことを確認します。私はVSのようなものをもう少し期待していた。 RubyMineは、VSと同様に積極的ではありませんが、空白をクリーンアップすることになります。 – jcollum

+0

合意。私はVSの方が一般的には少し良くなっているのが好きです。特にコントロールが多いほどです。 – WiredPrairie

2

キーボードショートカットには⌘+⌥+ lを使用できます。

0

「プロジェクト設定>コードスタイル> HTML」でhtml書式設定オプションを変更できます。例えば

:あなたは、タブのサイズを変更することができ、インデントなど

あなたがOSX上にある場合は、ショートカット⌘+、

その他の提案使用することができます(取り外しフォーマットする前に、ファイルの名前を変更しようとします.erbから)

関連する問題