TypeScript-Sublime-Plugin: Plugin breaks the "use_tab_stops" option
From the default sublime settings files:
// If translate_tabs_to_spaces is true, use_tab_stops will make tab and
// backspace insert/delete up to the next tabstop
"use_tab_stops": true,
When this plugin is enabled, that option does not work. When this plugin is disabled, the option is honored.
About this issue
- Original URL
- State: open
- Created 9 years ago
- Reactions: 8
- Comments: 24 (5 by maintainers)
I actually found a solution: replace all occurences of
use_tab_stops: false
totrue
in the plugin itself. In those 4 files:TypeScriptReact.sublime-settings
JavaScript.sublime-settings
TypeScript.sublime-settings
typescript/libs/view_helpers.py
I still prefer Sublime over VS Code. I have my habits, and I’m still more efficient with Sublime.
Now the only other thing that bugs me about the TypeScript plugin is that I lost the file-scope autocomplete. When you start typing a word that is used elsewhere in the file it will show up in the autocomplete popup. I use that a lot, and it’s really useful for example when you used a new property somewhere in the file then want to declare it in the class. Especially if the property name is a long and complex name.
I think this is a covert effort to get everyone on Visual Studio Code. 😉I too was forced to use VS Code. Note: I still switch back to Sublime Text when I’m coding in other languages, but TS seems to only have true support on VS Code.
After asking for help with this problem on the Sublime forum, I was informed that I could get proper behavior by ditching the plugin in favor of just installing the Typescript syntax highlighting.
Packages/
directory.Packages/User/
.This suits me fine because I’ve found the Typescript automatic linting to be a bit flaky.
(The Typescript syntax highlighting files are found in another repo.)
If you have
translate_tabs_to_spaces
set totrue
, then whenuse_tab_stops
istrue
, pressingbackspace
at the point where a tab was inserted will (should) remove all the spaces inserted for that tab, instead of just a single space character.For example, if you open a brace and press
enter
, the next line will auto-indent. Pressingbackspace
once should remove all spaces inserted for the indentation, instead of only a single space.When this plugin is installed, that behavior does not work.