Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable automatic tab indentation change after copy paste?

When I copy a piece of code and paste it somewhere else in the IDE, my custom code indentation levels are changed by Visual Studio automatically. How do I prevent this?

Example:
enter image description here

My current tab settings are:
enter image description here

I want to continue using the Smart Indenting feature and actual tab characters (not spaces instead of them). I only want to prevent this particular behavior.

like image 306
hkBattousai Avatar asked Jul 22 '13 13:07

hkBattousai


People also ask

Why is my Microsoft Word automatically indenting?

It simply means that Word assumes you want to indent the paragraph if you start it out by pressing the Tab key. So, it dutifully indents for you.

How do I turn off auto indent in vim?

vim" in 'runtimepath'. This disables auto-indenting for files you will open. It will keep working in already opened files. Reset 'autoindent', 'cindent', 'smartindent' and/or 'indentexpr' to disable indenting in an opened file.


1 Answers

It looks like you are using Visual Assist X (a guess from the font highlighting), which does this. VS2012 itself doesn't have this feature so far as I know.

To turn it off in Visual Assist X, under VASSISTX->Visual Assist X Options..., select Advanced->Corrections and uncheck "Format after paste (in C/C++/C#/Javascript)".

enter image description here

like image 87
Mike E Avatar answered Sep 29 '22 17:09

Mike E