-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alternate way to open ANF, with current clipboard item used as initial file contents #121
Comments
If you are using the "New file at" command (see https://github.com/skuroda/Sublime-AdvancedNewFile/wiki/Menu-Entries#side-bar-menu), it should populate with the selected directory. If you are using the normal command, you may want to try the special alias Obviously not an exact match, but may get you closer. I've been busy so haven't been able to work on the plugin much. So some alternative solutions may help. |
Good to know these things. Definitely helpful.Thank you. |
After using your suggestions for a few months, I do not need this feature-request anymore. Thanks again. |
Related to what I proposed in #183 (comment), this could be implemented by accepting an argument to allow a custom command to be executed inside the |
Actually, re-reading the initial post, this isn't what you're requesting. What you want is to insert the contents of the clipboard first and then name your file. I don't think the standard workflow can be easily catered to that use case, but as an alternative, how about
Note: Requires #135 to be fixed first. |
ANF is one of my primary plugins (Windows ST3), but only after I started using Clipboard Manager (CM) with it. I find myself more often than not, having the initial contents for the file in the clipboard. But this conflicts with the fact that I most often create the path by copying it from an existing folder (either in the sidebar or externally), and then tailor it in the ANF dialog. Because of this conflict, before CM, I ended up not using AdvancedNewFile at all.
Now with CM, I have the initial contents in the clipboard, I copy the folder path, paste it into the ANF dialog, tailor it, then
"Package Control > Clipboard Manager: Choose and Paste > down arrow for item 2 (the 1st is the path), enter".
Not great, but much smoother!
I wish ANF had an optional feature that would make this even better. It's the ONLY reason I use CM to begin with. Specifically, I'm thinking a new command called something like "open_advanced_new_file_use_clip_as_initial_contents". I would call this with an alternative key command (likely ctrl+shift+N--I call ANF normally with ctrl+n, and the original File>New with ctrl+alt+n).
It would copy the current clipboard text into this special initial-file-contents-buffer, and then open the ANF dialog as usual. I would then copy and then tailor the path and hit enter. The file is created as normal, but, in this case the contents of that buffer (the text previously in the clipboard) would be immediately pasted into the new file.
I hope I've been clear. This would dramatically increase ANF's usage, and it's already really useful!
Thanks for listening :)
The text was updated successfully, but these errors were encountered: