This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KATE - one frame equivalent to one tab

Tags: None
(comma "," separated)
Gonzague
Registered Member
Posts
3
Karma
0
In Kate, how do I synchronize the tabs and the frames that are open ?


I mean, I open 1 file (let's call it A), I select View, Split View, Split Vertical. I click inside the new frame, open a new file (B), then I have 2 tabs (1 and 2), for 2 files (A and B).
This is OK.


But now, if the focus is in the frame of file A, then if I click on tab 2, then Kate opens file B in the frame where there was file A, instead of moving the focus to the frame of file B.

It allows to have a different number of tabs open than frames, but how can I have a classic behaviour (one tab is equivalent to one and only one frame) ?
User avatar
google01103
Manager
Posts
6668
Karma
25
you might want to query on the #kate irc channel on Freenode irc://irc.kde.org/kate


OpenSuse Leap 42.1 x64, Plasma 5.x

luebking
Karma
0
What "classical behavior"?
Tabs are stacked elements, that's orthogonal to splitviews - the tabs change the stack of the currently active view (in doubt the only one)

What you apparently want is an interface to control the currently active view, but that's certainly not provided by any kind of "tabbar" (by the original UI element design, technically one could bind tabbar signals to any kind of action)

It might be possible to add such interface as a plugin (the tabbar itself is a one), but you've to ask kate experts on whether that's possible (and how).
Gonzague
Registered Member
Posts
3
Karma
0
"Classical behaviour" is the behaviour we have in text editors like gedit, Notepad++, SublimeText and many others I suppose; where when you click on a tab, it opens the corresponding view, not changes the active view to match the tab clicked.
I am surprised if this is not standard in Kate.
luebking
Karma
0
This is what happens.
Every viewport holds a tabstack, the tabbar controls the active one.

If I got you right, you want to pass around the input focus between the several viewports instead, what is completely uncommon for tabbars.
A tabbar classically controls the visibility (the "layer") between mutually exclusive contents.
Gonzague
Registered Member
Posts
3
Karma
0
I don't understand.
Let us compare gedit and Kate.
In Kate, I split the view to open 2 views v1 and v2 (let's say vertical split: Maj+Ctrl+L). Then I have one tab t1, and 2 views, v1 and v2.
I open a file f1, then I have the same file f1 openned in the 2 views v1 and v2, corresponding to the tab displayed t1.
Now, I click inside v2 (to put focus in v2), I open a new file f2. A new tab t2 has appeared, corresponding to file f2. This is perfectly OK and standard behaviour.
Now, with the focus still in view v2, if I click on tab t1, then file f1 is now openned in view v2, and the two views v1 and v2 display the same file f1.
"Classical behaviour", LIKE in Geddit, would have been:
With the focus in view v2, if I click on tab t1, then the focus moves to view v1, and view v2 is still displaying file f2.
The latest behaviour is what I have always seen in the text editors I have used (hence "Classical behaviour"), and the one I would like to use in Kate, if this is possible.
luebking
Karma
0
No Idea about gedit, and I actually don't use the tabbar plugin in kate (wastes vertical space and the file list scales better).

What I can say is that tabbars do usually not move around the input focus between different elements but change the currently visible element in their canvas.

If I should reason, I'd say that using the mouse (what seems the intention here) atm. allows you to change the current tab of the view as well as to pick the currently active view.

Altering the tab to rather alter the currently active view this would
a) disallow you to select the currently active element in the current view (feature loss compared to status quo)
b) cause behavioral variation (I assume your idea would be to change the active view if the selected text is present in one and otherwise alter the current element in the active view?)

This can certainly be done, whether it can be done via the kate plugin API, I don't know - but it is definitively not the "classical behavior" of a tabbar.
You'll either have to write such element or ask kate developers to add one - it's not as it behaves right now, it's not what I'd expect (eg. choosing a file in the file list should do the same?) or want.
My personal perception of that split feature has been "like putting two kwrite windows next to each other" (some sort of nested tiling WM) and I would seriously not know why I should move the mouse to a tabbar in order to active a view (what's getting harder if the order isn't matched or cannot be matched due to random horizontal/vertical split mixes) - leaving aside that I actually use shortcuts to navigate the currently active view ;-)


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]