Auto detect indentation of files in Atom
CoffeeScript CSS
Clone or download
Latest commit a4dac11 Oct 12, 2016

Auto Detect Indentation for atom

Automatically detect indentation of opened files. It looks at each opened file and sets file specific tab settings (hard/soft tabs, tab length) based on the content of the file instead of always using the editor defaults.

You might have atom configured to use 4 spaces for tabs but open a rails project which defaults to 2 spaces. Without this package, you would have to change your tabstop settings globally or risk having inconsistent lead spacing in your files.


To add a keyboard shortcut for the indentation selector menu, use the auto-detect-indentation:show-indentation-selector command. Here's an example:


  'ctrl-I': 'auto-detect-indentation:show-indentation-selector'

Configuring indentation

You can add auto-detect-indentation.indentationTypes to your config.cson file to change the types of indentation available in the indent selector menu. Here's an example:


  indentationTypes: [
      name: "Best Indent"
      softTabs: true
      tabLength: 16

Build Status

Special Thanks To Contributors