Skip to content

Commit

Permalink
Fix tabs (oh, the irony).
Browse files Browse the repository at this point in the history
  • Loading branch information
dvander committed Aug 30, 2013
1 parent ab449e4 commit 539e25f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Connect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void OnWindowActivated(EnvDTE.Window gotFocus, EnvDTE.Window lostFocus)
if (settings.et == null)
{
// If the language is C++, use the default tab setting (hard tabs), otherwise,
// VS seems to like soft tabs for other languages.
// VS seems to like soft tabs for other languages.
if (gotFocus.Document.Language == CodeModelLanguageConstants.vsCMLanguageVC)
settings.et = kDefaultHardTabs;
else
Expand All @@ -108,7 +108,7 @@ public void OnWindowActivated(EnvDTE.Window gotFocus, EnvDTE.Window lostFocus)
if (settings.ts == null)
settings.ts = kDefaultTabSize;

// In Vim and Visual Studio, the following settings are roughly analogous:
// In Vim and Visual Studio, the following settings are roughly analogous:
// ts and TabSize
// sw and IndentSize
// noet/et and InsertTabs
Expand All @@ -133,7 +133,7 @@ public void OnWindowActivated(EnvDTE.Window gotFocus, EnvDTE.Window lostFocus)

SetDTEProperty("TextEditor", gotFocus.Document.Language, "TabSize", settings.ts);
SetDTEProperty("TextEditor", gotFocus.Document.Language, "IndentSize", settings.sw);
SetDTEProperty("TextEditor", gotFocus.Document.Language, "InsertTabs", !settings.et);
SetDTEProperty("TextEditor", gotFocus.Document.Language, "InsertTabs", !settings.et);
}

private void ReadModelines(TextDocument td, Settings settings)
Expand Down Expand Up @@ -187,9 +187,9 @@ private bool DetectVimModeline(Settings settings, string line)
int nchars = 0;
for (int i = index + key.Length; i < line.Length; i++)
{
if (!Char.IsNumber(line[i]))
break;
nchars++;
if (!Char.IsNumber(line[i]))
break;
nchars++;
}

int result = 0;
Expand Down

0 comments on commit 539e25f

Please sign in to comment.