kelleyma49 / PSFzf

A PowerShell wrapper around the fuzzy finder fzf
MIT License
752 stars 35 forks source link

How to automatically open selected file with vim? #206

Open tidaeu opened 1 year ago

tidaeu commented 1 year ago

I am new to this.

Right now, it just returns me back to Powershell with the path to the file. What I would like is for it open the file I selected with vim. I tried to use Invoke-FuzzyEditor but that just ran forever and couldn't find my file.

Settings: Set-PsFfOption -PSReadlineChordProvider 'Ctrl+f' -PSReadlineChordReverseHistory 'Ctrl+r' $env:EDITOR='vim'

mattcargile commented 1 year ago

For Invoke-FuzzyEditor, do you have $env:VISUAL set as well? That variable is set first. And do you have vim in your $env:PATH?

Additionally, if you want to use the Set-PsFzfOption -PSReadlineChordProvider 'Ctrl+f', then you would type vim + CTRL + f + Search + <Enter> assuming you were in the directory that your file was in.