Re: no more Macros for VS2012!

2012-06-29 Thread Preet Sangha
Just discovered this:

http://stackoverflow.com/q/11270794/30225

Now I want use macros where ever I need

Alas they're going

On 30 June 2012 08:48, Jano Petras  wrote:

> Cheers guys, all valued advices. Will try to play with those. Thanks.
>
>
>
> On 29 June 2012 16:58, Wallace Turner  wrote:
>
>> Jano, Resharper also fixes the problem if you use Code Cleanup (Ctrl-E,
>> C) and select the default profile 'Reformat Code'
>>
>> It will remember your last profile so you can quickly run it, allbeit
>> with a few more keys.
>>
>>
>> On Fri, Jun 29, 2012 at 6:39 PM,  wrote:
>>
>>> I have ctrl+q (in editor) do the following.
>>>
>>> Reformat, order usings, and close the file.
>>>
>>> Davy
>>> Hexed into a portable ouija board.
>>> --
>>> *From: * "Mark Thompson" 
>>> *Sender: * ozdotnet-boun...@ozdotnet.com
>>> *Date: *Fri, 29 Jun 2012 20:01:37 +0930
>>> *To: *'ozDotNet'
>>> *ReplyTo: * ozDotNet 
>>> *Subject: *RE: no more Macros for VS2012!
>>>
>>> Hi Jano,
>>>
>>> ** **
>>>
>>> I use CTRL + E, D (“Format Document” under Edit > Advanced menu in
>>> VS2010) – this should remove any trailing whitespace from all lines as well
>>> as format the file as per the formatting settings you have set under Tools
>>> > Options >Text Editor.
>>>
>>> ** **
>>>
>>> Cheers,
>>>
>>> Mark.
>>>
>>> ** **
>>>
>>> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
>>> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Jano Petras
>>> *Sent:* Friday, 29 June 2012 7:26 PM
>>> *To:* ozDotNet
>>> *Subject:* Re: no more Macros for VS2012!
>>>
>>> ** **
>>>
>>> Well, I do have one usage of macros - to strip off trailing whitespace
>>> from all lines in a code file. I have mapped it to Ctrl-W and using it all
>>> the time.
>>>
>>> Is there a built-in command that can do this now? If not, I will be
>>> affected, and will need to do something about it.
>>>
>>> Are any of you guys using something similar to perform this? Or hanging
>>> whitespace at the end of lines does not bother you ?
>>>
>>>
>>> Cheers,
>>> jano
>>>
>>> 
>>>
>>> On 28 June 2012 08:56, Arjang Assadi  wrote:***
>>> *
>>>
>>> FYI Evryone who uses macros, they are gone from VS 11 since less than 1%
>>> of people were using them:
>>>
>>>
>>> http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-8c42-e31b669c9f11/
>>> 
>>>
>>>  
>>>
>>> But as one of the posts pointed out they were being used by super users
>>> that most likely would turn off the usage data gathering features.
>>>
>>>  
>>>
>>> Regards
>>>
>>>  
>>>
>>> Arjang
>>>
>>> ** **
>>>
>>
>>
>


-- 
regards,
Preet, Overlooking the Ocean, Auckland


Re: no more Macros for VS2012!

2012-06-29 Thread Jano Petras
Cheers guys, all valued advices. Will try to play with those. Thanks.


On 29 June 2012 16:58, Wallace Turner  wrote:

> Jano, Resharper also fixes the problem if you use Code Cleanup (Ctrl-E, C)
> and select the default profile 'Reformat Code'
>
> It will remember your last profile so you can quickly run it, allbeit with
> a few more keys.
>
>
> On Fri, Jun 29, 2012 at 6:39 PM,  wrote:
>
>> I have ctrl+q (in editor) do the following.
>>
>> Reformat, order usings, and close the file.
>>
>> Davy
>> Hexed into a portable ouija board.
>> --
>> *From: * "Mark Thompson" 
>> *Sender: * ozdotnet-boun...@ozdotnet.com
>> *Date: *Fri, 29 Jun 2012 20:01:37 +0930
>> *To: *'ozDotNet'
>> *ReplyTo: * ozDotNet 
>> *Subject: *RE: no more Macros for VS2012!
>>
>> Hi Jano,
>>
>> ** **
>>
>> I use CTRL + E, D (“Format Document” under Edit > Advanced menu in
>> VS2010) – this should remove any trailing whitespace from all lines as well
>> as format the file as per the formatting settings you have set under Tools
>> > Options >Text Editor.
>>
>> ** **
>>
>> Cheers,****
>>
>> Mark.
>>
>> ** **
>>
>> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
>> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Jano Petras
>> *Sent:* Friday, 29 June 2012 7:26 PM
>> *To:* ozDotNet
>> *Subject:* Re: no more Macros for VS2012!
>>
>> ** **
>>
>> Well, I do have one usage of macros - to strip off trailing whitespace
>> from all lines in a code file. I have mapped it to Ctrl-W and using it all
>> the time.
>>
>> Is there a built-in command that can do this now? If not, I will be
>> affected, and will need to do something about it.
>>
>> Are any of you guys using something similar to perform this? Or hanging
>> whitespace at the end of lines does not bother you ?
>>
>>
>> Cheers,
>> jano
>>
>> 
>>
>> On 28 June 2012 08:56, Arjang Assadi  wrote:
>>
>> FYI Evryone who uses macros, they are gone from VS 11 since less than 1%
>> of people were using them:
>>
>>
>> http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-8c42-e31b669c9f11/
>> 
>>
>>  
>>
>> But as one of the posts pointed out they were being used by super users
>> that most likely would turn off the usage data gathering features.
>>
>>  
>>
>> Regards
>>
>>  
>>
>> Arjang
>>
>> ** **
>>
>
>


Re: no more Macros for VS2012!

2012-06-29 Thread Wallace Turner
Jano, Resharper also fixes the problem if you use Code Cleanup (Ctrl-E, C)
and select the default profile 'Reformat Code'

It will remember your last profile so you can quickly run it, allbeit with
a few more keys.

On Fri, Jun 29, 2012 at 6:39 PM,  wrote:

> I have ctrl+q (in editor) do the following.
>
> Reformat, order usings, and close the file.
>
> Davy
> Hexed into a portable ouija board.
> --
> *From: * "Mark Thompson" 
> *Sender: * ozdotnet-boun...@ozdotnet.com
> *Date: *Fri, 29 Jun 2012 20:01:37 +0930
> *To: *'ozDotNet'
> *ReplyTo: * ozDotNet 
> *Subject: *RE: no more Macros for VS2012!
>
> Hi Jano,
>
> ** **
>
> I use CTRL + E, D (“Format Document” under Edit > Advanced menu in VS2010)
> – this should remove any trailing whitespace from all lines as well as
> format the file as per the formatting settings you have set under Tools >
> Options >Text Editor.
>
> ** **
>
> Cheers,
>
> Mark.
>
> ** **
>
> *From:* ozdotnet-boun...@ozdotnet.com [mailto:
> ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Jano Petras
> *Sent:* Friday, 29 June 2012 7:26 PM
> *To:* ozDotNet
> *Subject:* Re: no more Macros for VS2012!
>
> ** **
>
> Well, I do have one usage of macros - to strip off trailing whitespace
> from all lines in a code file. I have mapped it to Ctrl-W and using it all
> the time.
>
> Is there a built-in command that can do this now? If not, I will be
> affected, and will need to do something about it.
>
> Are any of you guys using something similar to perform this? Or hanging
> whitespace at the end of lines does not bother you ?
>
>
> Cheers,
> jano
>
> 
>
> On 28 June 2012 08:56, Arjang Assadi  wrote:
>
> FYI Evryone who uses macros, they are gone from VS 11 since less than 1%
> of people were using them:
>
>
> http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-8c42-e31b669c9f11/
> 
>
>  
>
> But as one of the posts pointed out they were being used by super users
> that most likely would turn off the usage data gathering features.
>
>  
>
> Regards
>
>  
>
> Arjang
>
> ** **
>


Re: no more Macros for VS2012!

2012-06-29 Thread djones147
I have ctrl+q (in editor) do the following.

Reformat, order usings, and close the file.  

Davy
Hexed into a portable ouija board. 

-Original Message-
From: "Mark Thompson" 
Sender: ozdotnet-boun...@ozdotnet.com
Date: Fri, 29 Jun 2012 20:01:37 
To: 'ozDotNet'
Reply-To: ozDotNet 
Subject: RE: no more Macros for VS2012!

Hi Jano,

 

I use CTRL + E, D ("Format Document" under Edit > Advanced menu in VS2010) -
this should remove any trailing whitespace from all lines as well as format
the file as per the formatting settings you have set under Tools > Options
>Text Editor.

 

Cheers,

Mark.

 

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Jano Petras
Sent: Friday, 29 June 2012 7:26 PM
To: ozDotNet
Subject: Re: no more Macros for VS2012!

 

Well, I do have one usage of macros - to strip off trailing whitespace from
all lines in a code file. I have mapped it to Ctrl-W and using it all the
time. 

Is there a built-in command that can do this now? If not, I will be
affected, and will need to do something about it.

Are any of you guys using something similar to perform this? Or hanging
whitespace at the end of lines does not bother you ?


Cheers,
jano



On 28 June 2012 08:56, Arjang Assadi  wrote:

FYI Evryone who uses macros, they are gone from VS 11 since less than 1% of
people were using them:

http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-
8c42-e31b669c9f11/

 

But as one of the posts pointed out they were being used by super users that
most likely would turn off the usage data gathering features.

 

Regards

 

Arjang

 




RE: no more Macros for VS2012!

2012-06-29 Thread Mark Thompson
Hi Jano,

 

I use CTRL + E, D ("Format Document" under Edit > Advanced menu in VS2010) -
this should remove any trailing whitespace from all lines as well as format
the file as per the formatting settings you have set under Tools > Options
>Text Editor.

 

Cheers,

Mark.

 

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com]
On Behalf Of Jano Petras
Sent: Friday, 29 June 2012 7:26 PM
To: ozDotNet
Subject: Re: no more Macros for VS2012!

 

Well, I do have one usage of macros - to strip off trailing whitespace from
all lines in a code file. I have mapped it to Ctrl-W and using it all the
time. 

Is there a built-in command that can do this now? If not, I will be
affected, and will need to do something about it.

Are any of you guys using something similar to perform this? Or hanging
whitespace at the end of lines does not bother you ?


Cheers,
jano



On 28 June 2012 08:56, Arjang Assadi  wrote:

FYI Evryone who uses macros, they are gone from VS 11 since less than 1% of
people were using them:

http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-
8c42-e31b669c9f11/

 

But as one of the posts pointed out they were being used by super users that
most likely would turn off the usage data gathering features.

 

Regards

 

Arjang

 



Re: no more Macros for VS2012!

2012-06-29 Thread Jano Petras
Hi Wallace,

I am not aware of any shortcut key that would move cursor to the last
character (ignoring whitespace) at the end of the line.

As for the macro, here it is. It basically does regex find/replace on
current file:


Option Strict Off
Option Explicit Off
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports EnvDTE90a
Imports EnvDTE100
Imports System.Diagnostics

Public Module UtilityMacros

Sub RemoveWhitespaceAtEndOfLines()
DTE.Find.PatternSyntax =
vsFindPatternSyntax.vsFindPatternSyntaxRegExpr
DTE.Find.Action = vsFindAction.vsFindActionReplaceAll
DTE.Find.FindWhat = ":b+$"
DTE.Find.ReplaceWith = ""
DTE.Find.Target = vsFindTarget.vsFindTargetCurrentDocument
DTE.Find.MatchCase = False
DTE.Find.MatchWholeWord = False
DTE.Find.MatchInHiddenText = False
DTE.Find.ResultsLocation = vsFindResultsLocation.vsFindResultsNone

If (DTE.Find.Execute() = vsFindResult.vsFindResultNotFound) Then
DTE.StatusBar.Text = "Not found any trailing whitespaces"
Else
DTE.StatusBar.Text = "Removed all trailing whitespaces"
End If
End Sub
End Module




On 29 June 2012 12:02, Wallace Turner  wrote:

>  Jano,
> Initially i thought you mean the trailing whitespace at the *end* of the
> file, and thought that was seriously OCD (which is a feature in my books!)
>
> however re-reading I now know what you mean and YES it bothers me all the
> time... in fact, can you please send me your macro?
>
> Is the main annoyance that when you press the 'End' key the cursor doesnt
> go the end of the text, rather than the end of the line? If yes, is there a
> shortcut key that goes to the last character on the line? (in VS, not vi
> please) :)
>
> Wal
>
>
> On 29/06/2012 5:55 PM, Jano Petras wrote:
>
> Well, I do have one usage of macros - to strip off trailing whitespace
> from all lines in a code file. I have mapped it to Ctrl-W and using it all
> the time.
>
> Is there a built-in command that can do this now? If not, I will be
> affected, and will need to do something about it.
>
> Are any of you guys using something similar to perform this? Or hanging
> whitespace at the end of lines does not bother you ?
>
>
> Cheers,
> jano
>
>
> On 28 June 2012 08:56, Arjang Assadi  wrote:
>
>> FYI Evryone who uses macros, they are gone from VS 11 since less than 1%
>> of people were using them:
>>
>> http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-8c42-e31b669c9f11/
>>
>> But as one of the posts pointed out they were being used by super users
>> that most likely would turn off the usage data gathering features.
>>
>> Regards
>>
>> Arjang
>>
>
>
>
>


Re: no more Macros for VS2012!

2012-06-29 Thread Wallace Turner

Jano,
Initially i thought you mean the trailing whitespace at the *end* of the 
file, and thought that was seriously OCD (which is a feature in my books!)


however re-reading I now know what you mean and YES it bothers me all 
the time... in fact, can you please send me your macro?


Is the main annoyance that when you press the 'End' key the cursor 
doesnt go the end of the text, rather than the end of the line? If yes, 
is there a shortcut key that goes to the last character on the line? (in 
VS, not vi please) :)


Wal

On 29/06/2012 5:55 PM, Jano Petras wrote:
Well, I do have one usage of macros - to strip off trailing whitespace 
from all lines in a code file. I have mapped it to Ctrl-W and using it 
all the time.


Is there a built-in command that can do this now? If not, I will be 
affected, and will need to do something about it.


Are any of you guys using something similar to perform this? Or 
hanging whitespace at the end of lines does not bother you ?



Cheers,
jano


On 28 June 2012 08:56, Arjang Assadi > wrote:


FYI Evryone who uses macros, they are gone from VS 11 since less
than 1% of people were using them:

http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-8c42-e31b669c9f11/
But as one of the posts pointed out they were being used by super
users that most likely would turn off the usage data gathering
features.
Regards
Arjang







Re: no more Macros for VS2012!

2012-06-29 Thread Jano Petras
Well, I do have one usage of macros - to strip off trailing whitespace from
all lines in a code file. I have mapped it to Ctrl-W and using it all the
time.

Is there a built-in command that can do this now? If not, I will be
affected, and will need to do something about it.

Are any of you guys using something similar to perform this? Or hanging
whitespace at the end of lines does not bother you ?


Cheers,
jano


On 28 June 2012 08:56, Arjang Assadi  wrote:

> FYI Evryone who uses macros, they are gone from VS 11 since less than 1%
> of people were using them:
>
> http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-8c42-e31b669c9f11/
>
> But as one of the posts pointed out they were being used by super users
> that most likely would turn off the usage data gathering features.
>
> Regards
>
> Arjang
>


RE: no more Macros for VS2012!

2012-06-28 Thread David Kean
You can still write Visual Studio extensibility code, which can use the same 
old DTE that you use via macros.

From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On 
Behalf Of djones...@gmail.com
Sent: Thursday, June 28, 2012 12:26 AM
To: ozDotNet
Subject: Re: no more Macros for VS2012!

Nooo.

I have a bunch of macros that automatically fix stylecop and code analysis 
errors. I will have to do that by hand from now on?

Disappointed Davy
Hexed into a portable ouija board.

From: Arjang Assadi mailto:arjang.ass...@gmail.com>>
Sender: ozdotnet-boun...@ozdotnet.com<mailto:ozdotnet-boun...@ozdotnet.com>
Date: Thu, 28 Jun 2012 16:56:55 +1000
To: ozDotNetmailto:ozdotnet@ozdotnet.com>>
ReplyTo: ozDotNet mailto:ozdotnet@ozdotnet.com>>
Subject: no more Macros for VS2012!

FYI Evryone who uses macros, they are gone from VS 11 since less than 1% of 
people were using them:
http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-8c42-e31b669c9f11/

But as one of the posts pointed out they were being used by super users that 
most likely would turn off the usage data gathering features.

Regards

Arjang


RE: no more Macros for VS2012!

2012-06-28 Thread Bill McCarthy
You can vote on it on uservoice :
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2650757-bring-back-macros

Also note you can still extend the IDE and write add-ins: it's not a RAD as 
macros though and there's no macro recording. So not as easy to write them or 
discover, but if you have existing macros it shouldn't be that hard to wrap 
them into a package. 

Definitely vote for it if it impacts you: add your voice !

|-Original Message-
|From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-
|boun...@ozdotnet.com] On Behalf Of djones...@gmail.com
|Sent: Thursday, 28 June 2012 5:26 PM
|To: ozDotNet
|Subject: Re: no more Macros for VS2012!
|
|Nooo.
|
|I have a bunch of macros that automatically fix stylecop and code analysis 
errors.
|I will have to do that by hand from now on?
|
|Disappointed Davy
|Hexed into a portable ouija board.
|
|
|From: Arjang Assadi 
|Sender: ozdotnet-boun...@ozdotnet.com
|Date: Thu, 28 Jun 2012 16:56:55 +1000
|To: ozDotNet
|ReplyTo: ozDotNet 
|Subject: no more Macros for VS2012!
|
|FYI Evryone who uses macros, they are gone from VS 11 since less than 1% of
|people were using them:
|http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-
|4647-8c42-e31b669c9f11/
|�
|But as one of the posts pointed out they were being used by super users that
|most likely would turn off the usage data gathering features.
|�
|Regards
|�
|Arjang



Re: no more Macros for VS2012!

2012-06-28 Thread djones147
Nooo. 

I have a bunch of macros that automatically fix stylecop and code analysis 
errors.  I will have to do that by hand from now on?  

Disappointed Davy
Hexed into a portable ouija board. 

-Original Message-
From: Arjang Assadi 
Sender: ozdotnet-boun...@ozdotnet.com
Date: Thu, 28 Jun 2012 16:56:55 
To: ozDotNet
Reply-To: ozDotNet 
Subject: no more Macros for VS2012!

FYI Evryone who uses macros, they are gone from VS 11 since less than 1% of
people were using them:
http://social.msdn.microsoft.com/Forums/en-US/vsx/thread/d8410838-085b-4647-8c42-e31b669c9f11/

But as one of the posts pointed out they were being used by super users
that most likely would turn off the usage data gathering features.

Regards

Arjang