robole / vscode-file-bunny

Perform file actions quickly with keyboard-driven file selection. 🐰

Home Page:https://marketplace.visualstudio.com/items?itemName=robole.file-bunny

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Open File Under Cursor

lundeen-bryan opened this issue · comments

Very simple feature request is to have File Bunny open the file under cursor. Please include the open to left or right options if possible, otherwise, I'd still be extremely grateful to be able to open the file under the cursor.

Thank you!

Hi @lundeen-bryan ,

Thanks for you interest in the extension.

What do you mean by "the file under cursor"? Where is this happening? Can you provide a screenshot/ more specific description please?

Best wishes

Hi @robole ,

Given that the user has a file open, such as an HTML document.
And the file has text of a filename such as "style.css"
And the user uses the mouse to place the cursor within the filename "style.css" text in the file that is open.
Then file bunny would have a command to open the file that is "under" the cursor, e.g., the style.css file.

Does that make more sense?

Yes, that makes sense @lundeen-bryan .

There is already a command for this called Open Link that works in HTML and markdown files (not sure about others). Alternatively, you can hold the Alt key and click on the link to openthe file. Give it a try!

If you are satisfied that the command covers your use case, you can close the issue.

If you are happy with the extension, I would appreciate it if you star the repo.

Hi again @robole,

I appreciate your quick replies! I looked for the "open link" but it wasn't there.
image

But, my workaround was to just copy and paste the filename in the dialog when using File Bunny: Open File To The Right

It's a great extension. I'll close this issue as resolved, but if you want to consider the concept more, I did find an extension that performs the task I'm trying to achieve here:
https://marketplace.visualstudio.com/items?itemName=Fr43nk.seito-openfile

its called "Open file" by Frank Stuetzer and essentially if there is a filename (even in a comment) it will find and open the file. I just like your feature of opening it to the left or right.

Thanks again.

The complete title of the command is Open link @lundeen-bryan . It is a builtin VS Code command.

If you specifically want to open a file under the cursor to the right/left, then you can modify the title of the issue!

I am open to implementing something like this, but I dont want to recreate what VS Code does or what another extension does ably.

I will pass on this idea for now. This functionality is mostly covered by the builtin commands Open Link and Go to Definition. If you want a more comprehensive approach, you can use the Open File extension that you mentioned.