I would love it if the startup path would have the option of it being the last used directory. If I am writing a new file which I want to save into a directory several levels down in the directory tree, and I last used that directory, it would be nice if save would offer that directory first.
There are times when I spelunk down the directory tree, and if I am writing a new file for that directory, I do not want to have to spelunk down to that directory again. I think my deepest is 9 down. So when opening or saving files, I would like to open or save to the last used directory.
Also, how do I remove recent files from the list to the left? I do not want that as the default if no directory is entered into Startup path. It is annoying.
Please?
I also grumble about the choice of default directory, but when I stop and think about it Geany would need mind reading (PRs are welcome :) to get it right.
What is the "last used" directory? The one you last saved a file to? Don't turn on autosave or it could be anywhere. The one you last saved a new file to? Possibly, but that could be ages ago, and its often /tmp where I tried something out.
Maybe the directory for the file that was the current buffer when you created the new file? Thats possible too (would often suit me, but also often not suit, for example if I have a header open the body file often goes in a different directory).
Also when a project is open it defaults to the project base directory, is that still appropriate?
Any other definition, eg last file opened, could have been anywhere, all sorts of files get opened in between creating files for the project I'm working on.
A solution that is maybe right every once in a while would be great, and its not like its critical, its only a default for opening the save dialog, the user can always change the dialog (grumblingly) to another directory. But somebody has to do it, PRs are welcome.
AFAIK there is no convenient way of clearing recent files (going to preferences and setting the list length 0 and setting it back might work, but its hardly convenient).
I don't know how Notepad++ did it, but I like how they do their default directory.
I'm afraid you are gonna have to describe it, can't run Notepad++ :)
Let me show you by example in geany. In the image below, you can see I have a file opened called Page.pm. In the titlebar you can see the directory the file is in. Now, if I were to start a new document, the last directory would be the directory Page.pm is in /home/me/Documents/fantasy/files/lib/Base. ![geany_image](https://cloud.githubusercontent.com/assets/123256/25886548/11da847c-352c-11e...) Now to get complicated. In the following image, I have two files opened with a new file between them. Page.pm hasn't moved, but main.css is in /home/me/Documents/fantasy/files/css. If I go to the new file from main.css, the directory will be the css directory. If I go to the new file from Page.pm, the directory will be the lib/Base directory. ![geany_image2](https://cloud.githubusercontent.com/assets/123256/25886763/1adcf6c6-352d-11e...) Now if I were to close all of these files, the last file closed will set the directory. So if I close the css file first then the pm file, the last directory will be the lib/Base directory. When I go to open a file or start a new file, the directory will be lib/Base until I go to another directory for another file.
Does that make sense?
Ok, thats basically "the file that was open when the new file was created" paradigm. So long as it can be optional that should be fine, just needs somebody to do it.
Sure, it could be a check box or radio button.
Happy to open another issue so as to not hijack this one, but I would also personally settle for defaulting to the Desktop directory (or, if not truly defaulting, then allowing the addition of a config option to specify a default directory).
The way Geany works right now (having checked on Windows 10, in particular), is if you call for a 'Save' or 'Save as' from a new file, there is no obvious way to save the file without moving a hand off the home row and using a pointing device. I'd like to 'Save as', type a new file name, and hit enter. I do not want to move a hand away from the keyboard to a mouse pointer just so I can save a file at all.
* Idea 2: last used file from Files -> Recent Files * Idea 3 (might require more coupling, which I don't know how bad is already in Geany's code): take the current directory from the File Browser plugin (Files tab)
@danuker your 2) means "directory of most recently closed file", I'm not sure what use-case that would address?
For 3) maybe add the facility to file browser, but yeah Geany itself won't depend on a plugin.
@elextr for me personally, 2) would be more useful than the home directory (the current default location) when creating new files in a project. Usually I open some files first, to read where and how the new file would work. But it would also be fine when I start a new project: my projects are in a directory structure based on meaning (something like `/home/danuker/projects/learning/clojure/brave-and-true/`). So, for a new learning Clojure project, I could just go one up the directory stack instead of having to go to `/projects/learning/clojure/` again and again.
I guess number 3) is a ticket for the plugin, since the plugin has to use Geany's interface, not the other way round, as you say :)
Seems like the plugin [is in the repository though](https://github.com/geany/geany/blob/e2d2a569f27e7bc02b5776ef2d68771b0ff902fd...).
Any update about this feature?
@yc27 nobody has provided a pull request or mentioned they are working on it so I guess nothing has happened.
github-comments@lists.geany.org