christoomey / vim-tmux-runner

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

vtr eating whitespace in VtrInitialCommand causing command failures #83

Open lillian27 opened 6 years ago

lillian27 commented 6 years ago

Hello,

vtr is eating whitespace out of command strings causing them to fail. For example:

.vimrc:

let g:VtrStripLeadingWhitespace = 0 let g:VtrInitialCommand = "cd .."

In vim:

:VtrOpenRunner -bash: cd..: command not found

Commands with multiple tokens ("grep -i foo somefile.txt") have all whitespace removed. ("grep-ifoosomefile.txt").

I was attempting to use VtrInitialCommand to activate a python virtualenv in the runner pane when I came across this. Is there a recommended way to do that?

christoomey commented 6 years ago

Hi @lillian27, not sure exactly the cause. I've not personally used VtrInitialCommand in a long time, so I'm less familiar with how it behaves. If you're interested in poking around, I wonder if this is an interaction between the clear sequence and VtrInitialCommand?

shaun-floss commented 5 years ago

I was running into this same issue.

I found that escaping the whitespace character (or any special character), and using single quotes works.

let g:VtrInitialCommand = 'cd\ ..'

Hope that helps. :smiley: