Coding / Programming Videos

Post your favorite coding videos and share them with others!

Introducing VSCode GoToFile

Source link

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.

Existing Plugins

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!

Presenting vscode-go-to-file

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 (.js, .jsx, .css and
.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
and a
great tutorial for getting started.

Reporting issues

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 on Testing React with Enyzme and Jest! The first five videos are free and available to watch now. You’ll learn how to write testable React code, test complex components and use Jest and Enzyme effectively to write clean, thorough tests. 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.

Source link


Leave a Reply

Please Login to comment
Notify of
Translate »