christoomey / vim-tmux-runner

Vim and tmux, sittin' in a tree...
MIT License
291 stars 37 forks source link

VtrSendLinesToRunner Python whitespace issue #63

Closed clupasq closed 7 years ago

clupasq commented 7 years ago

I have written the following Python snippet:

def hello():
    print "Hello, world!"

When I use VtrSendLinesToRunner to send it to a tmux pane running a Python REPL, I get this error:

>>> def hello():
... print "Hello, world!"
  File "<stdin>", line 2
    print "Hello, world!"
        ^
IndentationError: expected an indented block
>>> 
christoomey commented 7 years ago

Hi @wolfascu, Python considers leading white space / indentation as important. By default this plugin strips the white space, but there are a few settings described here that should make it work for Python code.

clupasq commented 7 years ago

Thanks a lot for the answer! And sorry I missed this explanation that was straight in the README file. :blush: