Skip to content

Commit

Permalink
Use current indent type for Reformat Document
Browse files Browse the repository at this point in the history
  • Loading branch information
infininight committed Dec 2, 2015
1 parent 9745b43 commit 06b38d5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Commands/Reformat Document : Selection.tmCommand
Expand Up @@ -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
Expand Down

0 comments on commit 06b38d5

Please sign in to comment.