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"} },

0 Likes