Closed olesendan closed 11 months ago
What are .here
files?
.here files is a file, used by the here package. when this file is in a folder, then the here package is able to set that folder as the root folder for a R project.
jennybc explaines it way better then me https://github.com/jennybc/here_here
In my usercase i'm using .here files as .Rproj files, because I'm not using Rstudio.
my workflow for a new project. make a folder cd to folder open radian usethis_use::description() usethis::use_readme() usethis::use_license() close radian open nvim
It would be nice, if I could this make folder cd to folder start nvim :! touch .here ",rf" usethis::use_description() .....
Does this make sense?
Greetings from denmark Dan Olesen
Unfortunately, I can't add support for all packages that have specific needs. But if someone wanted to write a complement to Nvim-R, I can add a link to it at the section Source additional scripts of Nvim-R's documentation.
In the meanwhile, you could try this in your vimrc/init.vim:
set autochdir
Hi Jalvesaq.
thank you for your suggestion. I tried it, but nothing seems to change.
I've tried your suggestion in the docs, to enable nvim-r global. Strangelly enough nothing happens when I have tihs command
command RStart let oldft=&ft | set ft=r | exe 'set ft='.oldft | let b:IsInRCode = function("DefaultIsInRCode") | normal
If I use the shortcut "
The shortcut <LocalLeader>rf
doesn't work before :RStart
because the file type was never set to "r" and, thus, none of Nvim-R commands are available yet. After the command :RStart
, you can close R with <LocalLeader>rq
and, then, open it again with <LocalLeader>rf
.
Hi Jalvesaq.
Do you think if it is possibly to implement some kind og check on startup.
The check would be, is there any file namesd .here. and then if there is a file, then the plugin is enabled?
Your thourths regarding this?
Greetings from denmark Dan Olesen