Search code examples
linuxbashvimcommand-line-interfaceautojump

How to edit file with vim without typing path (similar to autojump)?


A few months back, I installed a utility on my mac so that instead of typing something like this:

vim /type/path/to/the/file

I could just type:

v file

9 times out of 10 it would guess the right file based on the past history, similar to the way autojump works. And instead of typing in vim I can just type the letter v.

I can't remember how I set this up though. It still works on my mac but I don't see anything in my .bash_profile that shows how I did that.

I'm trying to get this to work on my linux box.


Solution

  • This can be found here

    https://github.com/rupa/v/blob/master/v

    it should work in Linux too. It is a bash script that uses the viminfo history file to fill in partial strings.

    It can be installed on macOS with brew install v