2016-09-08 3 views
3

名前があるかどうかわかりませんが、自動的にインデントを付ける(/ tab?) - 大きなソースコードを関連付けるそのような:Visual Studioでコードのインデントを自動的に調整できますか?

this._strategies = new Dictionary< Type, IStrategy > 
{ 
    {typeof(Station), new StationStrategy(this)}, 
    {typeof(Turnout), new TurnoutStrategy(this)}, 
    {typeof(EndOfLine), new EndOfLineStrategy(this)}, 
    {typeof(Chainage_Equality), new ChainageEqualityStrategy(this)}, 
    {typeof(Track_Connector), new TrackConnectorStrategy(this)}, 
    {typeof(Multimeter), new MultimeterStrategy(this)}, 
    {typeof(Power_Rail_Gap), new PowerRailGapStrategy(this)}, 
    {typeof(EndOfWire), new EndOfWireStrategy(this)}, 
    {typeof(Grounding_Point), new GroundingPointStrategy(this)}, 
    {typeof(Busbar), new BusbarStrategy(this)}, 
    {typeof(AARU), new AutomaticAssuredReceptivityUnitStrategy(this)}, 
    {typeof(TPS), new TractionPowerSubstationStrategy(this)}, 
    {typeof(AutoTransformer), new AutotransformerStrategy(this)}, 
    {typeof(Energy_Storage), new EnergyStorageStrategy(this)}, 
}; 

後::前

提案されているよう

this._strategies = new Dictionary< Type, IStrategy > 
{ 
    {typeof(Station),    new StationStrategy(this)}, 
    {typeof(Turnout),    new TurnoutStrategy(this)}, 
    {typeof(EndOfLine),   new EndOfLineStrategy(this)}, 
    {typeof(Chainage_Equality), new ChainageEqualityStrategy(this)}, 
    {typeof(Track_Connector),  new TrackConnectorStrategy(this)}, 
    {typeof(Multimeter),   new MultimeterStrategy(this)}, 
    {typeof(Power_Rail_Gap),  new PowerRailGapStrategy(this)}, 
    {typeof(EndOfWire),   new EndOfWireStrategy(this)}, 
    {typeof(Grounding_Point),  new GroundingPointStrategy(this)}, 
    {typeof(Busbar),    new BusbarStrategy(this)}, 
    {typeof(AARU),    new AutomaticAssuredReceptivityUnitStrategy(this)}, 
    {typeof(TPS),     new TractionPowerSubstationStrategy(this)}, 
    {typeof(AutoTransformer),  new AutotransformerStrategy(this)}, 
    {typeof(Energy_Storage),  new EnergyStorageStrategy(this)}, 
}; 

私はCtrlキー + KCtrlキー + Fを知っていますhere、私はそれをいつも使っていますが、私が探しているものではありません。

私は手動でコードをタブで表示しようとしましたが、毎回そのようにしたくありません。

私はVisual Studio拡張機能を探しています。

+0

この拡張は助けるかもしれないが、コードに関わる誰もがそれをインストールする必要があります。https://www.alwaysaligned.net/ –

+0

@LucasTrzesniewski AlwaysAlignedです私が望むものだが、ユーザーあたり40ドルだ。私は$ 0.99の領域で何かを探していました。 – Brandon

+0

@Brandonまた、ページの上部に大きな "ダウンロード無料コピー"ボタンがあります。奇妙な。 –

答えて

3

私はそのような目的のためにCode Alignment VisualStudioエクステンションを使用していました。ここで

それが何ができるかである(taken from official website

person.FirstName = "Chris";    => person.FirstName = "Chris"; 
    person.Surname = "McGrath";    => person.Surname = "McGrath"; 
    person.Age = 24;       => person.Age  = 24; 
    person.Occupation = "Software Developer"; => person.Occupation = "Software Developer"; 
    person.HomeTown = "Brisbane";    => person.HomeTown = "Brisbane"; 
関連する問題