/tabs-to-spaces

Atom package for converting between tabs and spaces

Primary LanguageCoffeeScriptMIT LicenseMIT

Build Status

Tabs to Spaces

An Atom package for converting between leading tabs and leading spaces.

Installation

The package can be installed by using the Settings screen and searching for tabs-to-spaces.

It can also be installed from the command line with the command:

apm install tabs-to-spaces

Use

It can convert between leading tabs and spaces in the current editor window. It can be executed from:

  • Command Palette
    • Tabs To Spaces: Tabify
    • Tabs To Spaces: Untabify
  • Packages Menu
    • Packages > Tabs to Spaces > Tabify
    • Packages > Tabs to Spaces > Untabify
  • Context Menu
    • Tabify
    • Untabify

Configuration

Tabs to Spaces uses the following configuration values:

  • editor.tabLength — sets the number of space characters a tab character is equivalent to
  • tabs-to-spaces.onSave — if set to either "tabify" or "untabify" it performs that operation on save
    • Previously this was named on-save, but this conflicts with the humanizing algorithm used for configuration options, so it was changed to follow the standard.

Keybinding

I have not set keybindings for this package. They can easily be added by referencing the following commands:

  • tabs-to-spaces:tabify
  • tabs-to-spaces:untabify

For example, to map the Untabify command to ⌘⌥T:

'.editor:not(.mini)':
  'alt-cmd-t': 'tabs-to-spaces:untabify'

Copyright

Copyright © 2014 by Lee Dohm, Lifted Studios. See LICENSE for details.