Users
Current State of Kate on 5
Just a quick update on the frameworks 5 port: KTextEditor, Kate Part and KWrite build and run. Kate is not yet ported and does not compile. These changes were already committed:
- made KTE::Cursor and KTE::Range non-virtual for maximum speed
- removed KTE::EditorChooser, since Kate Part is the only implementation since over 10 years. Just use KTE::Editor* editor = KTE::editor(); to get KatePart.
- new signal KTE::Document::readWriteChanged()
- removed KTE::LoadSaveFilterCheckPlugin, was unused since years
- removed all KTE::Smart* classes in favor of KTE::Moving* classes
- merged KTE::CoordinatesToCursorInterface into KTE::View
- new: KTE::Range KTE::Document::wordRangeAt(KTE::Cursor)
- new: QString KTE::Document::wordAt(KTE::Cursor)
- new: KTE::DocumentCursor
- ported lots of KSharedPtr to QSharedData
- updated Mainpage.dox to reflect porting notes
- some small interface cleanups and additions
Please feel free to join the porting fun. Just follow the Frameworks compile guide and checkout the git branch “frameworks” in the Kate git module.
Read MoreKate: “C++/boost Style” Indenter
Greetings from the Kate land again. This time, Alex Turbov will spend a few words about his “C++/boost Style” indenter that is part of Kate Part for several releases.
The Initial Motivation
This indenter (initially) was designed to help code typing in a “boost::mpl” style (i.e. with leading comma in formatted (template) parameters list). One may read the rationale of such approach in the “C++ Template Metaprogramming: Concepts, Tools, and Techniques from Boost and Beyond” by David Abrahams and Aleksey Gurtovoy. It is really easy to miss a comma when invoke metafunctions and it usually leads to a lot of complicated compile errors. The indenting technique should help to visualize the control syntax and prevent stupid errors like missed commas.
Read MoreKatePart/KWrite arrives in the KDE Frameworks 5 world
After starting the “frameworks” branch in kate.git more than a week ago but doing not much beside an initial KTextEditor compile & link port I felt a big guilty ;)
Given a lot of people blog about the progress of programs X and Y for Qt 5.2 and KDE Frameworks 5 I guess it is time that KatePart joins this club.
Some hours later, a ‘working’ version of KatePart and KWrite have landed in the “frameworks” branch of kate.git. KWrite launches, loads the part and the open action even works (command line parsing is off-line btw. ATM).
Read MoreKate on 5: The Future of KTextEditor and Kate Part
Animated Bracket Matching in Kate Part
Kate in 4.13 will have a new features: Animated bracket matching!
Since the feature might be visually distracting, it is turned off by default. To enable this feature, you have to go into the “Appearance” config page and check “[x] Animate bracket matching.” Due to feature and message freeze, this feature will be available in 4.13 and not in 4.12.
Read MoreKate XML Completion: Converting DTD to MetaDTD
Kate has this nifty little plugin called “XML Completion.” This plugin loads a Meta DTD file and uses this information for context sensitive completion. To use it, you first have to load it in the settings dialog, and then assign a Meta DTD through the XML menu:
In our example, we work on a Kate XML highlighting definition file and therefore loaded the file “language.dtd.xml” which is shipped with Kate. Having assigned a Meta DTD file, we now have these nice code hints:
Read MoreVideo Tutorials Learning C++ (in German)
Multiple Keyboard Layouts and Shortcuts
KDE has a very handy feature to switch keyboard layouts on the fly. This is for instance useful if you use the German keyboard layout by default, and the US layout for programming. To enable keyboard layout switching, go into System Settings > Input Devices (category Hardware) > Keyboard item > Layouts tab:
Here, ‘[x] Configure layouts‘ is checked, enabling the list view. I added the German keyboard layout, and then the English (US) layout. Notice also, that the shortcut is set to ‘Ctrl+Alt+K‘. Clicking apply, a tiny little indicator appears in the panel:
Read MoreMulti-Line Text Editing in Kate
Right after the vim blog and the ‘what’s new in 4.11‘ blog we have another feature that was long requested and finally is available in 4.12: Multi-line editing in block selection mode.
Needless to say that it also supports undo/redo and pasting text. Kudos go to Andrey Matveyakin for implementing it!
Read More