Closed simoncarrignon closed 5 years ago
hm I realized that the repository I forked is an odl one, I should have used this : https://github.com/jalvesaq/Nvim-R The implementation has changed someone so it wont be so straightforward to adapt it but I will try.
Hey. Welcome and thanks for your interest in Intim :)
you say you where inspired from vim-r-plugin, but looking at the sources they seem really different from the vim-r-plugin
Sure. I have been inspired from vim-R-plugin specifications, but this is a complete rewrite.
E484: Cannot open file /tmp/viUWgfu/2
Cannot reproduce. Can you show me your Intim configuration (if any) and the outputs of:
:echo <SNR>26_terminal()<cr>
:echo <SNR>26_sname()<cr>
:echo <SNR>26_get_preInvokeCommands()<cr>
(note: I wrote 26_
because it is the number that shows up in your error message. This number may change if your have installed other plugins since then. Please use the most recent one.)
Plus: do you have any idea what this /tmp/viUWgfu/2
is on your machine or your configuration? It is never explicitly targetted by Intim.
I wanted to use python3
For this, slacking:
call Intim_invokeCommand('python', 'python3')
in your .vimrc
should be enough, see :help intim-starting
. ;)
I am really use to vim-r-plugin shortcuts
Any shortcut can be remapped of course, with the <Plug>Intim*
entry points.
by default I think you remap the vim ctrl+D comand
Intim does not remap anything user had mapped before. However, I agree that overriding the basic <c-D>
was quite not a good move (I personally use <m-D>
instead). I'll change this asap ;)
Plus: do you have any idea what this /tmp/viUWgfu/2 is on your machine or your configuration? It is never explicitly targetted by Intim.
Wop. Update on that: I think /tmp/viUWgfu/2
is a kind of path used by tmux
, and that this error may be related to tmux
not understanding the command it is supposed to send to IntimSession.
What version of tmux
are you currently running?
I agree that overriding the basic
<c-D>
was quite not a good move
Fixed in be2a927, defaulting to <c-e>
to send the EOF signal instead of <c-d>
.
My tmux version:
$ tmux -V
tmux 2.3
I just donwload the last github version (thanks for re-maping E121: Undefined variable: cr
, cf:
E121: Undefined variable: cr
E15: Invalid expression: <SNR>26_get_preInvokeCommands()<cr>
Press ENTER or type command to continue
Not sure if I will have time try more things with the plugin this week as I have to finish some stuff, but thank for loonking at my problem!
Well, I have the same tmux version which should be okay.
As for the commands, <cr>
is only vim idiom to say "press enter". I should have made it explicit, sorry for that. The plain commands are:
echo <SNR>26_terminal()
echo <SNR>26_sname()
echo <SNR>26_get_preInvokeCommands()
So, to send them, you have to explicitly-type-on-your-keyboard:
:echo <SNR>26_terminal()↵
:echo <SNR>26_sname()↵
:echo <SNR>26_get_preInvokeCommands()↵
:D ok sorry my bad, I should have tried that. Thus the result are:
gnome-terminal
IntimSession
['']
Thank you. Well. These are the expected default options. I still cannot reproduce your problem. Can you describe in detail the successive steps that lead you to this error? What I personally do is:
$ vim myfile.py
in my terminal to open a script, then once in Vim:<F10>
to launch intim session, then<space>
to send the current line to the interpreterDo you use anything different on your side? And if yes, what? :)
Is your vim terminal already tmux
ed somehow?
Thank you for your patience.
I had the same issue, and I think the cause is at lines 637-638 of intim.vim:
let launchCommand = s:terminal()
\ . " -e 'tmux -2 new -s " . s:sname() . "' &;"
The semicolon at the end of the command is invalid syntax in Bourne shells such as bash.
This fixed it for me:
let launchCommand = s:terminal()
\ . " -- tmux -2 new -s " . s:sname() . " &"
Using the -- sytnax for the tmux command suppresses a warning raised by -e.
@tleonardi Well, cheers for that. I cannot test it this week, but feel free to offer your fix as a pr :)
@simoncarrignon Pr #9 is supposed to fix it. Do you confirm? :)
Closing this as fix non-confirmed for more than 1 year.
Ok I get quickly stopped while trying to start the plugin:
I tried to fix it without success but while doing that I realize: you say you where inspired from vim-r-plugin, but looking at the sources they seem really different from the vim-r-plugin one. Thus I tried just to change
R
bypython
andsource
by theexec
equivalent python function and it's working :D( I wanted to use python3 so what I didn exactly was just do in the file
common_global.vim
:)
Honestly I think I will follow this path as I am really use to vim-r-plugin shortcuts, with lot of tmux custom stuff too, it seems very straight forward like this (for exemple \rc vs your F10, or the fact that by default I think you remap the vim ctrl+D comand to something else...)
you can try what I did here : https://github.com/simoncarrignon/Vim-R-plugin