Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adaptive indentation in emacs? [duplicate]

Possible Duplicate:
Emacs code to automatically set indent-tabs-mode according to existing code

When I'm editing old files in a group where other people may work on them tomorrow or ten years from now, I like to adopt the file's existing tab or space indentation scheme for my additions/changes - that's just being polite, but it's currently something of a hassle. Does anyone have a way for emacs to look for the current indentation scheme in the file or at least the neighboring lines and use that for Tab indentation?

like image 371
Bill White Avatar asked Mar 08 '12 02:03

Bill White


1 Answers

The following sound promising:

  • http://www.emacswiki.org/emacs/GuessStyle
  • https://savannah.nongnu.org/projects/dtrt-indent/
  • http://www.emacswiki.org/emacs/FuzzyFormat

A comparison/review would be interesting.

like image 170
phils Avatar answered Oct 19 '22 03:10

phils