Open file as "paper:" from paper folder location

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Millzey
Posts: 169
Joined: 07 Oct 2011 15:10

Open file as "paper:" from paper folder location

Post by Millzey »

I know this could easily be done with a script as a toolbar or popup, but a config option to force opening/viewing a paper folder as a paper: when viewing the configured xypaper folder in the list would be useful for beginners and paper folder management.

When I click the icon of a paper folder or double click the filename it opens in my associated program (text editor), instead of paper: and the chosen file. I'm usually managing paper folders from the list view and rarely (only sometimes) would need to do anything with a paper folder by left clicking but view/open it. This would apply to paper:, <xypaper> or the full path of default <xypaper>, or PaperPath= from the ini in the address bar.

An additional tweak could be to have only the breadcrumb bar visible when viewing the paper path in the list.

If I'm missing something obvious let me know, thanks!

bdeshi
Posts: 4249
Joined: 12 Mar 2014 17:27
Location: Asteroid B-612 / Dhaka
Contact:

Re: Open file as "paper:" from paper folder location

Post by bdeshi »

Enable portable file association if not active already: Configuration > Other > Features > Portable File Associations. Then open Tools > Customize File Associations..., and add this.

Code: Select all

"Load Paperfolder|:paper" <xypaper>\*.txt>paperfolder(<pfaitem>,3:='l');
Icon Names | Onyx | Undocumented Commands | xypcre
[ this user is asleep ]

Millzey
Posts: 169
Joined: 07 Oct 2011 15:10

Re: Open file as "paper:" from paper folder location

Post by Millzey »

Kick ass. Please move this thread to tips if needed.

I'll be always frequenting the xypaper folder from a default tab. Now all I need is shift click to open it in a new tab, but it doesnt seem to want to. Can that line be expanded to add a reference to tab() and seltab to always open in a new tab?

Thanks a bunch

jupe
Posts: 2794
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: Open file as "paper:" from paper folder location

Post by jupe »

Here is one way to accomplish that:

Code: Select all

"Load Paperfolder|:paper" <xypaper>\*.txt>tab("new", "paper:<curbase>");

Millzey
Posts: 169
Joined: 07 Oct 2011 15:10

Re: Open file as "paper:" from paper folder location

Post by Millzey »

Great!

I made a modification to support opening from subfolders also from xypaper.

Code: Select all

"Load Paperfolder|:paper" <xypaper>\*.txt>::tab("new",regexreplace(<pfaitem>, regexreplace(<xypaper>,"\\","\\") . "\\","paper:"));

Post Reply