As mentioned in my last post on VSCode, I’ve recently been trialling it as my editor of choice and so far have found the experience to be excellent. Coupled with the amVim plugin, it’s really suited me well.
I know many people use VSCodeVim, but I was never able to get it running as smoothly as amVim.
One of the features that amVim doesn’t provide is
gf, which in Vim means “go
to file”. If your cursor was over a string, and you hit
gf on the keyboard,
Vim would try to go to that file.
I started searching for a plugin that might do this, and came across seito-openfile, which worked for most of my cases, but I really wanted one that I could customise more to work for me. In particular we use a lot of aliases on our large codebase at work, and I wanted to build a plugin that could support them.
I couldn’t quite find one that did exactly what I wanted, so I decided to bite the bullet and build one!
VSCode GoToFile is my
attempt at recreating Vim’s
gf functionality in VSCode. It will also parse
aliases from your
jsconfig.json, and is clever enough to try a few common
extensions if the file path doesn’t have one (
.scss). Working on this plugin also enabled me to experience plugin
development for the first time and I’ve been really impressed, VSCode offers a
API that is really well documented
great tutorial for getting started.
If you’d like to give this plugin a try, I’d be grateful for any feedback you may have. I’m sure there are many improvements to be made and I’d love you to open an issue if you find a problem.
Don't miss my latest course, React in Five! This course will help you level up your React skills by covering lesser known parts of the React API. Each video is less than five minutes long, and the first four are free to watch. Get started now.
Subscribe to keep up to date with the latest content.
Join the JS Playground mailing list to be kept up to date with the latest tutorials, screencasts and more. You won't be spammed and you can unsubscribe at any time.