What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 128 Stack Exchange communities.

I have this following code in one of my SO question ,

public IQueryable<Materials> GetMaterial(int id)
    {
        return from m in db.Materials
                        join Mt in db.MeasurementTypes on m.MeasurementTypeId equals Mt.Id
                        where m.Mat_id equals id
                        select new Materials()
                        {
                            Id = Convert.ToInt64(m.Mat_id),
                            Mat_Name = m.Mat_Name,
                            Mes_Name = Mt.Name,
                        };
    }

Look at the code from the forth line it is far right so that vertical scroll bar is seen... I have to select all the code from the 4th line till }; and move to left still further so that i can eliminate vertical scrollbar....... I tried Shift+Tab what it does it takes focus to the title textbox... Any suggestion...

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Copy/paste it into a decent texteditor, use the unident feature, paste it back.

share|improve this answer

To outdent, like you want, you can select the indented lines (ensure to select whole lines, not partial lines) and click the "code" button or press Ctrl-K. That will not allow you to indent code further though: it will indent 4 spaces if there's no indenting yet, or outdent one step in all other cases.

As an aside: it's also best to use spaces, not tabs, and certainly not mix them. See How does The Editor Handle Tab Characters?

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .