Sublime Forum

Changing tab to mean tab

#1

I tried to change the preferences so that typing the tab key causes a tab.
The code was:


// Settings in here override those in “Default/Preferences.sublime-settings”,
// and are overridden in turn by syntax-specific settings.
{
“ignored-packages”: []
{
“tab_completion”: false,
“auto_complete_commit_on_tab”: false
}
}

Now when I start Sublime Text there is an error message “Error trying to parse settings: Unexpected character, expected a comma or closing bracket in
Packages\User\Preferences.sublime-settings:5:2”

I am not an expert, and did not know one had to be one to be able to make Sublime Text type a tab character. I would be grateful for advice how to do this.
This is Version 3.2.2.

0 Likes

#2

You are missing a comma after the square brackets of ignored-packages, instead of [] you should have [],

0 Likes

#3

Keymap files are JSON, and this is not valid JSON; if you use the default settings in the left hand pane of the window that opens when you choose Preferences > Settings as a guide, it’s more clear that you need one set of { and } characters framing all of the settings, and that the settings inside should be separated from each other by commas.

So your preferences file should look more like this:

{ 
"ignored-packages":[ ],
"tab_completion":false,
"auto_complete_commit_on_tab":false
}

There’s a bit more information on this in this video on fixing package file errors.

0 Likes

#4

Many thanks. This code does what I wanted.

0 Likes