I created a plugin from the idea posted by Marco Sordi on UserEcho.
The plugin will look for a file name in the following places (and in the following order):
-
the cursor expanded to enclosing quotes (both single and double quotes should work)
-
the selected text
-
the whole line
-
the clipboard text
If no filename can be found, the plugin will try to create a new file from the selected text.
Both relative and absolute paths should work.