ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Indent​To​All​Brackets

by badstreff ALL

The way auto-indenting should be by default in sublimetext.

Details

Installs

  • Total 5K
  • Win 3K
  • Mac 890
  • Linux 762
Jul 12 Jul 11 Jul 10 Jul 9 Jul 8 Jul 7 Jul 6 Jul 5 Jul 4 Jul 3 Jul 2 Jul 1 Jun 30 Jun 29 Jun 28 Jun 27 Jun 26 Jun 25 Jun 24 Jun 23 Jun 22 Jun 21 Jun 20 Jun 19 Jun 18 Jun 17 Jun 16 Jun 15 Jun 14 Jun 13 Jun 12 Jun 11 Jun 10 Jun 9 Jun 8 Jun 7 Jun 6 Jun 5 Jun 4 Jun 3 Jun 2 Jun 1 May 31 May 30 May 29 May 28
Windows 1 4 1 3 1 1 0 0 2 1 2 3 3 1 0 0 2 5 2 2 1 0 0 1 3 1 3 0 1 3 4 1 0 1 1 1 0 1 1 1 5 2 1 2 3 3
Mac 1 0 3 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 1 2 0 0 1 2 1 0 0 0 0 0 0 0 0 0 2 1 0 2 0 0 1 0
Linux 0 0 0 0 2 0 0 0 1 3 0 0 0 0 0 0 0 2 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 0 0 0 0 0 0 1 1 0 0 1 0

Readme

Source
raw.​githubusercontent.​com

Better Auto Indent Sublime Text plugin

An attempt to mirror the functionality of indent_to_bracket in sublime that only works for parenthesis to '[' and '{' brackets/braces. This plugin is still in development so there may be various issues you can run into.

The general idea is to indent arguments in a tuple, list, or dictionary to the opening bracket so that:

dict = {'a': 1, 'b': 2, <enter>

aligns caret following way:

dict = {'a': 1, 'b': 2,
        |

Installation & Setup Instructions

  1. Copy the better_auto_indent.py into your packages directory. On OS X this is ~/Library/Application Support/Sublime Text 3/Packages/User

-or-

Use the Sublime Text Package manager available here

  1. Copy-Paste the contents of the Defaults.sublime-keymap into your keymap settings file. Sublime Text > Preferences > Key Bindings

Contributing

Any pull requests welcome!