3

Based on tracyone's vim configuration I have created a fork of necovim that automatically registers as vim omnifunc. Just add the plugin with your favorite vim plugin manager and it will work out of the box with YouCompleteMe.


2

To add to existing answers, I found empty(v:completed_item) to be unreliable, and sometimes it will be empty even though I have something selected in the pum. What worked for me was to use complete_info() and directly get the line selected. if the selected line is -1, then we know for sure nothing is selected. pumvisible() ? (complete_info().selected == -1 ...


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....


1

The following works elegantly without the need for too many bindings. function! s:CRComplete() if empty(v:completed_item) execute "norm! i\<CR>" endif endfunction inoremap <CR> <LEFT><RIGHT><C-O>:call <SID>CRComplete()<CR> Edits: In view of Hotschke's answer, the check for v:completed_item in my function ...


1

Ycm can cooperate with Shougo/neco-vim autocmd FileType vim setlocal omnifunc=te#complete#vim_complete function! te#complete#vim_complete( findstart, base ) abort let line_prefix = s:get_input() if a:findstart let ret = necovim#get_complete_position( line_prefix ) if ret < 0 return col( '.' ) " default to current endif return ret ...


1

You can do :%s/<[^>]*>//g If you want to use it multiple times make a map for it like nnoremap g<space> :%s/<[^>]*>//g<CR> So you can use it by pressing g (you can change that of course)


Only top voted, non community-wiki answers of a minimum length are eligible