Rethinking the Menu Bar
Hello there,
I think Kate needs a serious refactoring of its menu bar. Why? It has grown over the course of twenty years quite large, and some menus contain actions that semantically don't go together too well. There is also a request for cleaning the menu bar in 439414. As this naturally also affects the other KTextEditor based editors, I have allowed myself to put this issue here.
Main suggestions
- Introduce a top-level navigational menu (Go): Kate currently has many navigational actions spread accross view, edit and lsp client menus. They semantically belong together and should be placed due to their importance in a top-level menu
- Introduce a top-level menu called Selection, which encompasses actions that are useful on the current selection (see VS Code)
- Move Bookmarks into the Go menu to preserve some space in the top level menu bar, as is currently done in Dolphin. As this is probably not acceptable on its own, create a Bookmarks plugin view (on the side). As a side effect this could also be much more powerful as a tree view (see Okular).
- Get rid of LSP Client menu by moving its actions into other menus -> Go, Edit, Tools
Detailed suggestions
File
I think this is in a relatively good state now after !337 (merged) and utilities/kate!678 (merged). Though, it still maybe has too many save and close options.
Edit
Move to Selection:
- Select All
- Deselect All
- Block Selection Mode
- Everything inside current Selection submenu except Copy as HTML which should be placed right below copy?
- Maybe also Join Lines? (It seems quite hard sometimes to draw lines where each item should go)
Move to Go:
- Everything in Go To
- Maybe also Search More/Go to next/previous Match?
View
Move to File:
- New Window (was already declined in utilities/kate!689 (closed))
Move to Go:
- Previous/Next Document
- Previous/Next Tab
- Quick Open
- Last Used Views
- Previous/Next Split View
Move to Tools:
- Show Git Blame Details
- Toggle Git Blame Details
- Switch to Command Line
Move to Settings
- Color Theme (as proposed in the bug linked above)
Group together: Word Wrap, Borders, Code Folding
LSP Client:
Move to Go:
- Go to Definition
- Go to Declaration
- Go to Type Definition
- Search and Go to Symbol
Move to Edit:
- Format
- Rename
- Code Action
Move to Tools:
(maybe own lsp submenu in tools)
- Restart (All) LSP Servers
- More Options
Don't know yet:
- Find stuff
- Switch to diagnostics
- Close all dynamic reference tabs
Selection
Additionaly items:
- Add a caret above current cursor
- Add a caret below current cursor
- Create multiple cursors from selection
Tools
This one is the most difficult to refactor for me.
Move to Edit:
- Invoke Code Completion
- Word Completion
- Clean Indentation
- Align
Remove:
- Move to Terminal Panel: Add the shortcut to the tool views submenu
Others:
- Very unsure about actions in Scripts. They feel like they would deserve a bit better exposure. Some actions like Duplicate selected lines up/down and Move lines up/down feel like they should be exposed in Edit
Problems
- KDevelop already has a navigational menu. Would it be okay to also have a Go menu? Suggestions needed.
- Go menu already seems to get too large, maybe with submenus it could be okay?
- What to do with Project actions?
This is certainly a daring approach, so let's get into discussions :)