jalvesaq / Nvim-R

Vim plugin to work with R
GNU General Public License v2.0
966 stars 125 forks source link

Requested info about python alternatives #461

Closed ekiefl closed 4 years ago

ekiefl commented 4 years ago

Not quite sure if this belongs here, apologies if it doesn't. I love this project so much, it actually made me want to code in R. I wish there was something this good for python, but I can't find anything. Does anyone have suggestions?

EDIT: https://github.com/jalvesaq/vimcmdline

jalvesaq commented 4 years ago

When editing Python code, in addition to vimcmdline, I also use jedi, ncm2, and ncm2-jedi.

matsburg commented 4 years ago

I have a question related to this. Do you have any ideas on how to implement something like RViewDF for Python using vimcmdline? I've tried a function which sends a command like df.to_csv("file/path.csv") to the REPL, then starts a while loop to check if the csv file exists, and opens it once it does exist, but I couldn't get it to work (vim gets stuck in the while loop even after the csv file has been created).

jalvesaq commented 4 years ago

When Nvim-R was still called Vim-R-plugin, it used to use loops. The pseudo algorithm of these loops was somewhat like:

call MessageToR("create_a_file")
let ii = 0
while ii < 10
    sleep 500m
    ii += 1
    if filereadable("the_file")
        sleep 300m " The file creation might not be finished yet.
        call DoSomethingWithTheFile("the_file")
        break
    endif
endwhile
matsburg commented 4 years ago

Thanks, that works well for me.