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 2K
  • Win 1K
  • OS X 397
  • Linux 325
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 May 27 May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10
Windows 0 2 0 2 5 9 7 1 3 7 5 5 1 6 1 2 5 1 4 2 4 2 2 1 4 5 2 0 3 1 5 7 5 0 3 0 1 1 4 4 3 2 0 2 1 3
OS X 0 1 0 1 1 2 0 0 0 0 2 3 1 1 2 0 1 0 2 0 1 0 0 0 0 2 0 1 0 1 0 1 0 3 1 1 2 2 0 1 0 1 1 0 0 0
Linux 0 0 1 0 0 2 1 0 1 1 2 2 2 2 1 0 2 0 1 0 0 0 1 0 2 1 0 0 2 2 1 4 0 1 2 0 0 0 0 0 0 0 1 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!