Open yixiang opened 9 years ago
Looked in XVim.m and found the following comment
// I have tried to add the item into "Editor" but did not work.
// It looks that the initialization of "Editor" menu is done later...
https://github.com/XVimProject/XVim/blob/c8e4498b26c36538a0ad0bbbd7140a4fe8434a8e/XVim/XVim.m#L69
There should be a solution to this, because the ClangFormat project does insert menu item into "Edit", https://github.com/travisjeffery/ClangFormat-Xcode. Check the code below.
Screenshot:
Well, I'm a little indecisive if I should XVim menu in "edit" not in "editor". Edit menu is for commands to edit test. XVim is just a feature of a editor.
Please let me leave this for a while until I can find the best way...
(If this really helps a lot of people I'll merge this immediately so leave comment here if you feel you need PR)
Short Version: It's your call. :-)
Long Version: I agree that we need the XVim item in Editor instead of Edit. Edit is just a temporary solution as we figure out how to do Editor. Neither my implementation nor the current implementation (as top level menu item) are perfect. I don't have strong feelings either way. The only minor issue I'm trying to address here is that top level menu item causes developers with smaller screen to run into truncated menu bar. However the top level menu item has the benefit of no developer will miss it as it's so obvious. So I would't feel so bad if you decide not to merge.
Inserting XVim as a top-level menu containing only one item doesn't seem ideal. People who have smaller screens would appreciate the menu bar spaced saved, if it is moved into an existing menu such as "Editor", given that Xcode menu bar is already crowded.