Open umajho opened 2 months ago
I don't know if this is worth opening another issue, but in VSCode, holding down cmd+option not only changes the drag behavior from move to duplicate, but also alters the behavior of cmd-clicking links. When additionally holding down option, even if the link points to a file already open in the current pane, it won't jump to that file in the current pane. Instead, it will open the file in a pane to the right (the destination pane is chosen using the same method as cmd-clicking a link to a file not in the current pane, and can be a newly split pane if there are no panes on the right side) and scroll to the corresponding position. If the file is already open in the destination pane, it will switch to that file's tab and scroll to the corresponding position.
Got it, here's the VSCode behaviors as I understand them:
ctrl-enter
These would be alternate versions of the existing Zed/VScode behavior:
Sorry for not making it clear. In “cmd-clicking links”, what I mean by “links” refers to symbols that appear as links when holding down the cmd key. Clicking on them will go to their definitions.
From #13917 @aryeh:
It would be great if this file-open feature was named so it can be mapped in vim as well.
Check for existing issues
Describe the feature
Currently, one can split panes by dragging tabs (#1439). The dragged buffer will be moved to the newly split pane.
If, by holding down specific modifier keys while dragging, the buffer can be duplicated (i.e., the buffer at the drag start location is retained while the drag destination also creates a buffer that opens the file with the same scroll position as the original), it would enhance the user experience (eliminating the need to split first and then drag when there are already split panes).
Related Discussion: #14858
If applicable, add mockups / screenshots to help present your vision of the feature
This is how it works in VSCode (holding cmd+option while dragging):