tab indent in sublime text2 - sublimetext2

my setting:
"tab_size": 4,
"translate_tabs_to_spaces": true,
but it doesn't work. when I press tab key, it remains two characters indent.
why?
tks!

Try setting "detect_indentation": false

Related

Prettier onSave makes linebreak and then puts everything back inline

I'm facint a prettier issue where when I save the file (angular template) prettier does its job and formats nicely the code but whenever it makes linebreaks it just puts back everything in one single line. In every element only it means when I have an in input or app-custom-element element and have multiple attributes it just puts everything in a nice format and then back to one single line.
I can see that in VSCode before the Prettier (right bottom) there is only one pipe and usually there are 2 (idk what that means).
The "printWidth" is set to 80 as default.
.prettierrc:
{
"printWidth": 80,
"singleQuote": true,
"useTabs": false,
"tabWidth": 2,
"semi": true,
"bracketSpacing": true
}

Sublime Text is not converting tabs to spaces when indenting... why and how to fix it?

I have been using quite effectively Sublime text. I have one problem that stil bugs me.
While I type JavaScript code the tabs not converted to spaces if tab is pressed additionally to the provided indentation level.
The following screenshot may help you in understanding my problem:
As you can see the initial level of indentation is correctly formatted as 8 spaces. If I press tab once again, then an actual tab charachter is inserted, instead of 4 spaces, as I would like.
The following is my User Preferences.sublime-settings configuration file:
{
"color_scheme": "Packages/User/Cobalt (SL).tmTheme",
"detect_indentation": false,
"expand_tabs_on_save": true,
"font_size": 10,
"ignored_packages":
[
"Vintage"
],
"tab_size": 4,
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
"use_tab_stops": true,
// Calculates indentation automatically when pressing enter
"auto_indent": true,
// Makes auto indent a little smarter, e.g., by indenting the next line
// after an if statement in C. Requires auto_indent to be enabled.
"smart_indent": true,
// Adds whitespace up to the first open bracket when indenting. Requires
// auto_indent to be enabled.
"indent_to_bracket": false,
// Trims white space added by auto_indent when moving the caret off the
// line.
"trim_automatic_white_space": true,
}
The configuration seems to be set correctly. Any idea on why this happens and how to solve it?
Sometimes smart_indent can mess up things. Try adding the following line to Preferences>Settings-User
"smart_indent": false

Unintentionally Sublime-text different setting for two file

I have problem with sublime tab indent.
I have to file: reply.php and view.php
==============================================
view.php:
Tab indents is replaced with spaces.
One tab equals with 2 space.
==============================================
reply.php:
Tabs is not replaced with spaces
One tab equals 4 spaces.
==============================================
Why? I want reply.php indent and setting. How I can fix this?
Go to View -> Indentation and make sure that Tab Width is set to 4, then click on Convert Indentation to Tabs. Double-check the other options there to make sure nothing is set that you don't want, such as Indent Using Spaces.
To make sure that PHP files are always displayed with tabs, save the following as Packages/User/PHP.sublime-settings:
{
"tab_size": 4,
"translate_tabs_to_spaces": false
}

Disable Marks Column from Sublime Text 2 Gutter

Is there a way to disable the marks column in the gutter on the left side of Sublime Text 2?
I was able to disable the fold_buttons using the following setting in the settings file:
"fold_buttons": false
In case it isn't clear, I'm talking about the whitespace reserved for the mark (dot) shown below:
Find "Settings - User" from Sublime Text 2 menus (its location depending on the platform). When you click it, it will open a new, empty or almost empty file. Here is a sample portion of it:
{
"auto_complete": true,
"auto_complete_commit_on_tab": true,
"gutter": true
}
The setting you are asking for is the "gutter". Make it false and you will achieve what you asked for.
Things to note:
The curly braces at the beginning and end are important.
Each setting has a comma after it. Except the last one.

Backspace Tab in Sublime Text 2

I have block of code that I would like to move (2 space/1 tab) backwards. I know I can select the whole block and hit tab to move it forward but how do I move the whole block backwards (to the the left)?
There are two options:
Shift+ Tab
or
Ctrl+ [ (on mac this is ⌘+ [)
In Window Os Simple Press
Shift + Tab
To Remove Back Space Tab In sublime Text 2.
in linux,windows
It can be done with this command
Sublime Text,Vscode,Elipse,PhpStorm,Atom => shift+tab
Python IDLE => Ctrl + [