Partager via


Did you know... How to create a command alias? - #90

To create an alias, open up the Command Window (or anywhere you can type in VS commands) and type in something along the lines of

alias GobblesGobblesGobbles help.about

Command Window creating aliases

and now running GobblesGobblesGobbles from the VS command window will pop up the Help About menu.  I will award bonus points if you can figure out the Gobbles reference.  =)

But let’s explore a more practical application….

alias se View.SolutionExplorer

Now you can just type se to jump to the solution explorer.  For this particular example, the idea is you can be typing in the editor, press Ctrl+/ to jump to that Find window that can act as a command window, and type in se.

Actually, you’ve probably already used one of the predefined aliases before. Debug.Print is alias to ‘?’.  To see the full list of aliases, type in

alias

predefined aliases

Lastly, to reset your command window aliases back to defaults, type in

alias /reset

Reset aliases warning prompt

or just simply use the /delete switch to delete a particular alias, like alias se /delete.

Technorati tags: VS2005Tip, VS2008Tip

Comments

  • Anonymous
    November 22, 2007
    PingBack from http://msdnrss.thecoderblogs.com/2007/11/23/

  • Anonymous
    November 23, 2007
    I love your VS tips but I have a minor problem that I can't seem to find any answers to. I teach C# and my students use VC# 2008 Express on HP tablets. But I use VS2008 Professional. So I sometimes don't know when some of the neat tips you show aren't available on the Express additions. Is there a source for what features aren't available on the Express versions? I discovered by borrowing one of the student's tablets, that in Express, a command window isn't available and that I can't connect to SQL Express (only can use it with a local db file). It's embarassing to show something to the students only to have them tell me that it doesn't work on their tablets.

  • Anonymous
    November 23, 2007
    Been following along for awhile now - this one was worth it!

  • Anonymous
    November 23, 2007
    The comment has been removed

  • Anonymous
    January 14, 2008
    It's time for an old favorite from the Visual Studio 2005 days... Remember How to search using the Ctrl+D

  • Anonymous
    March 03, 2008
    Today's tip was co-authored with a tip of the day reader.  The idea is you just want to press

  • Anonymous
    August 12, 2008
    さて、今日は Visual Studio 2005 のころから人気のある機能を取り上げましょう。 以前のワンポイントでお話しした Ctrl + D キーのウィンドウを使用して検索する方法 を覚えていますか。その機能でもう少し遊んでみましょう。

  • Anonymous
    February 21, 2009
    Чтобы создать псевдоним, откройте Окно команд (или в любом месте Visual Studio, где вы можете вводить