I’ve recently found out plugins are written in Python - the only language I actually know! I am working on a plugin which allows me to copy the selection contents and add it to the end of a chosen file. So far I’ve got it up and running with some extra features like key bindings and a settings file. See it here.
In summary, when run, a quick panel appears which contains a list of the current open files. This popup can be configured to show file names or paths and to include a text preview to aid with files with similar names. When one is selected, the selection contents are inserted at the end of the file.
In addition, a New File
option can be configured to appear in the popup to copy to a new file. I’ve also added support for these new files which obviously don’t have a path, so they just appear as untitled
.
There is also small features such as a customisable status bar message to appear; keeping the focus on the ‘source’ file or the ‘destination’ file; **scrolling to the bottom** where the text was copied; and automatically copying to the next file if there is only 1 other open file to copy to (assuming the ‘New File’ option is disabled).
Any feedback would be greatly appreciated, or ideas for other features. I also need a quick confirmation that the f8
key binding is free on Linux/Mac platforms since that’s what I’ve chosen but I only have access to a Windows platform.