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

Indent​To​All​Brackets

by badstreff ST2/ST3

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

Details

Installs

  • Total 4K
  • Win 2K
  • OS X 720
  • Linux 621
Aug 23 Aug 22 Aug 21 Aug 20 Aug 19 Aug 18 Aug 17 Aug 16 Aug 15 Aug 14 Aug 13 Aug 12 Aug 11 Aug 10 Aug 9 Aug 8 Aug 7 Aug 6 Aug 5 Aug 4 Aug 3 Aug 2 Aug 1 Jul 31 Jul 30 Jul 29 Jul 28 Jul 27 Jul 26 Jul 25 Jul 24 Jul 23 Jul 22 Jul 21 Jul 20 Jul 19 Jul 18 Jul 17 Jul 16 Jul 15 Jul 14 Jul 13 Jul 12 Jul 11 Jul 10 Jul 9
Windows 0 3 2 1 3 2 3 4 3 4 2 1 0 2 2 1 0 4 0 2 0 2 5 3 4 1 2 1 4 1 0 3 3 2 4 1 4 5 2 2 3 0 2 6 6 2
OS X 0 1 0 3 0 0 0 1 0 1 1 1 0 1 1 0 0 2 2 1 0 1 0 2 1 1 1 0 1 3 1 0 1 0 0 0 0 0 0 2 0 0 1 0 0 0
Linux 0 0 0 0 0 0 0 0 1 0 2 0 0 0 1 2 0 0 1 2 1 0 2 1 0 0 1 0 0 0 0 1 0 0 0 1 3 0 2 2 0 0 1 1 0 2

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!