1

When adding a newline inside a function call the closing bracket is always an extra tab over, is there a setting or a configuration file somewhere I can modify to remove that extra tab?

Gif of the extra tab

wizebin
  • 730
  • 5
  • 15

1 Answers1

2

You can disable this by:

  1. Install PackageResourceViewer if you don't already have it installed
  2. Open the Command Palette
  3. Type PRV: O and select PackageResourceViewer: Open Resource
  4. Select JavaScript
  5. Select JavaScript Indent.tmPreferences
  6. at the bottom of the file, before </dict>, add:

    <key>indentParens</key>
    <false />
    
  7. Save it

ST will no longer indent the next line when you type Enter in between the square brackets on JavaScript lines like spawn('div', this.view, {}, [])

Keith Hall
  • 15,362
  • 3
  • 53
  • 71
  • Your answer was perfect, that does exactly what I asked for, I wish I could treat the result like a typical indentation block (so the ending brace doesn't indent but content does), if you have any hints I'd appreciate it, but the main question is answered. – wizebin Feb 28 '17 at 03:14