I'm using rails.vim and I love how you can use ctrl-x ctrl-u in insert mode to autocomplete long method names like distance_of_time_in_words
and accepts_nested_attributes_for
. But for some reason it doesn't work in haml files and I can't seem to figure out what's wrong or how to fix it.
:help i_CTRL-X_CTRL-U
says the autocompletion is using completefunc
. The haml file says its completefunc=syntaxcomplete#Complete
(and it's the same in erb and helper files where ctrl-x ctrl-u works fine.) I can't find where the syntaxcomplete#Complete
magic is defined, but presumably it has something to do with the filetype syntax. My .vim/syntax/haml.vim
comes from vim-haml, so I tried removing it but the problem persists.
Commenting out my entire .vimrc
didn't help either. What else can I try?
UPDATE: I searched my vim config files and the only place that looks like it's doing anything with syntaxcomplete#Complete
is in autoload/rails.vim
and looks like this:
function! s:resetomnicomplete()
if exists("+completefunc") && &completefunc == 'syntaxcomplete#Complete'
if exists("g:loaded_syntax_completion")
" Ugly but necessary, until we have our own completion
unlet g:loaded_syntax_completion
silent! delfunction syntaxcomplete#Complete
endif
endif
endfunction