Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Some improvements on external tools #34

wants to merge 3 commits into from

2 participants

Fabian Neumann Anton Bobrov
Fabian Neumann

I documented some of the things that are already possible and fixed a bug when using "none" as input.

Anton Bobrov

A long time ago in galaxy far away…

Anton Bobrov baverman closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
5 snaked/plugins/external_tools/
@@ -173,8 +173,9 @@ def on_finish():
if tool.output == 'to-console':
from snaked.core.console import consume_output
- proc.stdin.write(stdin)
- proc.stdin.close()
+ if proc.stdin:
+ proc.stdin.write(stdin)
+ proc.stdin.close()
consume_output(editor, proc, on_finish)
stdout, stderr = proc.communicate(stdin)
12 snaked/plugins/external_tools/
@@ -13,7 +13,7 @@
# or session context.
# input is one of:
+# none : pipes nothing to script
# from-buffer : pipes whole buffer to script
# from-selection : pipes only current selection
# from-buffer-or-selection : pipes selection if exists and buffer otherwise.
@@ -31,6 +31,12 @@
# I think it self-explanatory.
+# In the shell commands there are a few additional environment variables
+# available:
+# $FILENAME : name of currently active file
# Here some examples:
tool "_Run" for "python" from-buffer to-console
@@ -39,4 +45,6 @@ tool "_Run" for "python" from-buffer to-console
tool "Sphinx _make" for "session:myproject" to-console
cd doc
make html
+tool "JSLint" for "js" none to-console
+ jslint $FILENAME
Something went wrong with that request. Please try again.