A VS Code extension that automatically converts spaces to tabs, providing Emacs-like indent-tabs-mode behavior.
- Go to the GitHub releases page
- Download the latest
.vsixfile from the release assets - Open VS Code/Positron.
- Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac) to open the Command Palette - Type "Extensions: Install from VSIX..." and select it
- Browse to the downloaded
.vsixfile and select it - The extension will be installed and activated automatically
- Smart Tab: Press Tab to add indentation that automatically converts to tabs when threshold is reached
- Document Formatting: Format entire documents or single lines
- Configurable: Choose between leading-spaces-only or all-spaces conversion
auto-tabs.format- Format entire documentauto-tabs.formatLine- Format current line onlyauto-tabs.smartTab- Smart tab with automatic space-to-tab conversion
{
"autoTabs.convertAllSpaces": false
}autoTabs.convertAllSpaces: Whentrue, converts all space sequences to tabs. Whenfalse(default), only converts leading spaces.
The Tab key is automatically bound to auto-tabs.smartTab for C files, providing real-time indentation with space-to-tab conversion.
Add this to your .vscode/settings.json:
{
"[c]": {
"editor.defaultFormatter": "r-devel.auto-tabs",
"editor.insertSpaces": true,
"editor.indentSize": 4,
"editor.tabSize": 8,
"editor.detectIndentation": false,
"editor.formatOnSave": false,
}
}npm install
npm run compile
npm testMIT