473,467 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to indent csharp code in the vs2005

something similar to ctrl-i in exclipse.
Sep 22 '08 #1
4 1458
On Mon, 22 Sep 2008 11:35:08 -0700, puzzlecracker <ir*********@gmail.com>
wrote:
something similar to ctrl-i in exclipse.
There's probably a more direct way, but I'm lazy so...

One way to do it is to select the code you want auto-formatted, then cut
it and immediately paste it right back where it was. That is, just type
Ctrl-X followed by Ctrl-V. The default setting in VS is to auto-format on
paste.
Sep 22 '08 #2
On Sep 22, 11:35*am, puzzlecracker <ironsel2...@gmail.comwrote:
something similar to ctrl-i in exclipse.
try

from menu Tools-Options
From options dialog -TextEditor -C# -formating -indentation

-Cnu
Sep 22 '08 #3
On Sep 22, 11:47*am, "Peter Duniho" <NpOeStPe...@nnowslpianmk.com>
wrote:
On Mon, 22 Sep 2008 11:35:08 -0700, puzzlecracker <ironsel2...@gmail.com>*
wrote:
something similar to ctrl-i in exclipse.

There's probably a more direct way, but I'm lazy so...

One way to do it is to select the code you want auto-formatted, then cut *
it and immediately paste it right back where it was. *That is, just type *
Ctrl-X followed by Ctrl-V. *The default setting in VS is to auto-formaton *
paste.
I dare to suggest another shortcut... remove the last } and type it
again... the default settings for VS auto formats the code in the
{ and } block.

-Cnu
Sep 22 '08 #4
01: Highlight code
02: Press TAB to indent or
03: SHIFT + TAB to unindent (or maybe CTRL)

I think CTRL+K+D formats.
Sep 22 '08 #5

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

Similar topics

11
by: John Wellesz | last post by:
If you are coding php using GVIM, you will appreciate this new indent script: Download there: http://www.vim.org/scripts/download_script.php?src_id=3710 or here: ...
699
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
0
by: saabi | last post by:
How to indent length 4 a tab in IE? The text in this CDATA was some html code, it would indent length 8 a tab in IE, but I like to indent length 4 like in the original html editor, How to change...
1
by: _DG | last post by:
Re VS2005 editor in Emacs mode (options->env->keyboard mapping) First of all, there are very few editor options for formatting C/C++ code. Only three option pages. C# has about 10, I believe....
1
by: Roman | last post by:
I have developed a csharp web site using VS2005. What is the typical deployment method if the target server is on the local network. In any event, I am assuming I should deploy it without any...
6
by: JC | last post by:
I like your opinions about the best way of documenting the code in Csharp. To my particularly I like the solution given in VST 2000 but that they (Microsoft) removed of 2005. That you think...
6
by: gumbystation | last post by:
I am looking to take data from an excel spreadsheet into a csharp application to manipulate the data in various ways. Currently, I am using VS2005 (self-taught C#) and Excel 2000. I have...
2
by: Ram | last post by:
Hi, I have created class diagrams in visio. Is there any way to create csharp (.cs) class directly from this visio diagram? I googled it but could not find any solution. Please help. Thanks...
10
by: Divya | last post by:
I want to use indent to selectively format some code anomalies. For example, braces after if, etc. But, when I use the indent progam with - bl option, it does other things as well and changes the...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
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.