omnicompletion does not seem to work for objects

47 views
Skip to first unread message

orenz...@gmail.com

unread,
Feb 26, 2015, 7:42:12 AM2/26/15
to vim-r-...@googlegroups.com
Thanks for this wonderful plugin

I've set up everything according to the manual, and omni-completion works for R functions (C-X C-A) but not when I try to autocomplete object like a dataframe (using C-X C-O). The dataframe is viewable in the object browser, but when I type the dataframe with column name (like dfname$colu) and try to autocomplete, it returns 'pattern not found'.
Am i missing something?

Thanks in advance

Oren

Jakson Alves de Aquino

unread,
Feb 26, 2015, 8:51:24 AM2/26/15
to vim-r-...@googlegroups.com
What is your operating system? Are you using Vim, GVim or MacVim? What are the versions of Vim-R-plugin and vimcom?
The omnicompletion of objects in R's workspace should work even if running Vim without the 'clientserver' feature.

orenz...@gmail.com

unread,
Feb 26, 2015, 9:21:51 AM2/26/15
to vim-r-...@googlegroups.com
(uname -a) Linux o-desktop 3.13.0-45-generic #74-Ubuntu SMP Tue Jan 13 19:37:48 UTC 2015 i686 i686 i686 GNU/Linux

Vim 7.4 (inside tmux 1.8)
vimcom 1.2
vim-R-plugin 1.2

Is there any other debugging information I can give?
Thanks


Jakson Alves de Aquino

unread,
Feb 26, 2015, 9:57:36 AM2/26/15
to vim-r-...@googlegroups.com
If you put in your ~/.Rprofile

options(vimcom.verbose = 4)

then, after <C-X><C-O>, you should get the an output similar to his in R:

VimCom Received: [8] homeuserdirfileRhOfK9sCv8Z7jGpdK5du8cgvimcom:::vim.bol("/tmp/r-plugin-user/GlobalEnvList_homeuserdirfileRhOfK9sCv8Z7jGpdK5du8cg")
vimcom_eval_expr: 'vimcom:::vim.bol("/tmp/r-plugin-user/GlobalEnvList_homeuserdirfileRhOfK9sCv8Z7jGpdK5du8cg")'

The first line is the message sent from Vim to R, and the second one is the command executed by R (the creation of the list of objects in R's workspace).


Jakson Alves de Aquino

unread,
Feb 26, 2015, 2:05:40 PM2/26/15
to vim-r-...@googlegroups.com
Note: options(vimcom.verbose=4) must be before library(vimcom).

orenz...@gmail.com

unread,
Feb 27, 2015, 1:07:55 AM2/27/15
to vim-r-...@googlegroups.com
vimCom Received: [8] orenDocumentsresearchutilityR8P21FVwHONitsmSlSHeWgvimcom:::vim.bol("/tmp/r-plugin-oren/GlobalEnvList_orenDocumentsresearchautilityR8P21FVwHONitsmSlSHeWg")
vimcom_eval_expr: 'vimcom:::vim.bol("/tmp/r-plugin-oren/GlobalEnvList_orenDocumentsresearchutilityR8P21FVwHONitsmSlSHeWg")'

I actually went on and tested with R sample dataframes (airquality and cars), and omnicompletion works fine, so the problem is my dataset and not the plugin (vimcom reply was identical). Weird, since autocompletion in the R console works.

Thanks for the help and the plugin

Jakson Alves de Aquino

unread,
Feb 27, 2015, 9:22:21 AM2/27/15
to vim-r-...@googlegroups.com
It's really strange because everything seems to be working:
  1. Vim sends to R the message to build the omni list.
  2. R builds the list.
It seems that Vim is not reading the list, but I installed the version 1.2 here and it works fine. Is it possible that you have different versions of the plugin installed in different paths?

Jakson Alves de Aquino

unread,
Feb 27, 2015, 9:26:48 AM2/27/15
to vim-r-...@googlegroups.com
To easily check what scripts Vim is reading at startup, you can start Vim in this way:

vim --startuptime /tmp/vimstttime script.R

Then, quit Vim and look at /tmp/vimstttime.
Reply all
Reply to author
Forward
0 new messages