Link to home
Start Free TrialLog in
Avatar of Bruce Gust
Bruce GustFlag for United States of America

asked on

How do I get PhpStorm to not auto-indent?

I've got a page that I've intentionally set up with:

.wysiwyg {
white-space: pre-wrap;
padding-left:5px;
}

...so as I write things, the line breaks etc are reproduced just like they would be if I were writing on a piece of paper.

That said, any kind of indention is reproduced exactly as you would imagine and this is what makes PhpStorm a little inconvenient right now because it's "auto indent" dynamic" is reproduced on the web page and I don't want that.

How do I eliminate that functionality? And it doesn't need to be a "global" sort of setting, I just need it for this particular page.

How do I turn off "auto indent" on PhpStorm for this one file?

Thanks!
Avatar of Ferruccio Accalai
Ferruccio Accalai
Flag of Italy image

I guess here there are lot of things you can learn about PhpStorm Ide, expecially about how to 

exclude code or a file from reformatting

Avatar of Bruce Gust

ASKER

Not working, friend! And I've gone out to the "Code Editor -> PHP -> Tabs and Indents and it STILL auto indents after a carriage return.

Not sure how to get around this. I've reached out to JetBrains and we'll see if we don't get a response.
And just for the sake of clarity, here's some graphics that give you a visual of what I'm looking at...

User generated image

User generated image

And what you see above is my attempt to alter the "Tabs and Indents" section of the PHP section.

Nothing...

Nothing seems to change. I still get the "auto indent" and I need that to go away.

How?
One of the first thing I can point out is that you're not editing PHP; you're editing HTML.  Try playing with the code style settings for HTML instead.  PHPStorm is aware of the different contexts, such as inside a `<?php` tag, inside a comment block, inside heredoc blocks, etc.
I figured it out, boys! File -> Settings -> General -> Smart Keys That got it done!

Thanks for your help!
ASKER CERTIFIED SOLUTION
Avatar of Bruce Gust
Bruce Gust
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial