Welcome to MSDN Blogs Sign in | Join | Help

Sara Ford's Weblog

My adventures embracing open source on CodePlex and at Microsoft

News

    • Did you know... All author proceeds go directly to sending Hurricane Katrina survivors to college.

      Microsoft Visual Studio Tips book

      Recent Entries

Did you know... How to convert spaces to tabs and tabs to spaces? - #019

There are four commands that involve converting spaces to tabs and tabs to spaces.

Edit – Advanced - Tabify Selected Lines – Replaces the leading whitespace on a line that contains the selection with tabs. 

Edit – Advanced - Untabify Selected Lines  - replaces the leading whitespace on a line that contains the selection with spaces. 

Tabify and Untabify Selected Lines menu items

Note: The Edit – Advanced – (Un)Tabify Selected Lines isn’t supported for VB. 

Edit.ConvertTabsToSpaces – converts selected whitespace to spaces. 

Edit.ConvertSpacesToTabs – converts selected whitespace to tabs. 

Convert Spaces To Tabs shown in Tools Options Keyboard page

Note:

  • Theses commands are not available by default on the Edit menu, so you’ll either have to bind it to a keyboard shortcut, put it on the menu yourself (tip coming soon), or run it from the Ctrl+D Window (tip coming soon).
  • You may have to uncheck Tools – Options – Text Editor – Basic – VB Specific – Pretty Listing (reformatting) of code to use Edit.ConvertTabsToSpaces and Edit.ConvertSpacesToTabs – provided you’re using tabs as the default and want to convert something to spaces.  But the other way will work fine (if default is tabs and you’re converting spaces to tabs)
Technorati tags: ,
Posted: Tuesday, August 21, 2007 3:00 AM by saraford

Comments

vik20000in said:

Wow, this was new to me.

P.S It would be more easy for people to usnderstand if you also write somewhere that you are talking about visual studio

# August 21, 2007 6:46 AM

Jason Haley said:

# August 21, 2007 9:36 AM

Jason Haley said:

# August 21, 2007 9:43 AM

Noticias externas said:

This tip and yesterday's tip were my least favorite features to test. It would just drive me crazy

# December 7, 2007 6:10 AM

Sara Ford's WebLog said:

This tip and yesterday's tip were my least favorite features to test. It would just drive me crazy trying

# December 8, 2007 11:00 PM

Visual Studio 2008 ワンポイント said:

スペースとタブを相互に変換するには、次の 4 つのコマンドがあります。 [編集] メニューの [詳細] の [選択行にタブを設定] : 選択した行の先頭の空白をタブに変換します。 [編集] メニューの

# July 13, 2008 11:47 PM

Секреты Visual Studio said:

Есть четыре команды, предназначенные для замены знаков пробела в знаки табуляции и наоборот: Edit –

# August 4, 2008 3:31 AM

Benson-希 said:

# December 9, 2008 3:47 AM
New Comments to this post are disabled
Page view tracker