Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sublime Text 3 - Double Tab Issue

Tags:

sublimetext3

I am using Sublime Text 3 and every time I press tab it will add an extra tab. My settings are to display tabs as an actual tab (not spaces) and is equivalent to 4 spaces. My issue causes a single tab to therefore create 2 tabs the length of 8 spaces.

For example, if I am trying to indent it will tab twice and I will have to delete one tab. If I select a block of text it will indent it twice and result in the text being deleted and I have to undo it once to bring the text back.

Also, when using auto complete I normally hit tab to auto complete the first option. It will select the option and do a tab after it. I am not sure if this is an option or setting but its extremely annoying and I have not found a solution yet.

like image 547
skovy Avatar asked Jun 23 '14 00:06

skovy


People also ask

How do I fix sublime spacing?

"cmd+f" => " "(two spaces) => "alt+enter" => "arrow right" => " "(two more spaces) => set tab width to 4(this can be done before or after. On windows or other platforms change cmd+f and alt+enter with whatever your find and select all hotkeys are.

How do you change the tab indent to 4 spaces sublime?

To configure the tab width in Sublime Text 3, click on “View” in the top bar, then click on “Indentation” in the drop-down list. Next, in the second level of the drop-down list select the width you want a tab to take up. Sublime Text 3 defaults to tabs being four spaces wide.

How do you replace tabs with spaces in sublime?

It's good practice to use spaces instead of tabs when indenting code. Sublime Text 2 allows you to convert tabs to spaces in existing files manually (View -> Indentation -> Convert indentation to spaces). However, this can be done automatically when saving the file.


Video Answer


1 Answers

  • Sublime Text double tabs on tab key press
  • Sublime Text deletes/removes text on indentation / tab

Both problems are due to a popup (most often the SFTP free version popup for me) hiding in the background. If you make sure to close the popup windows every time they appear you will not get these issues. You could also pay for Sublime or the plugin to remove the popups.

In OSX you can't focus back on Sublime Text without clicking on the popup, so you will never have these problems.

like image 111
Mattis Avatar answered Sep 29 '22 18:09

Mattis