Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to debug broken vim completefunc in haml files?
    primarykey
    data
    text
    <p>I'm using <a href="http://github.com/tpope/vim-rails/" rel="nofollow noreferrer">rails.vim</a> and I love how you can use <kbd>ctrl-x</kbd> <kbd>ctrl-u</kbd> in insert mode to autocomplete long method names like <code>distance_of_time_in_words</code> and <code>accepts_nested_attributes_for</code>. 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.</p> <p><code>:help i_CTRL-X_CTRL-U</code> says the autocompletion is using <code>completefunc</code>. The haml file says its <code>completefunc=syntaxcomplete#Complete</code> (and it's the same in erb and helper files where <kbd>ctrl-x</kbd> <kbd>ctrl-u</kbd> works fine.) I can't find where the <code>syntaxcomplete#Complete</code> magic is defined, but presumably it has something to do with the filetype syntax. My <code>.vim/syntax/haml.vim</code> comes from <a href="http://github.com/tpope/vim-haml" rel="nofollow noreferrer">vim-haml</a>, so I tried removing it but the problem persists. Commenting out my entire <code>.vimrc</code> didn't help either. What else can I try?</p> <p>UPDATE: I searched my vim config files and the only place that looks like it's doing anything with <code>syntaxcomplete#Complete</code> is in <code>autoload/rails.vim</code> and looks like this:</p> <pre><code>function! s:resetomnicomplete() if exists("+completefunc") &amp;&amp; &amp;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 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload