<div dir="auto"><div>Sorry, I meant to say *internal script, not external ;p<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Mar 17, 2022, 12:31 AM Waqar Ahmed <<a href="mailto:waqar.17a@gmail.com">waqar.17a@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><div>Hi, </div><div dir="auto"><br></div><div dir="auto">I don't this is possible via our external script. However, it is doable using a plugin and is really trivial to implement I think. One just needs a timer that fires every x seconds and saves all open documents. Or alternatively it can be implemented in the editor component. </div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Wed, Mar 16, 2022, 11:39 PM Stefan Riha <<a href="mailto:stefan@sriha.net" target="_blank" rel="noreferrer">stefan@sriha.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div>
<div><pre>Hi,
I switched from vscode a couple of months ago and I'm quite happy with kate. However, I miss is auto-save which saved me dozens of identical key presses per hour. Given that auto-save has apparently been a feature request for a decade [1] and not implemented, I assume it will not be implemented for some time.
What I mean by 'auto-save':
Currently I do this:
1) Edit e.g. a python script
2) Save a file with shortcut, e.g. Ctrl-s
3) Switch to a terminal and run the python script
I want to do this</pre><pre>1) Edit e.g. a python script
2) Switch to a terminal and run the python script</pre><p style="margin:0px;font-family:Arial,Tahoma,Helvetica,sans-serif;font-size:small"> </p><p style="margin:0px;font-family:Arial,Tahoma,Helvetica,sans-serif;font-size:small">without having to press Ctrl-s.</p><p style="margin:0px;font-family:Arial,Tahoma,Helvetica,sans-serif;font-size:small"> </p><pre>Having no idea about kwrite/kate (or Qt and KDE in general), I can think of the following options to solve my problem:
*) Modifying the source code (difficult)
*) Writing a plugin (don't know if possible/feasible?)
*) automation via a shell script (don't know if possible/feasible?)</pre><pre>I'd prefer the last option (shell script). Do you think this is feasible?
</pre><p>Can I somehow run a background process that would trigger a save-action, e.g. in the event that a *.kate-swp file is created for that file?</p><p style="margin:0px;font-family:Arial,Tahoma,Helvetica,sans-serif;font-size:small"> </p><p style="margin:0px;font-family:Arial,Tahoma,Helvetica,sans-serif;font-size:small">[1] <a href="https://forum.kde.org/viewtopic.php?f=83&t=102258" rel="noreferrer noreferrer" target="_blank">https://forum.kde.org/viewtopic.php?f=83&t=102258</a></p><p style="margin:0px;font-family:Arial,Tahoma,Helvetica,sans-serif;font-size:small"> </p><p style="margin:0px;font-family:Arial,Tahoma,Helvetica,sans-serif;font-size:small">Thanks for your help!</p><p style="margin:0px;font-family:Arial,Tahoma,Helvetica,sans-serif;font-size:small"> </p><p style="margin:0px;font-family:Arial,Tahoma,Helvetica,sans-serif;font-size:small">Regards, Stefan</p></div>
</div>
</blockquote></div></div></div>
</blockquote></div></div></div>