Author Topic: Open File Dialog favorites?  (Read 3423 times)

jprod1038

  • Junior Community Member
  • Posts: 7
  • Hero Points: 0
Open File Dialog favorites?
« on: April 04, 2018, 05:42:42 PM »
Is there a way to add additional directories or favorites to the navigation pane in the Open File Dialog?

JimmieC

  • Senior Community Member
  • Posts: 490
  • Hero Points: 17
Re: Open File Dialog favorites?
« Reply #1 on: April 04, 2018, 06:32:11 PM »
I posted something related in the Suggestions area of the forum. I have made this request before as well:
https://community.slickedit.com/index.php/topic,16090.0.html

The Boxer editor, (not nearly as powerful as SE) has some nice features on the File->Open dialog. One of the features, "Jump to dir of active buffer", I had actually requested on the Boxer forum and it was added. That could be expanded to include "Jump to prj dir" & "Jump to current working dir".

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Open File Dialog favorites?
« Reply #2 on: April 04, 2018, 08:04:50 PM »
If you right click on the tab for any open buffer, you can do: "Change directory to", and go to the directory of that file before launching the Open File dialog. The Open file dialog opens at the current working directory, so if you changed there just before launching the Open File dialog, you will be there.

I also have a macro bound to a key (I use Alt-C) that will change to the directory of the active buffer AND put the focus on the smart open window. I use it VERY FREQUENTLY, here it is:

Code: [Select]
_command void cdToBufferFocusSmartOpen() name_info(',' VSARG2_READ_ONLY|VSARG2_REQUIRES_EDITORCTL)
{
    cd_to_buffer();
    smart_open();
}

I would think that macros to change the current directory to the project directory could easily be written and bound to another key.

I find myself frequently using the Smart Open tool window instead of Open File dialog. I tend to only use the Open File dialog when I want to create a new file, I navigate to the desired directory in File->Open and type the name of a file that does not exist, then I have a new file. But for opening existing files I use Smart Open with my macro often, or just type a few characters of the filename in Smart Open and I can get to that file very quickly.
« Last Edit: April 04, 2018, 08:06:49 PM by rowbearto »

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Open File Dialog favorites?
« Reply #3 on: April 04, 2018, 08:09:28 PM »
With a small modification of my macro, you could have another macro that will automatically bring up the open file dialog to the directory of the active buffer. Here is the modification:

Code: [Select]
_command void cdToBufferLaunchBrowseOpen() name_info(',' VSARG2_READ_ONLY|VSARG2_REQUIRES_EDITORCTL)
{
    cd_to_buffer();
    browse_open();
}

I'm sure you could create a similar macro for launching Open File in the project directory as well.
« Last Edit: April 04, 2018, 08:12:00 PM by rowbearto »

JimmieC

  • Senior Community Member
  • Posts: 490
  • Hero Points: 17
Re: Open File Dialog favorites?
« Reply #4 on: April 04, 2018, 09:16:27 PM »
Looks useful.
It would be very convenient to have buttons right on the file dialog though.

jprod1038

  • Junior Community Member
  • Posts: 7
  • Hero Points: 0
Re: Open File Dialog favorites?
« Reply #5 on: April 05, 2018, 04:51:44 PM »
Agreed, it does look useful rowbearto and I have started using it, but it doesn't exactly accomplish what I was hoping for.  I like to use favorites to open files to multiple local GIT Repos and also to review changes for other developers.  So in order to use your trick, I'd first have to navigate to the directory in question.  Would be nice to just do it in one click...similar to how you can do this in Eclipse like so:

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Open File Dialog favorites?
« Reply #6 on: April 05, 2018, 05:10:43 PM »
Not as ideal as having it in favorites, but you can write a macro for each of the directories you would put into favorites to pop up the File Open dialog in your desired directory. Bind it to a key and you can do it in 1 key press for each favorite.

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Re: Open File Dialog favorites?
« Reply #7 on: April 05, 2018, 05:11:47 PM »
I'm sure you could get even fancier popping up a little menu from an SE macro with a list of your favorites, then click on one. It is not as nice as having favorites, and requires a little work, but it is doable now.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: Open File Dialog favorites?
« Reply #8 on: April 05, 2018, 10:30:26 PM »
Is there a way to add additional directories or favorites to the navigation pane in the Open File Dialog?

You can drag/drop folders from the right pane to the favorites pane. I added a few to mine. It didn't look like any of the responses mentioned this but maybe a missed it.

jprod1038

  • Junior Community Member
  • Posts: 7
  • Hero Points: 0
Re: Open File Dialog favorites?
« Reply #9 on: April 06, 2018, 04:27:08 PM »
Clark, that is perfect!  I didn't know you could do that, but is exactly what I was looking for!