diff --git a/Commands/Reformat Document : Selection.tmCommand b/Commands/Reformat Document : Selection.tmCommand index f05f7f0..0cca9f8 100644 --- a/Commands/Reformat Document : Selection.tmCommand +++ b/Commands/Reformat Document : Selection.tmCommand @@ -9,9 +9,11 @@ require 'json' stdin = STDIN.read +indent_level = (ENV['TM_SOFT_TABS'] == "NO" ? "\t" : " "*ENV['TM_TAB_SIZE'].to_i ) + begin hash = JSON.parse stdin -print JSON.pretty_generate(hash, indent: " "*4) +print JSON.pretty_generate(hash, indent: indent_level) rescue Exception => e print stdin end