IDE: Right click on tab -> Open Containing Folder

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Kiffi
Addict
Addict
Posts: 1357
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

IDE: Right click on tab -> Open Containing Folder

Post 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
Hygge
plouf
Enthusiast
Enthusiast
Posts: 255
Joined: Fri Apr 25, 2003 6:35 pm
Location: Athens,Greece

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

Post 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 :)
Christos
User avatar
Kiffi
Addict
Addict
Posts: 1357
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

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

Post 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:
Hygge
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

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

Post by kenmo »

It's on my To-Do list for the open source IDE :)
User avatar
Kiffi
Addict
Addict
Posts: 1357
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

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

Post 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
Hygge
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

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

Post 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
Post Reply