I've spent several hours over the last few days trying to get Emacs set up the way I like it, and I've come very close but have run into a problem.
I'm a fully satisfied Vim user on Windows 7, but I'm interested in switching to Emacs, so I managed to figure out enough about the HOME folder on windows, Emacs' Lisp, and package management to get evil downloaded and running, so I got down to actually coding some and I realized that tab does nothing.
Of course, that's not true, as I figured out after scouring Google. Tab does do something, it indents to all possible correct stops where a language expects an indent. If no indent is expected, the line is put to the expected stop (back to no indent if that's the way Emacs sees things). That's frustrating in of itself, but I figure I do so little plain text editing that it doesn't matter in the end.
But then I begin working in PHP since that's my current project's language, and there's not a native mode for that, so I install one, and get to work, and the "smart" indent is really funny looking.
class namespace ()
{
function foo ()
{
if (x)
{
echo $bar;
}
}
}
Essentially, PHP mode is inconsistent with its curly brace placement, and everything in flow loops is two indents deeper than the ifs and elses.
I've tried adding everything I could find on Google to my .emacs file to try and turn off smart indenting and nothing has worked. There are a couple other things that haven't worked in my .emacs file either (like turning off the ~ and #file# backups and autosaves), and I've either been living with it, or in the case of the package manager, I've put it in a different place in the file.
I figure the problem is either that all of this is hardcoded behavior, or I have to put all of these things into .emacs differently. What do I need to do to make tab, regardless of circumstance, insert 4 spaces?
Post Details
- Posted
- 11 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/emacs/comme...