Page 1 of 1

IDE: Right click on tab -> Open Containing Folder

Posted: Sun Apr 19, 2020 9:40 pm
by Kiffi
Hello,

almost every serious IDE offers the possibility to right-click on a tab to open the location of the corresponding file in the file manager.

Image

It would be really very nice if PureBasic could do that too. The implementation would not be very complicated in my opinion.

Thanks in advance & Greetings ... Peter

Re: IDE: Right click on tab -> Open Containing Folder

Posted: Sun Apr 19, 2020 10:28 pm
by plouf
yeah very usefull

i use the following "trick" for years

create a bat file with command-> @start %1
then go to tools->configure tools select this batch as "the tool" and %PATH as the argument
it will do the job :)

Re: IDE: Right click on tab -> Open Containing Folder

Posted: Sun Apr 19, 2020 11:00 pm
by Kiffi
plouf wrote:i use the following "trick" for years
We PureBasic programmers know how to help ourselves. This is my "trick":

Image

But after 16 years I would like to have it natively as right click on a tab. :wink:

Re: IDE: Right click on tab -> Open Containing Folder

Posted: Tue Apr 21, 2020 3:43 am
by kenmo
It's on my To-Do list for the open source IDE :)

Re: IDE: Right click on tab -> Open Containing Folder

Posted: Tue Apr 21, 2020 4:26 pm
by Kiffi
kenmo wrote:It's on my To-Do list for the open source IDE :)
Sounds good to me. I'm looking forward to it. :D

Thanks in advance & Greetings ... Peter

Re: IDE: Right click on tab -> Open Containing Folder

Posted: Tue Apr 21, 2020 11:37 pm
by kenmo
I thought I had an implementation for both Windows and Mac, but I just found this procedure and it's only Windows. Maybe I have Mac elsewhere.

There should be Mac and Linux versions of this on the forum, most likely!

Code: Select all

Procedure.i ShowInFolder(File.s)
  ; Folders also accepted
  If (File)
    CompilerIf (#PB_Compiler_OS = #PB_OS_Windows)
      ProcedureReturn (Bool(RunProgram("explorer.exe", "/select," + #DQUOTE$ + File + #DQUOTE$, "")))
    CompilerElseIf (#PB_Compiler_OS = #PB_OS_MacOS)
      ;
    CompilerElseIf (#PB_Compiler_OS = #PB_OS_Linux)
      ;
    CompilerEndIf
  EndIf
  ProcedureReturn (#False)
EndProcedure