Kate for Python
I have been working with many text editors; from Cygnus EDitor (CED) on Amiga in pre-internet days, nano, joe, vi on Solaris , Notepad, Context Editor, Scite, Notepad++ ... and stay with Sublime Text for years...
When I installed Manjaro on my laptop this year (April 2021.), I was curious about the Kate - KDE Advanced Text Editor which comes preinstalled with KDE flavor. I was quite pleasantly surprised with out-of-the-box look and feel. It is snappy, fast, very configurable and easy to use (at least for me) since it looks like Sublime Text or VS Code older brother with a new hairstyle.
Since I work with Python and SQL as my main tools, I have tried to set up Kate for this purpose. And it worked quite nicely. How ? I will show...
First, I need to enable Kate's Build Plugin:
then, I need to set the Build
You will see the Target Set with four lines (Build, Clean, Config and ConfigClean).
Now you should see just Target Set with Build row.
Set Build
Recommended by LinkedIn
Now, we could make our lives easier and add shortcut for run this build:
Done! Open Python script and press F5 for start interpreter.
You may add many builds either for different Python virtual environments (if you prefer) and/or other language triggers, which I show you on the next picture.
Then, I needed some editing tools which I use in Sublime Text... and found it is quite easy to extend the Kate editor with JavaScript, Python or Lua scripts as well as any other Command Line Interface (CLI) apps.
I started with Python extension scripts for exploration, then went to Lua scrips for better speed. Also, I am using couple of CLI apps for some other tasks like base64 encoder/decoder written in GO, jq for JSON file verification, ...
[3.] TODO: JavaScript functions & extensions (pending...)
It is so easy to extend Kate per your liking in many different ways. Also, I am glad to see new improvements in the new versions of Kate.
Why Kate ?
Open Source, Powerful, Extensible, easier to configure than Sublime or Notepad++ (subjective).
I recorded a video guide on this topic: https://youtu.be/uUARxGG_pro
Refreshed a bit this article and added some of my Lua_utils.
How did you know "%f" was needed ? I'm looking for documentation and I just can't find anything related
Thanks a lot. There seems to be some added functionality with newer Kate versions, but this got me on the right track.
Very nice! Thnx.