When in Vim insert mode, is there a way to add filepath autocompletion?

后端 未结 4 1496
挽巷
挽巷 2021-01-29 21:53

I write a lot of shell scripts and I am constantly having to enter in filepaths. I am wondering if anyone knows of a way to get Vim to autocomplete filepaths while in insert mod

4条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-29 22:17

    I experienced similar problem. I found solution like:

        sudo apt-get install realpath
    

    And in VIM naviagte to file with in normal mode type:

        :r !realpath /path/to/file
    

    When you are navigating in non-insert mode after !realpatch you are able to use our key button.

    VOILA! TAB is working again!

提交回复
热议问题