Version: (using KDE KDE 3.5.0) Installed from: Compiled From Sources It would be quite cool if it were possible to "rotate" a splitter in Kate, i.e. change its orientation from vertical to horizontal (and vice-versa) via a single hotkey and/or a splitter context menu. When I'm using Kate on a smaller screen, I quite often run into a situation where manually I switch my splitter setup from one orientation to the other depending on the nature of the code I work - whichever gives me the most comfortable working environment for the job at hand. Even on relatively large screens, this may well be very nice and convenient to have. Thinking about the practical implementation, the functionality requires two new actions: "Rotate clockwise" and "Rotate counter-clockwise" (or "to the left" and "to the right", respectively), controlling which view ends up on which side of the splitter in the new orientation. The associated keyword shortcuts should operate on the splitter for the currently highlighted view. The actions should also be available in a newly created context menu for the splitter widget, if that's "worth it" (i.e., reasonably maintainable). Shouldn't bloat too much, and result in a real workflow improvement.
Err, "keyboard shortcuts", of course.
As far as I can remember: Wasn't there somebody with a patch for this already? mwoehlke, was it you?
No, it was me. It's likely bitrotted quite a bit, though; I'll look into it some time.
Code: kdesdk/kate/app/kateviewmanager.cpp - add entries in the .xml file - create actions in the ::setupActions function - add a function, example: void simpleRotate() { KateViewSpace *vs = activeViewSpace(); QSplitter *currentSplitter = qobject_cast<QSplitter*>(vs->parentWidget()); if (currentSplitter.count() == 1) return; // root, nothing to switch if (currentSplitter.orientatoin() == Qt::Horizontal) currentSplitter.setOrientation(Qt::Vertical); else currentSplitter.setOrientation(Qt::Horizontal); } This would be rotate clockwise :) Counterclockwise needs a bit more work.
Git commit 8bd9d27f09612069997a55df05459baa592bb436 by Christoph Cullmann. Committed on 11/09/2014 at 15:30. Pushed by cullmann into branch 'master'. implement toggle of orientation of current splitter M +2 -1 kate/data/kateui.rc M +32 -0 kate/src/kateviewmanager.cpp M +6 -0 kate/src/kateviewmanager.h http://commits.kde.org/kate/8bd9d27f09612069997a55df05459baa592bb436