1

So i have a bunch of files in a directory. I'm editing another file which have broken links/reference to these same files, and i want to edit them.

There isn't too much so doing it manually wouldn't take long...but how do i autocomplete their filename in the current buffer? example:

examplefile.txt

to

examplefile[TAB]name.txt

Where [TAB] is just the Tab key being pressed, for the sake of illustration.

Nordine Lotfi
  • 683
  • 4
  • 16
  • Have a look at :h i_CTRL-X_CTRL-F – Christian Brabandt Jun 30 '20 at 06:33
  • works, though i wish it would autocomplete/work using Tab instead – Nordine Lotfi Jun 30 '20 at 06:39
  • You can remap anything to do anything. That's not a big deal. But too often one wants a tab to do a tab. So think twice. – Matt Jun 30 '20 at 07:18
  • True, but i'm saying this while being fully aware that i don't use tab :D i'm more of a space guy. @Matt – Nordine Lotfi Jun 30 '20 at 07:33
  • Then inoremap <tab> <c-x><c-f> What's the problem? – Matt Jun 30 '20 at 07:36
  • 2
    @NordineLotfi Even as a space guy if you don't use the tab key it might be because you are not aware of :h 'expandtab'. I would still recommend not to remap tab but Matt's comment should be a good answer. – statox Jun 30 '20 at 07:46
  • 1
    Do these answer your question? https://vi.stackexchange.com/q/6432/10604 https://vi.stackexchange.com/q/24708/10604 – D. Ben Knoble Jun 30 '20 at 11:58
  • @NordineLotfi Can you please answer the questions people asked you in the comments? Or if you found a solution which suits you can you post it as an answer? That would be beneficial for the community and people who will find your question in the future. – statox Jul 02 '20 at 12:16
  • 1
    Yes, i can confirm what D. Ben posted indeed solve my case @statox sorry for the late answer. – Nordine Lotfi Jul 02 '20 at 23:32

0 Answers0