Feature request: I'd like to be able to run ``geany --list-open-files`` and have it simply spit out a list of the files it currently has open to stdout (with full path information). Similar to how --ft-names works.
On 30/09/07 20:23:50, John Gabriele wrote:
Feature request: I'd like to be able to run ``geany --list-open-files`` and have it simply spit out a list of the files it currently has open to stdout (with full path information). Similar to how --ft-names works.
What would you use that for? (Session support will be improved in future - for projects and maybe custom session files).
Regards, Nick
On 10/1/07, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 30/09/07 20:23:50, John Gabriele wrote:
Feature request: I'd like to be able to run ``geany --list-open-files`` and have it simply spit out a list of the files it currently has open to stdout (with full path information). Similar to how --ft-names works.
What would you use that for? (Session support will be improved in future - for projects and maybe custom session files).
Some users had expressed interest in a hierarchical file browser (for files that Geany already has open). I was fiddling around and wrote a small Tkinter utility that would show what files Geany has open, sorted by full path name so as to list files together that are in the same directory, and which provides hot keys to open them (under the covers it just calls ``geany <file>`` and Geany goes to that file since it's already open).
The last bit I need is a way to ask Geany what files it has open.
---John
On Mon, 1 Oct 2007 09:49:20 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/1/07, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 30/09/07 20:23:50, John Gabriele wrote:
Feature request: I'd like to be able to run ``geany --list-open-files`` and have it simply spit out a list of the files it currently has open to stdout (with full path information). Similar to how --ft-names works.
What would you use that for? (Session support will be improved in future - for projects and maybe custom session files).
Some users had expressed interest in a hierarchical file browser (for files that Geany already has open). I was fiddling around and wrote a small Tkinter utility that would show what files Geany has open, sorted by full path name so as to list files together that are in the same directory, and which provides hot keys to open them (under the covers it just calls ``geany <file>`` and Geany goes to that file since it's already open).
Is this really the way we want to go? Sounds very cumbersomely. We could add it temporarily as some kind of workaround but for the future I think this should do a real file browser plugin.
Regards, Enrico
On 10/1/07, Enrico Tröger enrico.troeger@uvena.de wrote:
On Mon, 1 Oct 2007 09:49:20 -0400, "John Gabriele" jmg3000@gmail.com wrote:
On 10/1/07, Nick Treleaven nick.treleaven@btinternet.com wrote:
On 30/09/07 20:23:50, John Gabriele wrote:
Feature request: I'd like to be able to run ``geany --list-open-files`` and have it simply spit out a list of the files it currently has open to stdout (with full path information). Similar to how --ft-names works.
What would you use that for? (Session support will be improved in future - for projects and maybe custom session files).
Some users had expressed interest in a hierarchical file browser (for files that Geany already has open). I was fiddling around and wrote a small Tkinter utility that would show what files Geany has open, sorted by full path name so as to list files together that are in the same directory, and which provides hot keys to open them (under the covers it just calls ``geany <file>`` and Geany goes to that file since it's already open).
Is this really the way we want to go? Sounds very cumbersomely. We could add it temporarily as some kind of workaround but for the future I think this should do a real file browser plugin.
Sorry, that was clumsy of me. I didn't mean to imply that anyone would be particularly interested in using it. I just figured I'd give it a try to see if it's something that is useful for my own use (and anyone else who might be interested).
Anyhow, I agree. I'm guessing you'll probably end up eventually using a plug-in to do these sorts of things but my C is a little rusty, and I happened to be familiar with Tkinter and also had a small bit of free time yesterday. :)
It's ok if ``--list-open-files`` is not a good fit for adding to geany. In fact, Nick mentioned project support... hmm... If you don't add the option I was asking about, I may instead just use my little app to list project files and see if that ends up being handy.
---John
Don't know if this will help, but...
Here's a script for the lua plugin that will create a text file containing a list of your open files, and launch some external program to display the list:.
------------- local file_browser="xterm -e less" local filelist=os.getenv("HOME").."/geanyfiles.txt" local fd=io.open(filelist,"w") for file in geany.documents() do fd:write(file.."\n") end fd:close() os.execute(file_browser.." "..filelist.." &") -------------
Save the script to ~/.geany/plugins/lua/file-browser.lua and it will be in your "tools" menu the next time you start Geany.
- Jeff