Sublime Text 2 uses Python 2.6
Sublime Text 3 uses Python 3.3
The `print` function has been available as a __future__ import since
2.6, so use it.
Patch by Johan Engelen!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@194287
91177308-0d34-0410-b5e6-
96231b3b80d8
# It operates on the current, potentially unsaved buffer and does not create
# or save any files. To revert a formatting, just undo.
+from __future__ import print_function
import sublime
import sublime_plugin
import subprocess
stderr=subprocess.PIPE, stdin=subprocess.PIPE)
output, error = p.communicate(buf.encode(encoding))
if error:
- print error
+ print(error)
self.view.replace(
edit, sublime.Region(0, self.view.size()),
output.decode(encoding))