Giter VIP home page Giter VIP logo

Comments (5)

jalvesaq avatar jalvesaq commented on July 22, 2024

The message "Did you already start R?" is displayed when the user tries to send commands to R Console before starting R. So, it seems that F2 is not mapped to RStart (perhaps you have mapped it twice in your vimrc: first to RStart and then to something else).

from vim-r-plugin.

rudjer avatar rudjer commented on July 22, 2024

My .vimrc files are identical on the laptop (which works) and the desktop (which doesn't). Are there other places
where F2 could be set? For fun, I tried replacing F2 by F3 in .vimrc on the desktop machine, but this yields the
same "Did you already start R?" message. I can split the vim window with C-a " and start R in the lower half, but
get the message: vimcom: It seems that R was not started by Vim. The communication with Vim-R-plugin will
not work. which is hardly surprising, but I thought might provide some sort of hint??

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on July 22, 2024

I don't know how to solve your problem, but the information below may be helpful:

  • You can check what are Vim's Normal mode maps with the command:

    :nmap

  • The Fn keys don't work everywhere. If while in Insert mode I press Ctrl-V F2, I get ^[[B]] in Linux console, ^[OQ in the terminal emulator and <F2> in GVim. So, I guess I should either replace or delete the example in the plugin's documentation which uses the <F2> key.

  • If you didn't set a map to <F2> yourself, a plugin may be wrongly setting it. I was making this mistake up to October 2009. General plugins should use <Leader> and file type plugins should use <LocalLeader>.

  • You may want to grep your ~/.vim directory in search for "F2":

    cd ~/.vim
    grep --color -iwR F2 *

  • If you start R manually, it will not inherit the environment variables VIMRPLUGIN_TMPDIR and VIMINSTANCEID and Vim will not know the Tmux session or pane where R is running. That is, they will not be able to find each other.

from vim-r-plugin.

rudjer avatar rudjer commented on July 22, 2024

Problem resolved: :nmap was helpful in revealing that both machines had no RStart
so as yet another step to bring the two machines into alignment I reset my shell from tcsh back to bash on the desktop
and now F2 gives the desired behavior. So evidently something was being set within my tcsh that interfered
with proper functionality of the plugin. Thanks for your suggestions and patience.

from vim-r-plugin.

jalvesaq avatar jalvesaq commented on July 22, 2024

You are welcome! I removed the example of mapping <F2> to <Plug>RStart from the plugin's documentation.

from vim-r-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.