* * *

Author Topic: Locate current editor file in the OS's file manager?  (Read 896 times)

edwinyzh

  • New member
  • *
  • Posts: 22
Locate current editor file in the OS's file manager?
« on: August 09, 2017, 12:30:47 pm »
Hello,

With the CNPack IDE plugin for Delphi you can 'Open this unit in Windows Explorer'. I'm wondering is there a built-in function or any 3rd party Lazarus IDE extension for this? Thanks.

Pascal

  • Hero Member
  • *****
  • Posts: 530
Re: Locate current editor file in the OS's file manager?
« Reply #1 on: August 09, 2017, 12:43:06 pm »
Just right click on the filename in the status bar an select '"Open Folder ..."
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

taazz

  • Hero Member
  • *****
  • Posts: 4414
Re: Locate current editor file in the OS's file manager?
« Reply #2 on: August 09, 2017, 12:56:36 pm »
go to the menu "tools\Configure External Tools" press the Add button and fill the dialog as shown in the screen shot below. On linux, macOS you need to replace explorer with your selected file manager but you get the idea.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

edwinyzh

  • New member
  • *
  • Posts: 22
Re: Locate current editor file in the OS's file manager?
« Reply #3 on: August 10, 2017, 10:59:03 am »
Thank you two for the help.

@Pascal, right click on anywhere of the status bar wouldn't call up any context menu.

@taazz, strange, your approach should work, but it doesn't on my system, strange, I can see the status bar of the editor flashes when the command is being executed.  screenshot of my configuration: https://screenpresso.com/=xyKqe

I tried both the Lazarus 1.80 RC3 and 1.90 built by fpcudelux few weeks ago.
I use win 7 (with latest updates).

GetMem

  • Hero Member
  • *****
  • Posts: 2419
Re: Locate current editor file in the OS's file manager?
« Reply #4 on: August 10, 2017, 11:19:32 am »
@edwinyzh
Quote
@taazz, strange, your approach should work, but it doesn't on my system, strange, I can see the status bar of the editor flashes when the command is being executed.  screenshot of my configuration: https://screenpresso.com/=xyKqe
It didn't work for me either, so I did a little debugging(screnshot1). The conclusion is you have to uncheck the "Hide Window" checkbox(screenshot2), which should be the default value in my opinion.

Pascal

  • Hero Member
  • *****
  • Posts: 530
Re: Locate current editor file in the OS's file manager?
« Reply #5 on: August 10, 2017, 12:01:44 pm »
@Pascal, right click on anywhere of the status bar wouldn't call up any context menu.
I use laz trunk and fpc trunk. But as you tried 1.9 already if have no clue.
laz trunk - fpc trunk 32bit - Windows 10 Pro x64

GetMem

  • Hero Member
  • *****
  • Posts: 2419
Re: Locate current editor file in the OS's file manager?
« Reply #6 on: August 10, 2017, 12:14:59 pm »
Clicking on the editor's statusbar works fine in trunk. It was implemented by @Juha a few weeks ago.

edwinyzh

  • New member
  • *
  • Posts: 22
Re: Locate current editor file in the OS's file manager?
« Reply #7 on: August 11, 2017, 09:00:12 am »
@GetMem, good finding, now it works!

Re. no popup menu upon clicking the statusbar, if it's just added a few weeks ago, I guess then my version is a little old (but no more than a few weeks ;) I'll try update it with fpcudeluxe when my crossing-GFW Internet connection is in a good status... it's sad to us in China...

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus