Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not expanding directory to open buffer #144

Closed
tommyc38 opened this issue Sep 23, 2016 · 1 comment
Closed

Not expanding directory to open buffer #144

tommyc38 opened this issue Sep 23, 2016 · 1 comment

Comments

@tommyc38
Copy link

I read your documentation and the command below works...

nmap <F4> :call VimuxRunCommand("clear;python " . bufname("%"))

However, I am trying to run my code in iPython and it seems like I need two commands. One to initiate ipython

nmap <F5> :call VimuxRunCommand("clear;ipython")

and another to run my buffer. The problem is that it only sees the name of my file/buffer and not the path to it.

nmap <F6> :call VimuxRunCommand("run " . bufname("%"))

I have also tried VimuxSendKeys and VimuxSendText but only get the name of the file and not the path to it. Am I doing something wrong?

@alerque
Copy link
Member

alerque commented Feb 14, 2021

Expanding the value of % should do the trick. If you are getting only a name without a path my guess (from experience with a similar issue in other plugins) is that you have some plugin that is resetting the CWD in vim to the location of the buffer. I had trouble with a number of TeX and Pandoc related plugins that were doing this. Once I got them cleaned up so they didn't mess with VIM's current working directory my buffer paths were usable again. I suspect you have a similar issue.

If that isn't it feel free to comment and I'll reopen this for tracking whatever real fix is needed.

@alerque alerque closed this as completed Feb 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants