sponsor Vim development Vim logo Vim Book Ad

vim-auto-popmenu : Display the Completion Menu Automantically (next AutoComplPop) !!

 script karma  Rating 26/8, Downloaded by 777  Comments, bugs, improvements  Vim wiki

created by
Wei Lin
 
script type
utility
 
description
    A tiny and portable script (169 lines) to provide you YouCompleteMe like experience for buffer,
    dictionary and tags completion without installing heavy completion engines and building
    background servers.

HomePage:

    https://github.com/skywind3000/vim-auto-popmenu

What Is It ?

    Semantic completion is great, but sometimes, when you are coding in an obscure laguange
    which is lack of LSP support, or you are working in a temporary system and you don't want
    waste time to set up a heavyweight completion engine and build a background server.

    In these circumstances, vim's built-in completion system is good enough for you, it can
    collect keywords from buffers and dictionary or ctag files, but requires you to press <c-n> or
    <c-x><c-k> manually.

    This tiny little script will help you to trigger the completion menu when you have entered
    1 or 2 alphabets and provide you exact the same experience like YouCompleteMe:

Screenshot:

    https://raw.githubusercontent.com/skywind3000/images/master/p/auto-popmenu/demo.gif

Features:

    - Popup the completion menu automatically.
    - Tab or shift+TAB to cycle keywords, <c-e> to cancel.
    - Same experience like YouCompleteMe for buffer, dict and tags completion.
    - Green, everything is local to buffer, will not pollute your vim or disturb other plugins.
    - Capable to co-exist with other completion plugins.
    - No heavy engines, no need to build background servers.
    - Faster and more handy than the old famous AutoComplPop.
    - Portable, just a simple apc.vim script, easy to be distributed.
    - Only 169 lines, you can even copy it to your vimrc.
    - Convenience as a backup way for big completion plugins.
 
install details

    Plug 'skywind3000/vim-auto-popmenu'

    " enable this plugin for filetypes, '*' for all files.
    let g:apc_enable_ft = {'text':1, 'markdown':1, 'php':1}

    " source for dictionary, current or other loaded buffers, see ':help cpt'
    set cpt=.,k,w,b

    " don't select the first item.
    set completeopt=menu,menuone,noselect

    " suppress annoy messages.
    set shortmess+=c
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
apc.vim 1.0.2 2021-03-12 7.4 Wei Lin new option g:apc_cr_confirm to change <cr> behavior.
apc.vim 1.0.1 2021-03-07 7.4 Wei Lin fixed: stop working when set hidden.
apc.vim 1.0.0 2021-01-26 7.4 Wei Lin Initial upload
ip used for rating: 216.73.216.208

Questions about Vim should go to the maillist. Help Uganda.     Vim at Github