Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3624354
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:29:50+00:00 2026-05-18T23:29:50+00:00

Hoping someone can help me out with some pretty erratic behaviour from omnicomplete in

  • 0

Hoping someone can help me out with some pretty erratic behaviour from omnicomplete in Vim with Ruby & HTML.

The problem is that Ctrl+X Ctrl+O only seems to return non-local commands. Method & variable names are left out. If I type Ctrl+X Ctrl+P they show as expected, but omni just isn’t picking them up.

A few things:

  • --version confirms that Ruby in installed (+ruby)
  • I have rails.vim, snipmate and supertab installed – those are the only installed plugins I can think of that might possibly mess with ruby omnifunc
  • HTML omni has the same problem
  • Php & Python omni still works just fine
  • I’ve tried removing the HTML & Ruby-related sections below, but makes no difference – behaviour is the same

The .vimrc is below – any help much appreciated

" Set backup directory so that .swp files aren't stored in work folders
set backup
set backupdir=$HOME/temp/vim_backups/
set directory=$HOME/temp/vim_swp/

filetype on
filetype off

call pathogen#runtime_append_all_bundles()

syntax on
filetype plugin indent on

" Necessary for lot of cool vim things
set nocompatible

set tabstop=2
set smarttab
set shiftwidth=2
set autoindent
set expandtab
set wildmode=longest,list,full
set wildmenu

" Backspace should delete
set backspace=2 " make backspace work like most other apps

" For HTML
autocmd FileType html set omnifunc=htmlcomplete#CompleteTags

" For Ruby
autocmd FileType ruby,eruby set omnifunc=rubycomplete#Complete
autocmd FileType ruby,eruby let g:rubycomplete_buffer_loading = 1
autocmd FileType ruby,eruby let g:rubycomplete_rails = 1
autocmd FileType ruby,eruby let g:rubycomplete_classes_in_global = 1


" improve autocomplete menu color
highlight Pmenu ctermbg=230 gui=bold

" Remaps 'jj' to escape insert mode
inoremap jj <Esc>

" When closing tab, remove the buffer
set nohidden

" SuperTab Options
" let g:SuperTabDefaultCompletionType="<C-x><C-o>"
 let g:SuperTabDefaultCompletionType="context"
let g:SuperTabContextDefaultCompletionType="<C-X><C-O>"

" Close tags
imap ,/ </<C-X><C-O>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T23:29:51+00:00Added an answer on May 18, 2026 at 11:29 pm

    Here are the relevant options:

    set omnifunc=rubycomplete#Complete 
    let g:rubycomplete_buffer_loading = 1 
    let g:rubycomplete_classes_in_global = 1 
    

    You’re probably missing the complete_buffer_loading.

    You can wrap this in autocmd’s for the ruby filetype:

    if has("autocmd")
        autocmd FileType ruby set omnifunc=rubycomplete#Complete
        autocmd FileType ruby let g:rubycomplete_buffer_loading=1
        autocmd FileType ruby let g:rubycomplete_classes_in_global=1
    endif
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm hoping someone can help me out here - I'm testing some javascript and
I am hoping someone can help me out with a quick question I have
Alright, I am hoping someone can help me out. I apologize up front that
I am out of ideas here, so I'm hoping someone can help. Here is
I'm wondering if anyone can help me out with some Canvas. I'm pretty new
Hi I'm hoping someone can help me out with a jQuery lavalamp problem. I
I'm really hoping someone can help me out here. I have a DataGrid in
I'm hoping someone with Javascript experience can help me out with these tabs. Basically,
I'm hoping someone can help me figure out what the pros and cons are
hoping someone can help shed some light on this for me. Im working on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.