2

Completion seems to work ok overall (so <C-X> + <C-]> complete for tags and <C-X> + <C-N>/<C-P> complete in context), but the line completion (<C-X> + <C-L>) always tells me "Pattern not found".

It does not work even when at the beginning of a new line (when <C-X> + <C-L> should just copy the previous line).

UPDATE: Even when starting vim without anything (vim -u NONE) line completion still does not work. huh?

11
  • What's the result of :verbose imap <c-x><c-l>? (should be "no mapping found")
    – VanLaser
    Aug 28, 2015 at 11:37
  • @VanLaser it says "no mapping found" so that is not the problem.
    – user10607
    Aug 28, 2015 at 12:02
  • 1
    Could you clarify what you think should happen when doing <C-x><C-l> in insert mode? Also, what is the output of :set complete??
    – romainl
    Aug 28, 2015 at 12:24
  • @VanLaser I think it should be :verbose imap <ctrl-x><ctrl-l>
    – Alex Kroll
    Aug 28, 2015 at 12:27
  • 1
    Ah, you're missing the . from the 'complete' option. The current buffer isn't scanned. See :h 'complete' (with the quotes). Just leave that option alone (don't set it yourself anywhere), or add to it.
    – VanLaser
    Aug 28, 2015 at 13:09

1 Answer 1

5

The 'complete' option tells Vim where to look for building the popup menu when you do <C-n>, <C-p> and <C-x><C-l>.

Your value, ],i,d means that Vim will look in tags files (]) and includes (i and d) for completion.

I'm sorry to say that the explanation of what i does is misleading and has been for a long time: it doesn't scan the current file at all.

If Vim doesn't see a tags file and doesn't find any include declaration in your buffer (or they point to files that can't be found) it has nothing to draw completions from and… simply doesn't do completion at all.

Your Answer

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

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