Sublime Forum

Tab key not working in ST4

#1

The tab key is not working as expected.

  • Pressing tab does not generate a tab character. It will indent to the correct place sometimes.
  • Shift-tab does create tabs as expected.
  • Running in safe mode does work as expected.
  • I disabled every plugin I have installed (not system ones) to try and find the culprit, no luck.
  • I tried setting the two preference options tab_completion and auto_complete to false, they make no difference.

On ST4, MacOS 11.2.3 Big Sur

Any ideas or suggestions from anyone?!

1 Like

#2

I think I’ll just rename my settings folder and start fresh…

0 Likes

#3

This is happening to me too. Same version of Mac OS. I also tried removing all packages, user preferences, and reinstalling the latest version. When opening a new editor, I can tab once, but then subsequent presses of the tab key have no effect.

0 Likes

#4

Update: I reset my key bindings and seems like that might have fixed the issue.

0 Likes

#5

i’ve been having a very similar issue since my ST3 auto updated to ST4. Pressing the tab key does not insert a tab space when the cursor is on a new empty line. Does not matter if the file i’m in has spacing set to use tabs or spaces.

not sure which folder exactly so haven’t done this.

i deleted the contents of this file and it seemed to repopulate when i restarted ST4, so i added 2 underscores to the end of the file name like this:
C:\Users\00\AppData\Roaming\Sublime Text 3\Packages\Default\Default (Windows).sublime-keymap__
and now after restarting ST4 the file name with underscores remains in that folder but a new one without underscores is not there… even though when i go to preferences -> key bindings the file on the left shows the same path in the window’s title bar.

so i deleted the contents of this file:
C:\Users\00\AppData\Roaming\Sublime Text 3\Packages\User\Default (Windows).sublime-keymap
and restarted ST4 and checked the key bindings setting again. the file on the right (user path) is still empty and the file on the left (default path) is still populated even though it does not exist at the path indicated.

I restarted ST4 again and immediately start hitting the tab key. it works a couple of times to insert tab spaces into a .css file then stops working.

I try to use the tab key in a .html, and .md file and it doesn’t work in those.

I use the tab key in a .js file and it works! hmmm…

I use the tab key in a .txt, .bat, and .php files and it works in those as well.

will update if i find more info and/or fix it for myself, i might be able to figure this out.

edit1:
renamed this folder and restarted ST4:
C:\Users\00\AppData\Roaming\Sublime Text 3\Packages\User
got error popups about things being missing (of course) and the tab key behavior i described above across different file types/extensions remains the same.

renamed this folder and restart ST4:
C:\Users\00\AppData\Roaming\Sublime Text 3\Packages
and tab key works as expected.

edit2:
i opened this file in ST4:
C:\Users\00\AppData\Roaming\Sublime Text 3\Packages\emmet-sublime\Default (Windows).sublime-keymap
deleted the contents and saved. went to a .css file and tab key works as expected!

edit3:
i think i just had an old version of emmet that’s no longer supported, so i removed it.
then I installed this emmet v2.3.3:


and so far so good.

0 Likes

#6

I backed up Packages/User/Default (Linux).sublime-keymap and Preferences.sublime-settings from my old sublime 3 ~/.config directory, then deleted that folder and restarted sublime 4. It made a new directory ~/.config/sublime-text. Copied the backed up files into Packages/User. Everything works as expected now.

0 Likes

#7

I had this issue after the latest update; found a much simpler solution. Simply added the following line to my user-specific keybindings file:

{ "keys": ["tab"], "command": "insert", "args": {"characters": "\t"} },

2 Likes

#8

Thanks! It worked!

0 Likes

#9

The issue in the recent update has been fixed in build 4190.

2 Likes

#10

There is a ‘fix’ in build 4190, 2024-12-22
https://www.sublimetext.com/dev

  • i could not resolve issue with any of the ‘fixes’ below, due to another issue, there is No ‘Packages/Default’ directory on my OpenSuSE/KDE system and I can Not find a reason why this is, see that when I open ‘Keybindings’ Default (system) the document path points to that directory… weird…
    Landis.
0 Likes

#11

played with this for an hour and this finally worked for me:
{ “keys”: [“tab”], “command”: “insert”, “args”: {“characters”: “\t”}, “auto_complete”: false },
– add to user keybindings –

Landis.

0 Likes

#12

when will stable pick up 4190? I think the problem was introduced in a recent update, I have been using shift + tab when tab doesn’t work as \t sometimes (always have “tab_completion”: false in settings)

0 Likes

#13

4190 actually was a quick hotfix for this issue, and 4189 was a quick stable release after fixing 2 other nitbicks of 4186. As 4190 only contains this single hotfix it is safe to judge it stable and use it. So there’s not reason to hurry or release stable builds with only one change at a time.

For those who evaluate ST (without a license) this tiny nitpick most likely doesn’t matter that much.

0 Likes

#14

currently, i have version 4189, and my copy doesn’t seem to think there’s a new update. when i went looking, the keybindings file is missing completely, so i have no idea what happened or why…

windows 11 here… recreating the keybindings file, then adding your suggestion fixed it for me… THANKS :slight_smile:

0 Likes

#15

4190 has only been released as a dev build so you would need to install it manually.

0 Likes

#16

I’m also using 4189, but it says that’s the latest version. Running Sublime on Mac Sequoia 15.2.
The keybinding fix worked for me.

0 Likes