Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Command line completion can be displayed in popup menu.
    But it doesn't mean auto command line completion is possible.
    João Paulo

    oh, I think I get what you mean... so feeding <tab> isn't bringing up the command line menu?
    I had some issues in the past with <tab> not working as wildcharm in remapped command. It led me to do something like this:

    set wildcharm=<C-Z>
    cmap <expr> <tab> SearchCommandExpr(1)

    SearchCommandExpr feeds wildcharm instead of <Tab> so it solved my case, although I don't understand completely how it works...

    I don't understand where the problem comes from (in the Neovim internals) or even if it is a problem either
    but maybe it can be solved like this
    1. save wildcharm
    2. set wildcharm to <plug>mapping or some unused key
    3. feedkeys wildcharm
    4. restore saved wildcharm from 1
    João Paulo
    although I also worry if it feels right to complete in the command line...
    I wonder if it wouldn't interfere with the experience, but I also think that having to <C-F> to go to [Command Line] window for completion feels bad
    OK. I will try it
    Unfortunately it doe
    it doesn't work
    João Paulo

    @Shougo no problem
    Now that I think about it better... I think it's good to keep the command line "minimal" (like the shell command-line) and use the [Command Line] buffer for more advanced things with completion.
    Like this idea I had now:

    call histadd(':', 's/'.getreg('y').'/')
    call feedkeys("q:\<Up>A", 'n')

    This way I can jump to [Command Line] with completion only when I need it. So I'll keep using ex-mode like it is now for simpler commands.

    Mike Panciera
    Is there some minimal init.vim I can use to test that this is working?
    I am trying this example because it's the only mapping I can find: https://github.com/Shougo/deoplete.nvim/blob/master/doc/deoplete.txt#L504
    but I don't know how to change deoplete-options-auto_complete
    Why don't read the documentation?
    If you want to disable auto completion, you can disable it by deoplete#custom#option()
    You can see the example
    Saša Janiška
    i'm on debian (sid) and have python-3.7.x, but 'checkhealth' does report: "no python3 provider found". python3-neovim-0.3.0 installed, is it too old for 3.7?
    João Paulo
    @gour probably because you didn't install the python package for neovim
    The latest version is 0.3.2.
    0.3.0 is old.
    You should install manually pynvim package in pip3
    Saša Janiška
    @Shougo thank you
    Keith Hughitt
    @Shougo Thanks for taking the time to respond to my inquiries on GH.
    I've been spending some time readings the deoplete docs / settings up my configuration to behave in the desired manner
    I have just one more goal that I was wondering if you have any suggestions for --
    I'm trying to normalize the completion behavior between ZSH/fzf and deoplete
    Along those lines, one thing that would be nice to do would be to automatically complete expressions when only a single matching result would be found
    For example,
    Typing "file." would popup a denite menu showing all of the above options
    Keith Hughitt
    While typing "file.cr<TAB>" would automatically select the single matching result ("file.create") and populate it, without even needing to show a dialog
    hmm. upon further consideration, perhaps this is more the domain of something like SuperTab...
    I'll look into that a bit more first to see if that can be used to achieve this behavior.
    Keith Hughitt
    Okay, yea, Supertab hijacks too much of the deoplete behavior I'm already happy with..
    Keith Hughitt
    In case it helps anyone else, here is a set of settings that get's pretty close to zsh/fzf behavior:
    " enable at start-up
    let g:deoplete#enable_at_startup = 1
    " only show popup upon request
    let g:deoplete#disable_auto_complete = 1
    " use <tab> / <s-tab> to cycle through completions
    function! s:check_back_space() abort "{{{
      let col = col('.') - 1
      return !col || getline('.')[col - 1]  =~ '\s'
    inoremap <silent><expr> <TAB>
          \ pumvisible() ? "\<C-n>" :
          \ <SID>check_back_space() ? "\<TAB>" :
          \ deoplete#manual_complete()
    inoremap <silent><expr><S-TAB> pumvisible() ? "\<C-p>" : "\<S-TAB>"
    " automatically select the first match
    set completeopt+=noinsert
    " don't insert a newline when selecting with <Enter>
    inoremap <expr> <CR> (pumvisible() ? "\<c-y>" : "\<CR>")
    " matchers
    " head   - exact matches
    " length - don't show typed word
    call deoplete#custom#source('_', 'matchers', ['matcher_head', 'terminal', 'matcher_length'])
    " sort results alphabetically
    call deoplete#custom#source('_', 'sorters', ['sorter_word'])
    Things that I'm still working on finding a solution to:
    1. autocomplete expressions upon <tab> when only a single match exists
    2. include relative filepaths without having to include prefix "./"
    3. don't include typed expression at all (currently cycles through it, even though it's not displayed..)
    4. automatically insert first match upon opening deoplete menu; currently insertion only occurs upon cycling of completion choices.
    @Shougo Thanks again for all of your hard work on the dark-powered plugins! I've been using them for quite some time (starting with vim/unite) but am only just now taking the time to really try and understand them / get the most out of it.
    I'm continually amazed by just how powerful, flexible, and robust some of them are!
    Much respect.
    Saša Janiška
    hello, i'm trying to configure (neo)vim for working with PHP in order to contribute to FLOSS project (Tiki CMS). Besides PHP (and HTML/CSS/someJS) most of the time I'm going to write using Markdown and/or ConTeXt...some of the tutorials I found were using NCM2 or deoplete, but now I see that some moved to Coc.vim, so wonder whether Coc brings any important advantage to Deoplete (or NCM2) besides adding huge chain of deps due to using node/npm?
    I think the users wants to use IDE.
    Saša Janiška
    @Shougo you mean something like phpstorm? i mostly want to stay away from Java-bloat...
    I don't need IDE but other users need..
    Saša Janiška
    @Shougo ok, same here, but wonder what do you think about Coc vs deoplete/ncm2?
    I think deoplete is better because I am the author.