Closed francescoboc closed 6 months ago
Hey @francescoboc. Some notes on the various questions:
VtrSendCommandToRunner
will re-run the previous command, including the send file command of VtrSendFile
. This is intended (I wouldn't want to have subtle distinctions there), but I think you can work around it.VtrSendCommandToRunner
will prompt for the command to run the first time, but after that it will re-run the most recent command.VtrSendCommandToRunner plt.clf()
-- not sure if that works for your use case, but would resolve the issue with it re-running the VtrSendFile
command.On a side note, is it possible to define a custom command in my .vimrc, so that it is executed automatically whenever I call VtrSendCommandToRunner (or another equivalent command), without having to re-define it from scratch everytime?
I'm sure I 100% understand your intended use case, but you definitely can define an alternative command to run that wraps VtrSendCommandToRunner
, e.g.
command! MyVtrCommand VtrSendCommandToRunner plt.clf()
Hope that all helps. I'm going to close this now as I don't think there is an issue here, but feel free to comment back if you think I missed something.
Got it! VtrSendCommandToRunner plt.clf()
is what I needed :)
Thanks for the quick response and for this great vim plugin!
Hi! I am facing a little problem with the
VtrSendCommandToRunner
command. The problem is as follows:VtrSendCommandToRunner
to define my custom command, for exampleplt.clf()
, which is a python command to clear the current figureVtrSendFile
tu execute the whole python script (and plot some stuff in a figure). Note that I have defined my custom run command as:VtrSendCommandToRunner
command is called, the whole python script is run (same effect as callingVtrSendFile
), instead of the custom command (plt.clf()
) defined earlierAm I doing something wrong or is this a bug?
On a side note, is it possible to define a custom command in my .vimrc, so that it is executed automatically whenever I call
VtrSendCommandToRunner
(or another equivalent command), without having to re-define it from scratch everytime?Thank you very much!