Search code examples
vimcompletion

VIM cmdline completion after '#' (hash key)


SETUP

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 31 2015 23:35:48)
Included patches: 1-488, 576
Modified by pkg-vim-maintainers@lists.alioth.debian.org

set wildmode? wildmode=list:longest,full

  • some plugins: i.e. UltiSnips

Problem

when typing a :call command, where I'd like to invoke some routine of a plugin directely, cmdline completion (with TAB key, by default) stops after the #.

i.e.: I want to complete :call UltiSnips#ListSnippets()
where many other UltiSnips routines are available.

  • When typing :call ult and press TAB, I get:
    :call UltiSnips# with a listing of all possible matches.

    1. When I press TAB further, it toggles through all matches correctely

    2. BUT if I try to contiue typing the function name like :call UltiSnips#List and hit TAB, it wont complete the funtion's name, but ANY completion, that is starting with List (what I typed after the #; ListTemplateSuffixes( in my case)


Solution

  • This has been fixed by recent Vim patch 7.4.516: issue 253: completing function name with a # does not work.

    So, you just need to update your Vim (by compiling it yourself; or just wait until your distribution provides such upgrade).