private static void GoToEndOfPreviousWord( EnvDTE.EditPoint pt) { pt.CharLeft(1); while ((pt.GetText(1) != " ") && (pt.GetText(1) != "\t")) { pt.CharLeft(1); } while ((pt.GetText(1) == " ") || (pt.GetText(1) == "\t")) { pt.CharLeft(1); } pt.CharRight(1); }