Jump to content

C# IDE formatting setup

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
6 replies to this topic

#1
oggologgo

oggologgo

    Newbie

  • Members
  • Pip
  • 3 posts
1 - I just started with Visual C# Express. Unfortunately it inserts spaces when you press tab, and I cannot find any place to change this behavior. Is it possible to change this? I want hard tabs, not spaces (and I am not interested in any debate about what people prefer and why).

2 - I'd also like to know if it's possible to change the code formatting. I don't want to turn it off. I just want to change a few things to my preference.

Edited by oggologgo, 08 June 2010 - 06:55 AM.
Found solution already


#2
oggologgo

oggologgo

    Newbie

  • Members
  • Pip
  • 3 posts
Never mind about number 1. Just after I finally decided to post this, I noticed the little checkbox in the lower left corner of options saying "Show all settings". ^^

I am still interested in 2 though.

Currently it auto formats like this:

private void button1_Click(object sender, EventArgs e)
{
    label1.Text = "Hello, World!";
}
and I'd like it to format like this:

private void button1_Click(object sender, EventArgs e) {
    label1.Text = "Hello, World!";
}

Edited by oggologgo, 08 June 2010 - 12:22 PM.


#3
Davide

Davide

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 506 posts
I doubt there is any place to change any of these, Visual Studio would be useless without them.
Are you a newbie programmer trying to learn C#? Check out my small tutorial: Visual C# Programming Basics

#4
oggologgo

oggologgo

    Newbie

  • Members
  • Pip
  • 3 posts
Without what?

#5
Chris Weimer

Chris Weimer

    Learning Programmer

  • Members
  • PipPipPip
  • 37 posts
Argh! I hate that 2nd formatting, but it seems standard, being what's used in others, e.g. Dev-C++ and Netbeans.

#6
l@mbd@

l@mbd@

    Newbie

  • Members
  • PipPip
  • 27 posts
Go to Tools -> Options -> Text Editor -> C# -> Formatting

It's not as complete as Eclipse or Code::Blocks, but you can still tweak things a bit

#7
gokuajmes

gokuajmes

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 518 posts
Did u get the answer member ?