Omni Completion

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Omni Completion

Brent Briggs
Greetings all. I have been trying to get Omni Completion working for the past several days and have reached the end of Google so to speak. I am simply trying to use the Ctrl-x Ctrl-o combo to execute completion in a C file. All of the documentation that I have read says this should be pretty much built-in. When I execute the key combo there is no completion and I get the message:

 -- Omni completion (^O^N^P) Pattern not found

I have the following set in my .vimrc

syntax on
filetype on
filetype plugin indent on

I have also tried autocmd FileType c set omnifunc=ccomplete#Complete with no success.

I am running MacVim Snapshot 72 on OSX 10.9

Is Omni completion still supported? Should I pursue another alternative? What am I missing? My full .vimrc is attached below for completeness.


" General Options
" Set Vim to run in Vim mode instead of Vi mode.
set nocompatible

" Set Vim to use Zsh as it's shell
set shell=zsh

" Turn on syntax hilighting
syntax on

" Turn on filetype detection
filetype on

" Enable loading the indent file for specific file types.
filetype plugin indent on

" Load pathogen plugin manager
runtime bundle/vim-pathogen/autoload/pathogen.vim
execute pathogen#infect()
call pathogen#helptags()

" Set the font
set guifont=Monaco:h13
set noantialias

" Set Vim not to display the menubar in the GUI
if has("gui_running")
    set guioptions-=T

" Set the default color scheme
colorscheme xoria256
" hide the mouse pointer while typing
set mousehide

" Keep some stuff in the history
set history=100

" When the page starts to scroll, keep the cursor 2 lines from the top and 2
" lines from the bottom
set scrolloff=2

" Turn on line numbering
set number

" Set the number of characters per line
"set textwidth=140

" Always display the status line
set laststatus=2

" Set the status line
set statusline=
set statusline+=\%n\                            "buffer number
set statusline+=\ %<%F                          "full path
set statusline+=%m                              "modified flag
set statusline+=\ %{&ff}                        "file format
set statusline+=%y                              "file type
set statusline+=%#warningmsg#                   "Display warnings
set statusline+=%*                              "Turn off color
set statusline+=%{SyntasticStatuslineFlag()}    "Syntastic messages
set statusline+=%=                              "left and right alignment separation point
set statusline+=%5l                             "current line
set statusline+=/%L                             "total lines
set statusline+=%4v\                            "virtual column number
set statusline+=0x%04B\                         "character under cursor

" Set searching options
set hlsearch
set incsearch

" Automatically read a file that has changed on disk
set autoread

" set visual bell -- no beeping
set vb

" Setup Tabbing and shifting
set expandtab       " Set Tab key to produce only spaces and no <TAB> characters
set shiftwidth=4    " Set the shift width
set tabstop=4       " Set the tab width to 4 spaces
set shiftround      " Set shift to go to the next shift boundary
set smartindent     " Turn on smart indent

" Allow backspacing over auto indents, end of lines, and start of lines.
set backspace=indent,eol,start

" Make the 'cw' and like commands put a $ at the end instead of just deleting
" the text and replacing it
set cpoptions=ces$

" enable enhanced tab completion in the command line
set wildmode=longest,list,full
set wildmenu

" Enable virtual editing in visual block mode only
set virtualedit=block

" General Key Mappings "
" setup a mapleader to a key that is easy to reach
let mapleader=","

" Window Manipulation
" Move the cursor to the window left of the current one
noremap <silent> <Leader>h :wincmd h<cr>
" Move the cursor to the window below the current one
noremap <silent> <Leader>j :wincmd j<cr>
" Move the cursor to the window above the current one
noremap <silent> <Leader>k :wincmd k<cr>
" Move the cursor to the window right of the current one
noremap <silent> <Leader>l :wincmd l<cr>
" Close the current window
noremap <silent> <Leader>cw :close<cr>
" Close the window below this one
noremap <silent> <Leader>cj :wincmd j<cr>:close<cr>
" Close the window above this one
noremap <silent> <Leader>ck :wincmd k<cr>:close<cr>
" Close the window to the left of this one
noremap <silent> <Leader>ch :wincmd h<cr>:close<cr>
" Close the window to the right of this one
noremap <silent> <Leader>cl :wincmd l<cr>:close<cr>
" Move the current window to the right of the main Vim window
noremap <silent> <Leader>ml <C-W>L
" Move the current window to the top of the main Vim window
noremap <silent> <Leader>mk <C-W>K
" Move the current window to the left of the main Vim window
noremap <silent> <Leader>mh <C-W>
" Move the current window to the bottom of the main Vim window
noremap <silent> <Leader>mj <C-W>J

" Buffer shortcuts
" Destroy the current buffer
noremap <silent> <Leader>bd :bd<CR>
" Write the current buffer
noremap <silent> <Leader>w :w<CR>
" Quit current buffer
noremap <silent> <Leader>q :q<CR>
" Write and then quit the buffer
noremap <silent> <Leader>wq :wq<CR>
" Force Quit curent buffer
noremap <silent> <Leader>fq :q!<CR>
" List buffers
noremap <silent> <Leader>ls :ls<CR>

" Editing Shortcuts
" Undo last edit
noremap <silent> <Leader>z :u<CR>
" Redo last undo
noremap <silent> <Leader>r :r<CR>
"put (paste)
noremap <silent> <Leader>p :p<CR>

" C Programming Options
" Turn on indentation for C/C++ style source code files
" autocmd FileType c,cpp :set cindent

" Setup Plugins "
" Configure the command-t plugin
noremap <silent> <Leader>b :CommandTBuffer<CR>
noremap <silent> <Leader>o :CommandT<CR>

" Configure the man page viewer plugin.
runtime! ftplugin/man.vim

" Setup the Gundo Plugin
" Toggle the Gundo plugin
noremap <silent> <Leader>gun :GundoToggle<CR>

" Configure NERDTree plugin
let NERDTreeShowBookmarks=1
" Toggle the NERDTree plugin
noremap <silent> <Leader>n :NERDTreeToggle<CR>

" Configure Syntastic plugin
" Perform syntax check on file open and close
let g:syntastic_check_on_open=1
" Always move the cursor to the first detected error when saving or opening.
let g:syntastic_auto_jump=1
" Auto open error window when errors are detected, auto close when no more
" exist.
let g:syntastic_auto_loc_list=1
" Setup syntastic status line
let g:syntastic_stl_format='[%E{Err: %fe #%e}%B{, }%W{Warn: %fw #%w}]'

" Setup the taglist plugin
" Set the path to the exuberant ctags utility rather than the native OSX ctags
let Tlist_Ctags_Cmd = '/opt/local/bin/ctags'
" Set TlistToggle key
noremap <silent> <Leader>t :TlistToggle<CR>

" Setup the UltiSnips plugin
" Set edit window to open in horizontal split
let g:UltiSnipsEditSplit='horizontal'
" Set the private snippet directory
let g:UltiSnipsSnippetsDir="~/.vim/ultisnips_snippets/"
" Set the jump triggers to use tabs
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<tab>"
let g:UltiSnipsJumpBackwardTrigger="<s-tab>"

" Setup the Vundle plugin
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" My Bundles
Bundle 'gmarik/vundle'
Bundle 'vim-scripts/Command-T'
Bundle 'vim-scripts/cscope.vim'
Bundle 'sjl/gundo.vim'
Bundle 'scrooloose/nerdtree'
Bundle 'scrooloose/syntastic'
Bundle 'vim-scripts/taglist.vim'
Bundle 'tomtom/tcomment_vim'
Bundle 'SirVer/ultisnips'
Bundle 'dantler/vim-alternate'
Bundle 'Lokaltog/vim-easymotion'
Bundle 'tpope/vim-pathogen'
Bundle 'tpope/vim-surround'
" Bundle 'Valloric/YouCompleteMe'

You received this message from the "vim_mac" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit

You received this message because you are subscribed to the Google Groups "vim_mac" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit