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

前端 未结 6 677
孤街浪徒
孤街浪徒 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

    I personally use

    set wildmode=longest,list,full
    set wildmenu
    

    When you type the first tab hit, it will complete as much as possible. The second tab hit will provide a list. The third and subsequent tabs will cycle through completion options so you can complete the file without further keys.

    Bash-like would be just

    set wildmode=longest,list 
    

    but the full is very handy.

提交回复
热议问题