I'm working on a project with all source files appended with this vim formating rule
-- vim: et:sw=4:ts=8:sts=4:tw=80. Is there a way to make Emacs setup the correct indentation for me automatically?
The indentation options of vim are described at http://vimdoc.sourceforge.net/htmldoc/options.html. There follows a rough description of the used options:
expandtabsmeans to insert whitespaces instead of tabs. It should at least be similar to
(setq indent-tabs-mode nil)
shiftwidthis the number of spaces to use for each indent
softtabstopNumber of spaces that a counts for while performing editing operations, like inserting a or using . It "feels" like s are being inserted, while in fact a mix of spaces and s is used. This is useful to keep the ~ts~ setting at its standard value of 8, while being able to edit like it is set to ~sts~.