Introducing VSCode GoToFile

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…

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
great
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.


Print Share Comment Cite Upload Translate
APA
Jack Franklin | Sciencx (2024-03-28T10:37:54+00:00) » Introducing VSCode GoToFile. Retrieved from https://www.scien.cx/2018/06/21/introducing-vscode-gotofile/.
MLA
" » Introducing VSCode GoToFile." Jack Franklin | Sciencx - Thursday June 21, 2018, https://www.scien.cx/2018/06/21/introducing-vscode-gotofile/
HARVARD
Jack Franklin | Sciencx Thursday June 21, 2018 » Introducing VSCode GoToFile., viewed 2024-03-28T10:37:54+00:00,<https://www.scien.cx/2018/06/21/introducing-vscode-gotofile/>
VANCOUVER
Jack Franklin | Sciencx - » Introducing VSCode GoToFile. [Internet]. [Accessed 2024-03-28T10:37:54+00:00]. Available from: https://www.scien.cx/2018/06/21/introducing-vscode-gotofile/
CHICAGO
" » Introducing VSCode GoToFile." Jack Franklin | Sciencx - Accessed 2024-03-28T10:37:54+00:00. https://www.scien.cx/2018/06/21/introducing-vscode-gotofile/
IEEE
" » Introducing VSCode GoToFile." Jack Franklin | Sciencx [Online]. Available: https://www.scien.cx/2018/06/21/introducing-vscode-gotofile/. [Accessed: 2024-03-28T10:37:54+00:00]
rf:citation
» Introducing VSCode GoToFile | Jack Franklin | Sciencx | https://www.scien.cx/2018/06/21/introducing-vscode-gotofile/ | 2024-03-28T10:37:54+00:00
https://github.com/addpipe/simple-recorderjs-demo