Page 5 of 15 FirstFirst ... 34567 ... LastLast
Results 41 to 50 of 148

Thread: Vim R plugin installation issue

  1. #41
    Join Date
    Sep 2007
    Location
    Brazil
    Beans
    77

    Re: Vim R plugin installation issue

    Quote Originally Posted by hugmenot View Post
    jalvesaq, In the last days I have been working with the author of the screen.vim plugin to add a mode which opens a separate terminal window for more comfortable interaction.

    He will will put this new release up this week and when that’s done I would encourage you to check it out and see if it’s not a better way of integrating vim and R than using the pipe method.
    [...]
    I have made a short video for him, just as a proof of concept. It does not show what I did later to merge the R plugin and the screen plugin (mostly porting keybinding, BuildRtags(), etc, over to screen) for myself. We also got rid of the flicker when sending lines to the interpreter.
    The new approach is very good! GVim has a couple of advantages over plain Vim, but the perfect interaction with R achieved through the screen plugin makes its use far superior to the current approach of using funnel.pl. I will check the plugin when the new version is released, and certainly I will switch to it.

    The main advantages of GVim is the availability of menus and buttons, which may make unnecessary the memorization of rarely used commands. Other advantage is the number of available colors, but we can use Vim with 256 colors. There are a few color schemes with support to 256 colors, and there is a perl script that helps to pick the colors most similar to the desired ones. I attached the script (I had to gzip it because the forum doesn't accept files with the pl extension).
    Attached Files Attached Files

  2. #42
    Join Date
    Sep 2007
    Location
    Brazil
    Beans
    77

    Re: Vim R plugin installation issue

    Quote Originally Posted by hugmenot View Post
    jalvesaq, In the last days I have been working with the author of the screen.vim plugin to add a mode which opens a separate terminal window for more comfortable interaction.

    [...]

    The cons:
    • Does not work with Gvim. Only with terminals.
    hugmenot, I released the last version of the plugin using funnel.pl and I'm now using screen, but it would be great if you or someone else could test the new version before I release it. To test the new plugin, please, gunzip the attached file and save it at ~/.vim/ftplugin/r.vim. It may be necessary to have the last released plugin installed because xterm is using an icon file available only in the last release.

    The plugin works with both Vim and GVim, but not directly with gnome-terminal. To run R inside gnome-terminal, it's necessary to start it within xterm, detach the session (C-a C-d), and run screen in gnome-terminal ("screen -r").

    I'm not using the screen.vim plugin; instead, I adapted the functions of vim-r-plugin to use screen. So, there is no difference in usage for users of vim-r-plugin.

    Thanks!
    Attached Files Attached Files

  3. #43
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Vim R plugin installation issue

    Just wanted to say that the new version of screen.vim is out on vim.org.

    In your version I noticed some things:
    1. It’s possible to start an instance of R with each press of F2. Things fail from then on. You shouldn’t spawn more than one instance. Myself, I use this technique » screen -d -RR -S Arrr R «
    2. Why do you say screen doesn’t work with gnome-terminal? It works very well here.
    3. Here is a suggestion for the .screenrc:
      Code:
      termcapinfo xterm* 'ti@:te@'
      With this you are able to scroll the R output naturally. With the mousewheel or with Shift-PgUp/Down
    4. some of your keybindings don’t work here. E.g., <C-F9> or <M-Enter>.

  4. #44
    Join Date
    Sep 2007
    Location
    Brazil
    Beans
    77

    Re: Vim R plugin installation issue

    Quote Originally Posted by hugmenot View Post
    Just wanted to say that the new version of screen.vim is out on vim.org.
    Great! I'll try it.
    In your version I noticed some things:
    1. It’s possible to start an instance of R with each press of F2. Things fail from then on. You shouldn’t spawn more than one instance. Myself, I use this technique » screen -d -RR -S Arrr R «
    2. Why do you say screen doesn’t work with gnome-terminal? It works very well here.
    3. Here is a suggestion for the .screenrc:
      Code:
      termcapinfo xterm* 'ti@:te@'
      With this you are able to scroll the R output naturally. With the mousewheel or with Shift-PgUp/Down
    4. Some of your keybindings don’t work here. E.g., <C-F9> or <M-Enter>.
    1. Thanks! -d -RR solved the problem! If you prefer that different R scripts use the same R process, please, put in your .vimrc: let g:vimrplugin_single_r = 1
    2. It was a typo in my script. I was using "-x" instead of "-e".
    3. Thanks for the suggestion. It's even better now.
    4. <C-F9> is working here, but <M-Enter> isn't working to me too. I've switched from <S-Enter> to <M-Enter> because the first only worked with GVim and the second only with Vim. I'll go back to <S-Enter> since it at least works with GVim. You can choose another combination in your .vimrc:

  5. #45
    Join Date
    Oct 2005
    Location
    Albany, NY
    Beans
    842
    Distro
    Ubuntu

    Re: Vim R plugin installation issue

    I saw all this talk about screen.vim and I installed it and I really like it. It seems like a neat way to work for a number of reasons that have nothing to do with R. That being said, will the new R.vim plugin conflict with screen.vim or will they peaceably co-exist?
    Please Insert Funny Statement Here.

  6. #46
    Join Date
    Sep 2007
    Location
    Brazil
    Beans
    77

    Re: Vim R plugin installation issue

    Quote Originally Posted by gunksta View Post
    [...] will the new R.vim plugin conflict with screen.vim or will they peaceably co-exist?
    I think that there will be no conflict between them, and if we find any conflict, we can solve it. I still have to look more carefully at screen.vim to see what improvements I can make in the vim-r-plugin.

  7. #47
    Join Date
    Oct 2005
    Location
    Albany, NY
    Beans
    842
    Distro
    Ubuntu

    Re: Vim R plugin installation issue

    Does it make sense to make the R plug-in dependent on screen.vim? It looks like screen.vim is experiencing quite a bit of development right now.

    It would make installation and set-up slightly more difficult, but I don't think it would be prohibitive to anyone willing to use vim in the first place.
    Please Insert Funny Statement Here.

  8. #48
    Join Date
    Sep 2007
    Location
    Brazil
    Beans
    77

    Re: Vim R plugin installation issue

    Quote Originally Posted by gunksta View Post
    Does it make sense to make the R plug-in dependent on screen.vim? It looks like screen.vim is experiencing quite a bit of development right now.

    It would make installation and set-up slightly more difficult, but I don't think it would be prohibitive to anyone willing to use vim in the first place.
    I'll have time to explore the screen.vim only on the next weekend. Then, I might discover new interesting features and may adopt it since I don't want to reimplement every screen.vim feature into r-vim-plugin. However, currently there are only two lines of r.vim that runs screen: (1) to start R; (2) to send a line of code to R.

  9. #49
    Join Date
    Mar 2006
    Beans
    Hidden!

    Re: Vim R plugin installation issue

    Quote Originally Posted by gunksta View Post
    Does it make sense to make the R plug-in dependent on screen.vim?
    In theory, it would be possible. But the mechanics of r.vim are slightly different from a UI perspective. This pertains to how many lines are sent and how the send command reacts to a visual selection, etc. I guess for old users that wouldn’t be optimal.

    In the end what screen.vim does to send text is just calling screen like this:

    screen -X stuff "<text to be sent>"

    Try it out! And r.vim can do that just as well. Wrapping the original vim buffer itself in a screen is less useful when you open a new terminal window anyway and not a split.

    What we found out just today is that there is a string length limit on the » screen -X « notation of around 4096 characters. This is similar to the original limitation with the R plugin using a pipe. But we already found a way around that. It should be on vim.org soon.

  10. #50
    Join Date
    Sep 2007
    Location
    Brazil
    Beans
    77

    Re: Vim R plugin installation issue

    Quote Originally Posted by hugmenot View Post
    What we found out just today is that there is a string length limit on the » screen -X « notation of around 4096 characters. This is similar to the original limitation with the R plugin using a pipe. But we already found a way around that. It should be on vim.org soon.
    I've just released the first version of vim-r-plugin using screen, and I believe that it isn't affected by the 4096 characters problem because the lines are sent separately, even when the whole file is sent to R.

Page 5 of 15 FirstFirst ... 34567 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •