473,473 Members | 2,016 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Inserting blank lines breaks lines of code

I have a big VS 2002/2003 annoyance, and wondering if there is a way to turn
it off:

Put your cursor at the start of an indented line of code inside a function.
(right before the first character, not at the left margin) Now press Enter.

It does insert a blank line, but it also moves your cursor 6 characters to
the right, so that it is no longer at the beginning of the statement. If you
press Enter again, you've now busted apart the line of code at a strange
place.

Huge, huge frustration when you want to insert 3 or 4 lines, and you end up
mangling your code.
This works as expected in VB6, and I'm having a hard time breaking the
habit. In VB6, your cursor stays at the same vertical column, and you can
insert multiple lines by hitting Enter repeatedly.

Any solution to this? Anyone know if this behavior is the same in VS 2005?
Thanks!!
Nov 21 '05 #1
3 2814
"BradC" <br********@yahoo.com> schrieb:
I have a big VS 2002/2003 annoyance, and wondering if there is a way to
turn it off:

Put your cursor at the start of an indented line of code inside a
function. (right before the first character, not at the left margin) Now
press Enter.

It does insert a blank line, but it also moves your cursor 6 characters to
the right, so that it is no longer at the beginning of the statement. If
you press Enter again, you've now busted apart the line of code at a
strange place.


I turned pretty listing off...

"Tools" -> "Options..." -> "Text Editor" -> "Basic" -> "VB-specific" -> ...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #2
I tried that, and one of the other things the "Pretty Listing" feature
provides (recasing) is something I rely on pretty heavily. (I type in all
lower, and then when it capitalizes function names or variables, it is a
subtle visual confirmation that I typed them correctly. Hmm... If I ever
pick up C#, that's gonna be a huge problem for me, right? C# not only
doesn't auto-correct capitalization, it is actually case sensitive and will
error out if function names or variable are not cased right.)

I did find that if switch the "Text Editor -> Basic -> Tabs" option to
"Block" instead of "Smart", it doesn't auto-indent for me, which sorta
solves the problem. Unfortunately, it also means I have to manually do the
indents under IFs or DOs, which is really annoying.

I guess we can point to the automatic "smart" indenting feature as the
culprit, but this still feels like an interface bug to me. Pressing Enter to
go down a line should only indent you IF you are moving inside a block. In
my listed example, you are just moving the current line down a row.

Can anyone confirm if this is still a problem in 2005 ?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:e3**************@TK2MSFTNGP15.phx.gbl...
"BradC" <br********@yahoo.com> schrieb:
I have a big VS 2002/2003 annoyance, and wondering if there is a way to
turn it off:

Put your cursor at the start of an indented line of code inside a
function. (right before the first character, not at the left margin) Now
press Enter.

It does insert a blank line, but it also moves your cursor 6 characters
to the right, so that it is no longer at the beginning of the statement.
If you press Enter again, you've now busted apart the line of code at a
strange place.


I turned pretty listing off...

"Tools" -> "Options..." -> "Text Editor" -> "Basic" -> "VB-specific" ->
...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
This problem was gone in Beta of VB Express, have not seen VS 2005 beta but
I would hope that things like this problem would be the same in both.

Lloyd SHeen

"BradC" <br********@yahoo.com> wrote in message
news:et**************@tk2msftngp13.phx.gbl...
I tried that, and one of the other things the "Pretty Listing" feature
provides (recasing) is something I rely on pretty heavily. (I type in all
lower, and then when it capitalizes function names or variables, it is a
subtle visual confirmation that I typed them correctly. Hmm... If I ever
pick up C#, that's gonna be a huge problem for me, right? C# not only
doesn't auto-correct capitalization, it is actually case sensitive and will
error out if function names or variable are not cased right.)

I did find that if switch the "Text Editor -> Basic -> Tabs" option to
"Block" instead of "Smart", it doesn't auto-indent for me, which sorta
solves the problem. Unfortunately, it also means I have to manually do the
indents under IFs or DOs, which is really annoying.

I guess we can point to the automatic "smart" indenting feature as the
culprit, but this still feels like an interface bug to me. Pressing Enter
to go down a line should only indent you IF you are moving inside a block.
In my listed example, you are just moving the current line down a row.

Can anyone confirm if this is still a problem in 2005 ?
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:e3**************@TK2MSFTNGP15.phx.gbl...
"BradC" <br********@yahoo.com> schrieb:
I have a big VS 2002/2003 annoyance, and wondering if there is a way to
turn it off:

Put your cursor at the start of an indented line of code inside a
function. (right before the first character, not at the left margin) Now
press Enter.

It does insert a blank line, but it also moves your cursor 6 characters
to the right, so that it is no longer at the beginning of the statement.
If you press Enter again, you've now busted apart the line of code at a
strange place.


I turned pretty listing off...

"Tools" -> "Options..." -> "Text Editor" -> "Basic" -> "VB-specific" ->
...

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>


Nov 21 '05 #4

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

Similar topics

12
by: dan glenn | last post by:
Hi. I'm finding that if I have text entered into a <textarea ...> </textarea> in a form, and that text has leading blank lines (with no spaces or anything else), that when I retrieve the entered...
1
by: Astra | last post by:
Hi All Could you please let me know how my ASP page can insert 1 row of data containing line breaks into a MySQL DB. To explain, I'm using ASP Classic > MyODBC 3.5x (Win) > MySQL 4 (Win) and...
6
by: Melissa | last post by:
Does anyone have a generic procedure for adding blank lines to reports like Sales details, PO details and/or Orders details. The procedure would need to count the number of line items, determine...
1
by: Ken Fine | last post by:
I'm using ASP VB. I want to insert a VbCr or a VbLf into a declared string every N characters. FWIW, I want to do this because of an apparent limitation in MSXML2, which I am using to "scrape" data...
20
by: alice | last post by:
I'm doing some text swapping with javascript, got it working fine, but I would like the line to have line breaks and being a beginner, I don't even know if this is possible. So I have a line like...
15
by: Yogi | last post by:
Hi there, I have a quick question. In my html document, I want to make a new paragraph whenever I have a blank line in the html source. Using <p> and </pevery time is kind of cumbersome (I want...
23
by: andrew | last post by:
Hi, I have been taken to task about the length of lines in the source html of: http://www.slrn.sourceforge.org which, as I commonly do, has no line breaks at all in the source html. My...
5
by: rando1000 | last post by:
Okay, here's my situation. I need to loop through a file, inserting records based on a number field (in order) and if the character in a certain field = "##", I need to insert a blank record. ...
6
by: ems9tech | last post by:
I am creating a 5 page document HTML document with variable table sizes. I am hard coding page breaks after the <DIV> for each page. To assure that all of my page numbers at the bottom of each page...
0
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,...
0
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...
0
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,...
0
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.