473,327 Members | 2,071 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Formatting in the editor

While I like many of the features of the C# editor in Visual Studio, the
default control for indentation drives me nuts!

Regardless of how I lay it out, the editor frequently reformats my code!

For example, I am accustomed to coding standards that require that when a
procedure call involves more than three parameters and it cannot be written
on a single line on the screen, then the first parameter should be on the
first line and each subsequent parameter should be on a lone by itself and
vertically aligned with the first parameter name.

The C# editor permits me to do this, but then it automatically changes this
so each subsequent line in indented only one tab stop at intervals during my
typing! To me this makes the code much more difficult to read.

Is the a way to convince the editor not to automatically perform these
automatic reformats?

-Ken
Nov 16 '05 #1
4 1318
"Ken Allen" <ke******@sympatico.ca> wrote:
Regardless of how I lay it out, the editor frequently
reformats my code!
[...]
Is the a way to convince the editor not to automatically
perform these automatic reformats?


Tools > Options > Environment > Text Editor

P.
Nov 16 '05 #2
Text Editor is at the same level as Environment, not under it; and there are
no settings there to permit me to change the control of the indentation that
I can see.

-Ken

"Paul E Collins" <fi******************@CL4.org> wrote in message
news:c6**********@hercules.btinternet.com...
"Ken Allen" <ke******@sympatico.ca> wrote:
Regardless of how I lay it out, the editor frequently
reformats my code!
[...]
Is the a way to convince the editor not to automatically
perform these automatic reformats?


Tools > Options > Environment > Text Editor

P.

Nov 16 '05 #3
Ken Allen wrote:
Text Editor is at the same level as Environment, not under it; and there are
no settings there to permit me to change the control of the indentation that
I can see.


Text Editor -> C# -> Formatting -> Uncheck 'Automatically format [...]'.

This was the first setting I changed in VS.NET, since it wouldn't let me
use K&R bracing style.

I wonder why they have this on by default? It's a real pain, IMO.
Perhaps K&R bracing style is a little too Unix-like for MS ;-)
Nov 16 '05 #4
How disappointing that the only option is off or on -- it would be nice if
one could control this a bit more. I like that the editor auto-formats at
times, but I do not want it automatically re-formatting sections that I have
carefully lined up.

-Ken

"C# Learner" <cs****@learner.here> wrote in message
news:ea*************@TK2MSFTNGP11.phx.gbl...
Ken Allen wrote:
Text Editor is at the same level as Environment, not under it; and there are no settings there to permit me to change the control of the indentation that I can see.


Text Editor -> C# -> Formatting -> Uncheck 'Automatically format [...]'.

This was the first setting I changed in VS.NET, since it wouldn't let me
use K&R bracing style.

I wonder why they have this on by default? It's a real pain, IMO.
Perhaps K&R bracing style is a little too Unix-like for MS ;-)

Nov 16 '05 #5

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

Similar topics

0
by: scooterm | last post by:
### Question Can anyone name a text editor or XML editor (prefer open source) that can open a simple table XML file in a spreadsheet-type GUI, without adding any extra formatting or junk to the...
0
by: kk | last post by:
..NET Winforms Control for Spell and grammar check with formatting capabilitie ------------------------------------------------------------------------------------------- Need a control which has...
0
by: marfi95 | last post by:
I have an xml file that I want to maintain the whitespace on and spacing between my sections. I have something like this. <!-- Comment lines A --> <!-- Comment lines A --> <A> <B>test</B>...
2
by: D. Shane Fowlkes | last post by:
The Smart Indenting "feature" is driving me absolutlely crazy in VWD. Problem: VWD in Code View insists on tabbing a lot of my code over to it's own liking and effects mainly my comments in the...
25
by: mdh | last post by:
Hi Group, Not looking for an answer, but more of an explanation. Thinking back to those heady days when you had the time to do them, may I ask this. Exercise 1-22 asks for a program to "fold"...
1
by: Sven Fischer | last post by:
After installation of Visual CSharp Studio the current settings of the source code editor are not suitable for me. The brackets are automaticlly set in front of the lines e.g. if (.......) {...
1
by: Russell Mangel | last post by:
I am using VS2005. When I paste source code into the code window, VS2005 formats like the following: public MsgRecipientReader() : base() { }
6
by: Brian Schwartz | last post by:
Quick question related to Visual Studio's automatic code formatting. Often I like to write my variable declarations with spacing to line them up, like this (not sure if this spacing will come out...
3
by: =?Utf-8?B?b24tbGluZSBqb3VybmFsIGVkaXRvcg==?= | last post by:
I can't seem to cut-and-paste text, with either .doc or .html formatting, into my .asp web-pages --all the formatting is lost. Is there some code that needs to be added to the page that will...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.