Sublime Forum

Tabbing to indent inserts text instead

#1

I discovered the following issue when splitting a large bash command over multiple lines in Sublime Text 3143 on macOS 10.13.3.

I have no plugins and the following preferences:

// Settings in here override those in “Default/Preferences.sublime-settings”,
// and are overridden in turn by syntax-specific settings.
{
// The number of spaces a tab is considered equal to
“tab_size”: 4,

// Set to true to insert spaces when tab is pressed
"translate_tabs_to_spaces": true,

// Show the full path to files in the title bar.
// On OS X, this value is overridden in the platform specific settings, so
// you'll need to place this line in your user settings to override it.
"show_full_path": true

}

Here’s the simplest way I’ve found to reproduce the problem:

  1. Open a new empty file
  2. Enter the following text: a- b=-c
  3. Place the cursor after the a
  4. Hit enter
  5. Hit tab
  6. The string -c is inserted instead of an indent, resulting in the following 2 lines:

a
-c- b=-c

A bug?

0 Likes

#2

not sure if a bug or intended, but definitely annoying:

1 Like

PHP tab creating odd characters
#3

Thanks for that link, I didn’t spot that when I searched; setting “tab_completion”: false as per that post fixes this too.

If it’s intended behaviour, I’d like to understand why… :slight_smile:

0 Likes