Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Omnifunc is not set #201

Open
duggum opened this Issue Feb 11, 2014 · 5 comments

Comments

Projects
None yet
6 participants

duggum commented Feb 11, 2014

I am using Vim 7.4 on Xubuntu 13.10. After installing vim-ruby using pathogen, I created a test file and entered the test code from the installation instructions. Everything worked fine until I tried Ctrl-X Ctrl-O, at which point I received the "Option 'omnifunc' is not set" error.

:help version shows +ruby

Thanks.

@dkearns dkearns added the ftplugin label Feb 12, 2014

geeky-sh commented Aug 3, 2014

I get the same error. Did you come with any alternative?

Contributor

dougireton commented Nov 29, 2014

The vim-ruby ftplugin only sets omnifunc if these 2 statements are true (1 in VimScript). This command should return a 1:

:echo exists("&ofu") && has("ruby")

1

If you don't get a 1, that means that your Vim was compiled without OmniFunction (unlikely) or it was compiled without Ruby support.

Try :set omnifunc to see if it is actually set to anything. Try :set filetype to see if there's been a filetype detected... it's the filetype plugins which usually set omnifunc.

decapo01 commented Oct 8, 2016

@dougireton running your commands I got 0 and the culprit is

:echo has("ruby")

how do I compile vim with ruby support on ubuntu 14.04?

decapo01 commented Oct 8, 2016

In ubuntu 14.04 I removed the package vim-tiny and installed the package vim-nox. After doing this I can hit ctrl-o and ctrl-x to enable auto completion and the error code "Omnifunc is not set" does not appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment