File tree Expand file tree Collapse file tree 2 files changed +534
-384
lines changed Expand file tree Collapse file tree 2 files changed +534
-384
lines changed Original file line number Diff line number Diff line change 55using System . Text ;
66using System . Windows . Forms ;
77using System . Windows . Input ;
8+ using Microsoft . Win32 ;
89using Rubberduck . Inspections ;
910using Rubberduck . UI ;
1011using Rubberduck . UI . Command ;
@@ -205,6 +206,13 @@ public CodeInspectionSetting[] GetDefaultCodeInspections()
205206
206207 public IndenterSettings GetDefaultIndenterSettings ( )
207208 {
209+ var tabWidth = 4 ;
210+ var reg = Registry . CurrentUser . OpenSubKey ( @"Software\Microsoft\VBA\6.0\Common" , false ) ??
211+ Registry . CurrentUser . OpenSubKey ( @"Software\Microsoft\VBA\7.0\Common" , false ) ;
212+ if ( reg != null )
213+ {
214+ tabWidth = Convert . ToInt32 ( reg . GetValue ( "TabWidth" ) ?? tabWidth ) ;
215+ }
208216 return new IndenterSettings
209217 {
210218 IndentEntireProcedureBody = true ,
@@ -222,7 +230,7 @@ public IndenterSettings GetDefaultIndenterSettings()
222230 EnableUndo = true ,
223231 EndOfLineCommentStyle = SmartIndenter . EndOfLineCommentStyle . AlignInColumn ,
224232 EndOfLineCommentColumnSpaceAlignment = 50 ,
225- IndentSpaces = 4
233+ IndentSpaces = tabWidth
226234 } ;
227235 }
228236 }
You can’t perform that action at this time.
0 commit comments