How do I make Vim do normal (Bash-like) tab completion for file names?

前端 未结 6 675
孤街浪徒
孤街浪徒 2020-11-30 16:24

When I\'m opening a new file in Vim and I use tab completion, it completes the whole file name instead of doing the partial match like Bash does. Is there an option to make

6条回答
  •  一整个雨季
    2020-11-30 16:45

    The closest behavior to Bash's completion should be

    set wildmode=longest:full,full
    

    With a few character typed, pressing tab once will give all the matches available in wildmenu. This is different to the answer by Michael which opens a quickfix-like window beneath the command-line.

    Then you can keep typing the rest of the characters or press tab again to auto-complete with first match and circle around it.

提交回复
热议问题