Suggsestion: Make reformatting an option on the Reformat Code dialog

I know it sounds silly, but bear with me.

Nine times out of ten, when I use "Reformat Code", it's to optimize using
directives and kill the redundant 'this.'. The side effect, of course, is
that my code is reformatted to the style specified in the options. Now, I
could change all of the formatting options in ReSharper, but I'd rather not
(there are a lot!).

Another option would be to make these other options available outside of the
Reformat Code dialog.

Thanks!
Jeff


4 comments
Comment actions Permalink

Just use Resharper --> Code --> "Optimize Usings" with the "Shorten
Qualified References" checkbox checked.

Default keymap is Ctrl-Alt-O

"Jeff Key" <spam@sliver.com> wrote in message
news:djoh69$973$1@is.intellij.net...
>I know it sounds silly, but bear with me.
>

Nine times out of ten, when I use "Reformat Code", it's to optimize using
directives and kill the redundant 'this.'. The side effect, of course, is
that my code is reformatted to the style specified in the options. Now, I
could change all of the formatting options in ReSharper, but I'd rather
not (there are a lot!).

>

Another option would be to make these other options available outside of
the Reformat Code dialog.

>

Thanks!
Jeff



0
Comment actions Permalink

BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Paul Bradshaw wrote:

Just use Resharper --> Code --> "Optimize Usings" with the "Shorten
Qualified References" checkbox checked.

Default keymap is Ctrl-Alt-O

"Jeff Key" <spam@sliver.com> wrote in message
news:djoh69$973$1@is.intellij.net...

>>I know it sounds silly, but bear with me.
>>
>>Nine times out of ten, when I use "Reformat Code", it's to optimize using
>>directives and kill the redundant 'this.'. The side effect, of course, is
>>that my code is reformatted to the style specified in the options. Now, I
>>could change all of the formatting options in ReSharper, but I'd rather
>>not (there are a lot!).
>>
>>Another option would be to make these other options available outside of
>>the Reformat Code dialog.
>>
>>Thanks!
>>Jeff
>>


Wich reminds me, that that mapping conflicts with the default for the
View.Outputs command.

Personally, I need to change it to CtrlShiftO everytime I reinstall R#.

Regards,
Pablo
-


BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (MingW32)

iD8DBQFDX/ZrvooSiBfQCSoRAoP/AKCTx2OueXvBrHW0rNoaBQ1I4cHKgACeK3z9
DutUJ7KN+hVyhkZEIj1s5q8=
=EymN
-


END PGP SIGNATURE-----

0
Comment actions Permalink

Thanks, Paul, but that doesn't remove the "this"s. Is there an option to
switch this on? (I couldn't find one.) If not, it would be a great solution.

Jeff

"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:djora2$nbk$1@is.intellij.net...

Just use Resharper --> Code --> "Optimize Usings" with the "Shorten
Qualified References" checkbox checked.

>

Default keymap is Ctrl-Alt-O

>

"Jeff Key" <spam@sliver.com> wrote in message
news:djoh69$973$1@is.intellij.net...

>>I know it sounds silly, but bear with me.
>>
>> Nine times out of ten, when I use "Reformat Code", it's to optimize using
>> directives and kill the redundant 'this.'. The side effect, of course, is
>> that my code is reformatted to the style specified in the options. Now, I
>> could change all of the formatting options in ReSharper, but I'd rather
>> not (there are a lot!).
>>
>> Another option would be to make these other options available outside of
>> the Reformat Code dialog.
>>
>> Thanks!
>> Jeff
>>
>



0
Comment actions Permalink

In Resharper 2.0, don't you get a "redundant qualifier" lightbulb that
allows you to remove the "this" qualifiers? Maybe they turned that option
off by default when they made it an option... check your Resharper options.
I haven't been able to run the last few builds on my system, so I can't
check myself. But I know that the last build I used would flag and remove
redundant "this" qualifiers, and a subsequent build let you say "remove 'em
all" via the intention action bulb. Others then complained that they not
only wanted to keep the "this" qualifiers, they wanted to add them (no
accounting for taste ;), so stripping off "this" qualifiers was made an
option, even when redundant.



"Jeff Key" <spam@sliver.com> wrote in message
news:djot8r$unf$1@is.intellij.net...

Thanks, Paul, but that doesn't remove the "this"s. Is there an option to
switch this on? (I couldn't find one.) If not, it would be a great
solution.

>

Jeff

>

"Paul Bradshaw" <pbradshaw@advsol.com> wrote in message
news:djora2$nbk$1@is.intellij.net...

>> Just use Resharper --> Code --> "Optimize Usings" with the "Shorten
>> Qualified References" checkbox checked.
>>
>> Default keymap is Ctrl-Alt-O
>>
>> "Jeff Key" <spam@sliver.com> wrote in message
>> news:djoh69$973$1@is.intellij.net...
>>>I know it sounds silly, but bear with me.
>>>
>>> Nine times out of ten, when I use "Reformat Code", it's to optimize
>>> using directives and kill the redundant 'this.'. The side effect, of
>>> course, is that my code is reformatted to the style specified in the
>>> options. Now, I could change all of the formatting options in ReSharper,
>>> but I'd rather not (there are a lot!).
>>>
>>> Another option would be to make these other options available outside of
>>> the Reformat Code dialog.
>>>
>>> Thanks!
>>> Jeff
>>>
>>
>>
>



0

Please sign in to leave a comment.