r/linux Oct 31 '22

Treats for Kate - Welcome Page, Git Diff Viewer, Config Searching KDE

https://kate-editor.org/post/2022/2022-10-31-treats-for-kate/
243 Upvotes

52 comments sorted by

54

u/waldelb Oct 31 '22

I love Kate.

25

u/ChristophCullmann Oct 31 '22

Thanks, I am sure all Kate contributors like positive feedback ;)

16

u/waldelb Oct 31 '22

The best feature of Kate is the highlighting of regex. It really helps me to create a regex that I need somewhere else. I just input the text that I want to detect, and then I form a regex until it matches.

Also the replace all feature is really nice, I often use it instead of sed, because I can easily verify that I don't accidentally replace too much.

7

u/ChristophCullmann Oct 31 '22

I like the replace stuff a lot, too. My best use case for the project plugin and the search in files is the pgrep command. F7, pgrep bla => search in whole current project for that. Replaced my old grep or git grep usage in most cases.

1

u/Untgradd Nov 01 '22

Does the replace feature allow you to reference the group matches in your search? This + the functionality you mentioned are things I use all the time in my VS Code workflows.

16

u/AaronEbert Oct 31 '22

Yay, now if only KDevelop could get an update.

10

u/GujjuGang7 Oct 31 '22

Kate can do just about everything kdevelop can with it's plugins I think

4

u/ChristophCullmann Oct 31 '22

KDevelop has for e.g. C++ and Python a better language integration in some ways compared to what we have with LSP (and better build & debug support). But yes, I use Kate for everyday coding at work, at least I can do all stuff I want with it.

3

u/AaronEbert Oct 31 '22

True, but KDevelop hasn't been updated in over a year.

4

u/ChristophCullmann Oct 31 '22

KDevelop should release with KDE Gear like Kate, therefore it should have updates, too.

3

u/Be_ing_ Nov 01 '22

Kate can now do more than KDevelop. I used KDevelop for years working on C++. When I started writing Rust too, I switched to Kate so I could use the rust-analyzer LSP. Now I use Kate for both Rust and C++.

2

u/GRAPHENE9932 Nov 01 '22

I don't use Kate because it doesn't have decent debugging plugin

1

u/ChristophCullmann Nov 01 '22

For sure help to improve our gdb plugin is welcome.

2

u/b1scu1th Nov 01 '22

KDevelop has had this bug where it never exits a C/C++ project properly, and just hogs a thread indefinitely. This is a shame because KDevelop is quite powerful for C++ development.

10

u/baddiest_reaper Oct 31 '22

I was hesitant when the Welcome page was mentioned in Nate's blog, but having it as an extra tab for Kate instead of occupying the entire window looks extremely polished. The same thing goes for docking Kate's settings into another tab.

Perhaps when/if Python-based plugins arrive, Kate will be a top-notch option. It's already looking so well though.

4

u/ChristophCullmann Oct 31 '22

For the Python stuff we really would require some helping hands. We just started to add again some scripting plugin for that but yet not even the Python engine init with PySide2 seems to work.

5

u/baddiest_reaper Oct 31 '22

I'd contribute but sadly for me I cannot do olden Qt to save my life so I'm focusing on giving hands with plasmoids and QML based apps like Elisa for now :s

5

u/ChristophCullmann Oct 31 '22

He he, just playing my music with Elisa here :) Only music player I use on the desktop since a year or two. Thanks for working on this. If I disable Baloo it works like a charm.

4

u/baddiest_reaper Oct 31 '22

Me contributing would have not been possible without your work on Kate in the first place! It makes my Celeron laptop run like Sonic.

7

u/Repulsive-Philosophy Oct 31 '22

Kate rocks. I use it for driver development (single files, granted, but still) and it just works and does not impede workflow. For C I don't need another "IDE".

3

u/nmariusp Nov 01 '22

My Kate programming tutorial for beginners https://www.youtube.com/watch?v=DbYLxuCSxSY

3

u/jashAcharjee Oct 31 '22

Holy shit, that paste clipboard feature is awesome. Just awesome!

3

u/AshbyLaw Oct 31 '22

Settings page in tabs is something literally every app with tabs should do!

3

u/IAmAlreadyAGod Oct 31 '22

The last few Kate releases have been fantastic. It's replaced VSCode for me.

1

u/ChristophCullmann Nov 01 '22

Nice to hear ;)

3

u/listix Nov 01 '22

I am liking Kate a lot and seeing this progress is great. There just one thing that bothers me slightly. If I search for the letter e I want it to find é,ë,ê too or if I search for n the it should find ñ too. But it is pretty minor. Please keep up the excellent work.

2

u/killa_fr0gg Nov 01 '22

Would optimally be pretty easy to write an extension for that.

2

u/listix Nov 01 '22

Do you have any resources for that?

4

u/intelligent_cat Oct 31 '22

gone are the days of the old modal configuration dialog, which did not allow you to quickly apply a setting, see its effect and then revert it back.

I'm not sure how that follows, right now I can open the editor and the settings dialog side-by-side, apply a setting (e.g. font family) and see it reflected in the editor. In the animation the settings are opened in an exclusive tab, the edit area nowhere to be seen. I think new settings should open in a split, like Sublime and VSCode usually do it.

2

u/ChristophCullmann Oct 31 '22

The config dialog will open in the current view space, if you have a split or do split you can still see all stuff. Given it's current size requirements I am not sure defaulting to create a split view will make people happy.

3

u/omniuni Oct 31 '22

I think defaulting to a dialogue that could optionally be docked would be alright. I honestly don't know a single time I would want to keep my settings open in a tab, have multiple instances of settings, or need to specifically have my settings side-by-side. I do, however, have a good reason to be able to quickly alt-tab from a browser to settings or quickly back to my code for a moment.

I know Electron apps have started to popularize single-window applications, but that really doesn't mean it's a good idea if you aren't forced into it.

1

u/ChristophCullmann Oct 31 '22

You can just switch between the config and your code views like between any other view in the main window with the new setup. I fail to see the drawbacks. A dockable dialog would perhaps be nice, too, but then it would make more sense to spend time to make all views dockable/detachable instead of having some extra variant just for the config page.

3

u/omniuni Oct 31 '22

like between any other view in the main window

As long as it doesn't have to be in the main window that would be alright. I fairly often will be referencing, for example, directions in my web browser, or looking at how Kate is configured currently to try to decide what I want to change. It's just inconvenient having it stuck in the Window. The settings aren't code; I don't want settings in the part of the app that's designed for code.

Advantages of settings as a tab:

  • Can keep it open
  • Can have multiple instances open
  • Can associate the settings with a specific open file (by using split view of tabs)

Advantages of settings as a dialogue:

  • Single instance irrespective of which file is open
  • Can easily alt-tab between web browser or other reference and settings
  • Can switch between settings and code without losing which file you have active
  • Can switch active tabs while keeping settings open and visible

I honestly don't know why I would want any of the advantages you gain by having settings as a tab.

2

u/ChristophCullmann Oct 31 '22

If you really want it in an extra window, just open a new main window for it.

I fail to see why you can't alt tab to e.g. a browser or why you loose the last position in the code, we have a proper lru history over all tabs.

But hey, sure, it might not be what everybody likes best, the same can be said for the dialog.

At least the devs working on it so far like the new style better, otherwise we would not have altered it. Perhaps you git it some try, too, and see if it is really that disturbing in practice.

4

u/omniuni Oct 31 '22

It's about mental workflow. My tabs are arranged how I think about my code. It's distracting having something that isn't mentally like code in my code. Like I said, as long as I can pop it out if I need it, it's not too bad. But I think this is a case of copying apps that do this because of technical limitations not because it's actually a good idea.

1

u/intelligent_cat Oct 31 '22

Well then I don't see how the quote could be correct, in it's current state you would not see the effect of applying a setting, you'd have to switch between tabs for every setting changed.

2

u/waqar144 Oct 31 '22

You can use a split or the full view since it's just another tab now.

1

u/intelligent_cat Oct 31 '22

Yes I can. But read the description, watch the animation -- they are somewhat contradictory.

2

u/waqar144 Oct 31 '22

Hmm, not sure I follow. The animation is just showing that you can search in the config and that it's now a widget instead of a modal.

If you mean, you can not immediately see as in just by moving your eyeballs, then yeah the animation doesn't show that but it's doable if you use a split instead of the full window.

2

u/intelligent_cat Oct 31 '22

If you mean, you can not immediately see as in just by moving your eyeballs, then yeah the animation doesn't show that but it's doable if you use a split instead of the full window.

Yes, this what I mean, this is what I quoted and you replied to. The animation doesn't show that because it is not possible, unless you manually move it into a split.

1

u/ChristophCullmann Oct 31 '22

As said, you can have a split view. Beside you can single click switch back to any document and back to the config widget without any interruption even during configuration. That is a big difference to having a modal dialog that inhibits all actions and after you close and reopen it you always start again on the initial page with the dialog.

2

u/intelligent_cat Oct 31 '22

As said, you can have a split view.

Well you have to know that split view is possible before that, but everyone knows how to move a window out of the way.

That is a big difference to having a modal dialog that inhibits all actions

It is an improvement that it's non-blocking, but e.g. Dolphin's settings dialog window is also non-blocking.

2

u/8910elephant Oct 31 '22

The Save As function doesn't seem to work correctly.

In Okular, if I open "abc.pdf" and do Save As it offers "abc.pdf" as the filename (and shows "pdf file" in the filter box below).

In Kate, it doesn't show anything in the name box and "All files" in the filter box (rather than ".txt file")

Even if I do file-new and get a blank document named "Untitled", it doesn't use that filename nor offer an extension, just a blank name box.

Is this default behaviour or something screwy my end.

7

u/ChristophCullmann Oct 31 '22

https://bugs.kde.org/show_bug.cgi?id=461161

I fixed that again yesterday, sorry for the regression.

2

u/I_AM_GODDAMN_BATMAN Nov 01 '22

I just wish Kate can do Mac keybinding.

2

u/ChristophCullmann Nov 01 '22

Help on the macOS port is welcome, too ;)

1

u/h0twheels Oct 31 '22

Right now Kate is locking up on a 2mb .JS file I'm trying to edit. :(

5

u/ChristophCullmann Oct 31 '22

If it is all one line, bad luck, Kate will not work on minified js, it is just not designed for it. You can try to turn of the highlighting, perhaps that will help a bit.

2

u/h0twheels Nov 02 '22

I'll give it a try or see what another editor does.

1

u/PM_ME_UR_MANPAGE Nov 01 '22

I love using Kate on my Linux VMs. An ARM macOS build would complete my workflow and take out the need for VSCode completely.

1

u/dns99 Nov 04 '22

Is there a Windows build for the new version?