I have been using spf13-vim for a while now. Recently I have upgraded by pulling down master from GitHub repo. After the updates I see that spf13-vim has neocomplete enabled by default. One of the settings in ~/.vimrc.bundles is as following:

if !exists('g:spf13_bundle_groups')
        let g:spf13_bundle_groups=['general', 'writing', 'neocomplete', 'programming', 'php', 'ruby', 'python', 'javascript', 'html', 'misc',]

Another setting in ~/.vimrc is as following:

" neocomplete {
        if count(g:spf13_bundle_groups, 'neocomplete')
            let g:acp_enableAtStartup = 0
            let g:neocomplete#enable_at_startup = 1
            let g:neocomplete#enable_smart_case = 1
            let g:neocomplete#enable_auto_delimiter = 1
            let g:neocomplete#max_list = 15
            let g:neocomplete#force_overwrite_completefunc = 1

And then further down in ~/.vimrc some key bindings as following...

" Define keyword.
            if !exists('g:neocomplete#keyword_patterns')
                let g:neocomplete#keyword_patterns = {}
            let g:neocomplete#keyword_patterns['default'] = '\h\w*'

            " Plugin key-mappings {
                " These two lines conflict with the default digraph mapping of <C-K>
                if !exists('g:spf13_no_neosnippet_expand')
                    imap <C-k> <Plug>(neosnippet_expand_or_jump)
                    smap <C-k> <Plug>(neosnippet_expand_or_jump)
                if exists('g:spf13_noninvasive_completion')
                    inoremap <CR> <CR>
                    " <ESC> takes you out of insert mode
                    inoremap <expr> <Esc>   pumvisible() ? "\<C-y>\<Esc>" : "\<Esc>"
                    " <CR> accepts first, then sends the <CR>
                    inoremap <expr> <CR>    pumvisible() ? "\<C-y>\<CR>" : "\<CR>"
                    " <Down> and <Up> cycle like <Tab> and <S-Tab>
                    inoremap <expr> <Down>  pumvisible() ? "\<C-n>" : "\<Down>"
                    inoremap <expr> <Up>    pumvisible() ? "\<C-p>" : "\<Up>"
                    " Jump up and down the list
                    inoremap <expr> <C-d>   pumvisible() ? "\<PageDown>\<C-p>\<C-n>" : "\<C-d>"
                    inoremap <expr> <C-u>   pumvisible() ? "\<PageUp>\<C-p>\<C-n>" : "\<C-u>"
                    " <C-k> Complete Snippet
                    " <C-k> Jump to next snippet point
                    imap <silent><expr><C-k> neosnippet#expandable() ?
                                \ "\<Plug>(neosnippet_expand_or_jump)" : (pumvisible() ?
                                \ "\<C-e>" : "\<Plug>(neosnippet_expand_or_jump)")
                    smap <TAB> <Right><Plug>(neosnippet_jump_or_expand)

                    inoremap <expr><C-g> neocomplete#undo_completion()
                    inoremap <expr><C-l> neocomplete#complete_common_string()
                    "inoremap <expr><CR> neocomplete#complete_common_string()

                    " <CR>: close popup
                    " <s-CR>: close popup and save indent.
                    inoremap <expr><s-CR> pumvisible() ? neocomplete#smart_close_popup()."\<CR>" : "\<CR>"

                    function! CleverCr()
                        if pumvisible()
                            if neosnippet#expandable()
                                let exp = "\<Plug>(neosnippet_expand)"
                                return exp . neocomplete#smart_close_popup()
                                return neocomplete#smart_close_popup()
                            return "\<CR>"

                    " <CR> close popup and save indent or expand snippet
                    imap <expr> <CR> CleverCr()
                    " <C-h>, <BS>: close popup and delete backword char.
                    inoremap <expr><BS> neocomplete#smart_close_popup()."\<C-h>"
                    inoremap <expr><C-y> neocomplete#smart_close_popup()

So from these config pieces, it seems like neocomplete is enabled by default. However, now when I enter any document in vim and try to edit in insert mode, Backspace (on MAC) doesn't work as usual and I get error saying:

E117: Unknown function: neocomplete#smart_close_popup

E15: Invalid expression: neocomplete#smart_close_popup()."\^H"

I tried following approaches to fix it:

a) By putting following in my ~/.vimrc.before.local (notice omitted neocomplete). I don't like the approach because this completely disables neocomplete.

let g:spf13_bundle_groups=['general', 'writing', 'programming', 'php', 'ruby', 'python', 'scala', 'javascript', 'html', 'misc',]

b) Setting following at the bottom of my ~/.vimrc

set backspace = indent,eol,start

This approach didn't work either.

So, I have idea maybe to put following in my ~/.vimrc.before.local

let g:spf13_noninvasive_completion = 1

but I don't know what autocompletions I would loose with that? Also, is there another way to fix this, or why is my spf13-vim installation unable to find neocomplete#smart_close_popup


1 Answer 1


It happened to be the problem with how I updated spf13-vim.

I did only

cd ~/.spf13-vim/
git pull

I forgot to do

vim +BundleInstall! +BundleClean +q

After doing that, spf13-vim re-installed some packages and installed following:

+ Shougo/neocomplete.vim

After openning new vim files I am now able to use Backspace again without problems with neocomplete.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.