2

I often "unignore" files in .gitignore, like this:

*
!.gitignore
!file.txt
!dir
!dir/*

Can I modify the pattern for which insert mode file name completion would work? In this case, instead of ./ I'd like the exclamation mark to suffice. I know this qustion on stackoverflow sort of deals with the problem, but I'd like to know if there's a way without omnifunc.

NVIM v0.3.2-964-g7e97587da
Linux 4.20.0-arch1-1-ARCH #1 SMP PREEMPT Mon Dec 24 03:00:40 UTC 2018 x86_64 GNU/Linux
3

how do you trigger file-name completion. completing with ^X^F should do it if '!' does not show up in set isfname?

  • My question was incomplete, sorry. It does work. – Bart Jan 8 at 1:14
  • I use Lifepillar's mucomplete with the variable let g:mucomplete#chains.gitignore = ['file'] and would have expected the completion to work just like ^X^F (where gitignore is a filetype). In my list of todo's I wrongly noted that the manual file completion did not work in this context. I could've just remapped tab locally to ^X^F. But I like mucomplete's custom path completion which I'd like to use, but I can't get it to work without a ./ prefix. – Bart Jan 8 at 1:19
  • thanks for the isfname tip, but it wasn't the issue. I got it to work with mucomplete which required adding ! to iskeyword and a can_complete variable (see this issue github.com/lifepillar/vim-mucomplete/issues/127) – Bart Jan 10 at 19:52

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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