young-developer/nppNavigateTo

Suggestion: Open new tab with file when pasting full file path

Hurricane31337 opened this issue · 2 comments

Is it possible to enhance the plugin's functionality by automatically opening a new tab with the file when an absolute file path is pasted? For instance:

C:\Users\DummyUser\Documents\Coding\CPP\ProjectName\example.cpp
/home/DummyUser/Documents/Coding/CPP/ProjectName/example.cpp
We can easily determine if the path is absolute and then search for it among the currently open tabs. If it's not found, we can promptly open it in a new tab. This feature will save time when there's a need to quickly edit a file with a known path (which, in my case, is quite frequent).

Currently, the user needs to press CTRL+O, paste the file path, manually remove the file name from the path, search for the file in the list (which could be lengthy), and then open it by pressing Enter or clicking "Open".

This seems like a good idea, and I agree that it would be easy to implement.

I'll try to work on a PR today.