How to make open files in one cudatext?

APEC
Posts: 18
Joined: 07.01.2021 19:39

Post by APEC »

Hello,
I have add parameters to user.json

Code: Select all

"ui_one_instance": true,
"ui_reopen_session": true,
but it still open one tab when I open a file in explorer context.

How to keep one session permanently? Regardless when you open app with it *.exe file or open a file within context explorer?
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

@APEC I pushed this question to the author of Cud shell extension,
https://github.com/dinkumoil/cuda_shell ... ion/issues
seems it's correct.
APEC
Posts: 18
Joined: 07.01.2021 19:39

Post by APEC »

dinkumoil wrote: Here the question is, did he try to open a file when an instance of CudaText was already running or when there was no running instance of CudaText? What does he expect to happen in these two cases?
I expected it to behave like NPP, whatever I open file with already opened NPP or opening file with closed NPP throught explorer context, and it adds new tab to the previous session.
dinkumoil wrote: Long story short, the user's problem mentioned above has nothing to do with my shell extension nor with my single-instance startup code.
I'm ok with how it behave right now, but I'm curious why it can't keep session if CudaText is closed when you use context "Open with CudaText" on file in Explorer...
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

I know that we have some options for sessions. In Plugins/ Options Editor: enter "sess", this gives few options:

ui_reopen_session
ui_reopen_session_cmdline
ui_auto_save_session
APEC
Posts: 18
Joined: 07.01.2021 19:39

Post by APEC »

uvviewsoft wrote:I know that we have some options for sessions. In Plugins/ Options Editor: enter "sess", this gives few options:
ui_reopen_session_cmdline
Well, "ui_reopen_session_cmdline" that's what was missing in the equation.
Now with this option enabled I got what I need. It adds new tab to previous session even if CudaText was closed.

You should add this to wiki it's a huge boost for CudaText.
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

added little info to the "Sessions" topic, OK?
https://wiki.freepascal.org/CudaText#Sessions
APEC
Posts: 18
Joined: 07.01.2021 19:39

Post by APEC »

It seem ok. Thanks!
Borut
Posts: 6
Joined: 19.06.2013 13:16

Post by Borut »

Hi. I am new to ČudaText. I do not have an exact, but possibly a similar problem, so I am continuing this thread:

I defined a project, consisting of a folder (with subfolders), so I can see for instance my *.md files in the project tree. When I double click on a file in a project tree, it opens in editor. However, different files all open in the same editor tab. I would like them to open in different tabs, to have them all opened at the same time in one editor instance. What am I doing wrong? Thanks.

P.S. Currently I have the following settings active (just in case something of it matters):
"ui_one_instance": true,
"ui_reopen_session_cmdline": false,
"ui_reopen_session": true,
"ui_auto_save_session": false
uvviewsoft
Posts: 392
Joined: 01.12.2020 13:46

Post by uvviewsoft »

>However, different files all open in the same editor tab.
It is the feature--
https://wiki.freepascal.org/CudaText_pl ... review_tab
you can change options in Proj Manager to avoid it!
https://wiki.freepascal.org/CudaText_pl ... ons_dialog
Last edited by uvviewsoft on 28.04.2021 10:18, edited 1 time in total.
Borut
Posts: 6
Joined: 19.06.2013 13:16

Post by Borut »

Wow! That was fast. Sorry for not finding this myself. Works great. Many thanks (also for the program itself, of course)!
Post Reply