Results 1 to 8 of 8

Thread: stopping VS from automatically indenting code?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    stopping VS from automatically indenting code?

    When you close a block of cose in C# using }, VS.NET automatically adjusts the indentation for all lines of code in that block. This annoying me, as I sometimes want to indent things manually. Is there any way to stop VS from automatically indenting code when you close a block of code?

    hope it's clear
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: stopping VS from automatically indenting code?

    In the editor.... Tools menu... Options.....
    Text Editr -> All Languages -> Tabs.... Set to "None"
    That will set it for all languages in VS.... or you can go to individual languages and set the tab option there.

    Tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: stopping VS from automatically indenting code?

    no that's not what I meant. That removed auto-indenting completely. I just don't like the text being automatically re-indented when you close a block of code
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  4. #4
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: stopping VS from automatically indenting code?

    I always type the opening and closing braces first, and then fill in the code for that block, although not for the reason you want. You should find that this will allow you to indent your code however you like.

  5. #5

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: stopping VS from automatically indenting code?

    ah hmm maybe I do that then
    I wish there was a way to disable it though
    sometimes I come back to review my code and I realize that somehow all the indentations are messed up. bleh
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  6. #6
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: stopping VS from automatically indenting code?

    You can always write a plug-in for VS to do it. At work I have the Vissual Assist plug-in. I can't test now, but I am pretty sure you can do it with it. At least I can remeber that it adds the } automaticaly when you write a {, and on the right place too.


    http://www.wholetomato.com/



    - ØØ -

  7. #7

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: stopping VS from automatically indenting code?

    ah you got me excited all of a sudden and then I saw the "trial" button I thought it's free heh
    It looks really good, and yeah automatically closing the block might stop me from accidentally messing up my code
    will look into it, thanks
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

  8. #8
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190

    Re: stopping VS from automatically indenting code?

    Yeah, that is why I have it at work and not here. But I really like it though. It isn't as easy to break as the Intely Sense in VS. And you can have costum syntax highlighting and so on and so on.

    I think I will buy it for my home computer later this year. It is a pain in the ass not coding with it at home.....dangerous to be so dependendt by a tool...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width