SynWrite (Syn2)

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Matthias030
Senior Member
Senior Member
Posts: 419
Joined: 2007-03-04, 10:48 UTC
Location: Berlin

Post by *Matthias030 »

Request: Syn2.exe startup without filename as parameter. parameter should be optional.

I use Syn2 as lister plugin (F3) and also as external editor (button on buttonbar). Often I need an editor with a blank page to make some notes. (like a notepad replacement).
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Matthias
It may be easy- will upload tomorrow
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

upd. Also some fixes.
User avatar
Matthias030
Senior Member
Senior Member
Posts: 419
Joined: 2007-03-04, 10:48 UTC
Location: Berlin

Post by *Matthias030 »

Thank you for the fast update. Works good for me now.

There is another thing that is sometimes a little bit confusing for me. Thats for sure a bit complicated.
You can set read-only mode to on or off. You can do this in configuration dialog or by clicking on the lock-icon in status bar. The last state after closing is remembered for next startup. Further it seems that the last state for some documents is also written in SynState.ini

I would like it this way: I use plugin mode (F3) only for viewing (read only on) and exe mode (F4) for edit (read only off). But in plugin mode I would like to temporary set read only off. Read only in plugin mode is important since I can switch with Key "4" through registered TC plugins. But in write mode i get every time the message to save my changes.

The big problem here is that only one ini-file is used for both (plugin + exe). So a forced read-only-on for plugin and read-only-off for exe is complicated to realize. Maybe you can create a new global option "Force Read only at Startup" and a command line parameter "WriteMode" for exe? Or even better two new configuration options "force read only plugin" and "force read only exe".

Btw. saving the read only state in SynState.ini is not needed for me at all. That should be disabled.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

that's compilcated.. maybe better to have 2 ini files, for exe synStateExe.ini?
Not sure i want to make add options
User avatar
Matthias030
Senior Member
Senior Member
Posts: 419
Joined: 2007-03-04, 10:48 UTC
Location: Berlin

Post by *Matthias030 »

The easiest way is to use 2 Syn2 installations in different directories. One for plugin and one for exe mode. For plugin I need the option to start always in read only mode. If I temporary disable read only for plugin then it shoud be enabled again next time.

That could be done in following way:

Options dialog -> Editor -> Read only: Set read-only for startup to on/off
Lock-Icon in Status Bar: Temporary enable / disable read-only for current session.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

I may suggest:
read-only at startup: [On / Off / On only for plugin / As saved in previous session ]
-the additional to "Editor- Read-only" (for current session).
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

or [On/ Off/ As for prev. session] but option saved separately for exe/ non-exe (2 diff. ini-keys).
User avatar
Matthias030
Senior Member
Senior Member
Posts: 419
Joined: 2007-03-04, 10:48 UTC
Location: Berlin

Post by *Matthias030 »

read-only at startup: [On / Off / On only for plugin / As saved in previous session ]
-the additional to "Editor- Read-only" (for current session).
That's sounds good. This solution is better than 2 separate ini-keys.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

but when set [On for plugin] what is the value for .exe? So 2 ini-keys sounds better..
User avatar
Matthias030
Senior Member
Senior Member
Posts: 419
Joined: 2007-03-04, 10:48 UTC
Location: Berlin

Post by *Matthias030 »

2 ini-keys sounds better..
feel free to do it that way if it is easier to implement.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

Upd. How it works?
User avatar
Matthias030
Senior Member
Senior Member
Posts: 419
Joined: 2007-03-04, 10:48 UTC
Location: Berlin

Post by *Matthias030 »

It works exactly as I wanted. This was really good work! big thx.

I played around with Copy <-> Copy as RTF this morning. It seems that both options in context menu (right mouse button) and CTRL+C always do the same. Is "Options dialog -> Editor -> Copy to clipboard as RTF" = on, then always RTF is copied. Is setting in options = off then always standard text is copied.

Another little annoying thing: If you enable/disable word wrap, the document jumps back to current cursor position. Open any document, scroll down some pages and then press Ctrl+W, the document jumps back to beginning. To avoid jumping back, you can do a mouseclick to set the cursor to the current shown position. But in read-only-mode and option "show caret in read-only"=off the document always jumps back to the beginning.
User avatar
Alextp
Power Member
Power Member
Posts: 2321
Joined: 2004-08-16, 22:35 UTC
Location: Russian Federation
Contact:

Post by *Alextp »

I think issue wth CtrlW fixed. UPd
User avatar
Matthias030
Senior Member
Senior Member
Posts: 419
Joined: 2007-03-04, 10:48 UTC
Location: Berlin

Post by *Matthias030 »

Ctrl+W issue is fixed for read-only-mode without caret shown.
In edit-mode and read-only-mode with caret shown, the document still jumps back to caret position.
Post Reply