473,775 Members | 3,835 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Tabs and Indents

In VS.2005, using VB.NET

My editor is behaving strangely.

If I press the tab key, the line moves over the appropriate
number of spaces. When I click on another line, the line that I had tab'd on
moves over more spaces.

I have changed the tab and insert, but it doesn't seem to work.

The help says:

Indent size
Sets the size in spaces of an automatic indentation. The default is four spaces. Tab characters, space characters, or both
will be inserted to fill the specified size.

What does this mean? What is an "Automatic indentation?"
Is that a tab?
What exactly is the difference between tab and automatic indentation,
do they influence one another.

Thanks in Advance,

Laurence

'--------------------------------------------------------------------------------------------------------------------

Indenting
None
When selected, new lines are not indented. The insertion point is placed in the first column of a new line.

Block
When selected, new lines are automatically indented. The insertion point is placed at the same starting point as the
preceding line.

Smart
When selected, new lines are positioned to fit the code context, per other code formatting settings and IntelliSense
conventions for your development language. This option is not available for all development languages.

For example, lines enclosed between an opening brace ( { ) and a closing brace ( } ) might automatically be indented an extra
tab stop from the position of the aligned braces.

Tabs
Tab size
Sets the distance in spaces between tab stops. The default is four spaces.

Indent size
Sets the size in spaces of an automatic indentation. The default is four spaces. Tab characters, space characters, or both
will be inserted to fill the specified size.

Insert spaces
When selected, indent operations insert only space characters, not TAB characters. If the Indent size is set to 5, for
example, then five space characters are inserted whenever you press the TAB key or the Increase Indent button on the
Formatting toolbar.

Keep tabs
When selected, indent operations insert as many TAB characters as possible. Each TAB character fills the number of spaces
specified in Tab size. If the Indent size is not an even multiple of the Tab size, space characters are added to fill in the
difference.
Aug 28 '06 #1
2 2316
What does this mean? What is an "Automatic indentation?"
Is that a tab?
What exactly is the difference between tab and automatic indentation,
do they influence one another.
Automatic indentation is the indentation that VS creates automatically when
you write code in the editor. A Tab is a preset space of one or more
characters that are inserted when the TAB key is pressed. Automatic
indentation can use tabs or spaces. That is, for example, if you go to a new
line in your code, according to the rules of automatic indentation, 5 space
characters or, perhaps 1 tab character will be inserted (if the size of the
tab is set to 5).

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

It takes a tough man to make a tender chicken salad.
"Laurence" <So*******@Some thing.comwrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
In VS.2005, using VB.NET

My editor is behaving strangely.

If I press the tab key, the line moves over the appropriate
number of spaces. When I click on another line, the line that I had tab'd
on
moves over more spaces.

I have changed the tab and insert, but it doesn't seem to work.

The help says:

Indent size
Sets the size in spaces of an automatic indentation. The default is four
spaces. Tab characters, space characters, or both will be inserted to fill
the specified size.

What does this mean? What is an "Automatic indentation?"
Is that a tab?
What exactly is the difference between tab and automatic indentation,
do they influence one another.

Thanks in Advance,

Laurence

'--------------------------------------------------------------------------------------------------------------------

Indenting
None
When selected, new lines are not indented. The insertion point is placed
in the first column of a new line.

Block
When selected, new lines are automatically indented. The insertion point
is placed at the same starting point as the preceding line.

Smart
When selected, new lines are positioned to fit the code context, per other
code formatting settings and IntelliSense conventions for your development
language. This option is not available for all development languages.

For example, lines enclosed between an opening brace ( { ) and a closing
brace ( } ) might automatically be indented an extra tab stop from the
position of the aligned braces.

Tabs
Tab size
Sets the distance in spaces between tab stops. The default is four spaces.

Indent size
Sets the size in spaces of an automatic indentation. The default is four
spaces. Tab characters, space characters, or both will be inserted to fill
the specified size.

Insert spaces
When selected, indent operations insert only space characters, not TAB
characters. If the Indent size is set to 5, for example, then five space
characters are inserted whenever you press the TAB key or the Increase
Indent button on the Formatting toolbar.

Keep tabs
When selected, indent operations insert as many TAB characters as
possible. Each TAB character fills the number of spaces specified in Tab
size. If the Indent size is not an even multiple of the Tab size, space
characters are added to fill in the difference.

Aug 29 '06 #2

The tools options panel has
an item under Text Edit,
Basic,

it has General
Tabs
VB specific

When I click on the Tabs item, I get a panel on the left that includes
selections for indenting and tabs.

The top group box has an options for indenting, (None, Block, Smart)
and then the Tab group box has an indent option also.

If they are separate things, then why is indenting and tabs in the same panel?

What is the Indent size for in the Tab Group box?
Isn't the Indent taken care of in the Indenting group Box?

No matter what I do, when I hit the enter key,
the line I was on gets moved over to the right.

Thanks in Advance,

Laurence

Kevin Spencer wrote:
>What does this mean? What is an "Automatic indentation?"
Is that a tab?
What exactly is the difference between tab and automatic indentation,
do they influence one another.

Automatic indentation is the indentation that VS creates automatically when
you write code in the editor. A Tab is a preset space of one or more
characters that are inserted when the TAB key is pressed. Automatic
indentation can use tabs or spaces. That is, for example, if you go to a new
line in your code, according to the rules of automatic indentation, 5 space
characters or, perhaps 1 tab character will be inserted (if the size of the
tab is set to 5).
Aug 30 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1861
by: Tim Marshall | last post by:
There must be some way that tabs are set in module windows. A lot of the code I've used from the Access Web and other sites have indents that I can't possibly imitate. Is there a way to do this? I'm in A97. TIA -- Tim - http://www.ucs.mun.ca/~tmarshal/ ^o<
135
7524
by: Xah Lee | last post by:
Tabs versus Spaces in Source Code Xah Lee, 2006-05-13 In coding a computer program, there's often the choices of tabs or spaces for code indentation. There is a large amount of confusion about which is better. It has become what's known as “religious war” — a heated fight over trivia. In this essay, i like to explain what is the situation behind it, and which is proper.
35
2721
by: Ben | last post by:
Hi, I have a python script on a unix system that runs fine. I have a python script on a windows system that runs fine. Both use tabs to indent sections of the code. I now want to run them on the same system, actually in the same script by combining bits and pieces. But whatever I try my windows tabs get converted to spaces when I transfer it to the unix system and the interpreter complains that the indentation style is not consistent...
16
10169
by: Alan Isaac | last post by:
I am brand new to pylint. As a tab user, I want the tabs warning turned off. How? Larger question: where is the config file format documented? Thanks, Alan Isaac
0
9622
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
9455
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10272
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10110
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10053
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9917
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8941
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5487
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4020
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.