I know there are a lot of posts about this, but I couldn´t get it to work.
I use tabs for coding. Is there a way, to convert always spaces to tabs? I.e. on open and on S
To automatically convert spaces to tabs on save, add the following Python script to a newly created subfolder called "UnexpandTabsOnSave" within "$SUBLIME_HOME$\Packages\":
import sublime, sublime_plugin, os
class ConvertSpacesToTabsOnSave( sublime_plugin.EventListener ):
# Run Sublime's 'unexpand_tabs' command when saving any file
def on_pre_save( self, view ):
view.window().run_command( 'unexpand_tabs' )
Thank you for the initial resource.