Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Resharper 6.0 tab instead of spaces

How to force resharper 6.0 to use tab instead of spaces during code clearup ?

like image 351
user656822 Avatar asked Jul 11 '11 13:07

user656822


2 Answers

ReSharper uses VS settings, it doesn't have own settings for this task. Go to Tools->Options->Text Editor->Necessary lang or All Languages->Tabs and select "Insert spaces" or "Keep tabs".

like image 50
derigel Avatar answered Oct 22 '22 19:10

derigel


This is a bug in ReSharper. It typically uses the VS settings, but when aligning it always uses spaces and ignores the VS settings (particularly the Smart Tabs).

A request for a fix to this has been around since version 4, but is still not fixed in verstion 6 (the most recent release).

The bug is noted here: RSRP-150306 and here: RSRP-200204

Update: One thing you can do to work around this issue, after doing the ReSharper cleanup, you can use the VS formatting call to have it fix the tabs/spaces. The default shortcut for this is

  • Ctrl-K,Ctrl-D for the entire document
  • Ctrl-K,Ctrl-F for just the selected text.
like image 10
Edyn Avatar answered Oct 22 '22 18:10

Edyn