Skip to content

Tip 2.11: What’s the difference between smart indenting and block indenting?

May 2, 2013

“Visual Studio Tips, 251 ways to improve your Productivity in Visual Studio“, courtesy of ‘Sara Ford’

Sara Ford’s Blog

Smart indenting is the option you want, provided you want the cursor to be properly indented whenever you press Enter or the up and down arrows in the code. An example is when you create a new method called Method1() and then hit Enter. You’ll notice the cursor automatically indents itself. If you continue to hit Enter, the cursor will remain indented. Not all languages support this smart indenting, but if the language you’re using does, this should be the default setting for that language.

Block indenting is similar to a document editor. Using Visual Basic as an example, the difference here is when you type in Method1() and hit Enter, only that first new line is automatically indented. The next new line places the cursor at column 0.

Selecting None will not indent any new lines. You will have to indent everything manually.

Happy Programming! =)

Advertisements
Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: