I wish I could open the same file in multiple tabs. Basically, I want the same functionality as cmd+2 gives me, but without creating a split.
In another editor that I use, my workflow consists of this rather than splits or bookmarks. I "duplicate" the current view, scroll to the other place in the file that I want to inspect and to "go back", I just close the tab again. Once you are used to it, it's a very nice workflow.
Now, as far as I can tell, this is not really possible? I'll gladly create an extension if possible. I guess I could allow opening files with an additional query-parameter or something, effectively showing two copies of the same file. However, I worry that this would give me constant "this file was changed outside" dialogs which is not what I want -- I want the buffers synchronized the way splits are.
Can someone help me in the right direction?
Or at least allow opening the same directory in multiple windows to workaround not being able to open the same file in multiple tabs / editors within the same window.
Sublime has this with File -> New View Into File
+1
+1
+1
+1 this is what keeps me switching over from Sublime
+1 would be a great feature to have for ex sublime users
+1 this feature has kept me away from switching as well.
+1 tired of rolling up and down, also do not like the seperate view.
+1
+1
For me, the benefit here is token highligting when clicking or double clicking a token. I want to see them at multiple places in the file without needing to scroll.
I wish this feature is going to be done, so I can just use VSCode instead of using multiple editors, this feature is useful when I need to keep my cursor position and in the same time I need to check something in the end of the file without splitting the view and with having the full width of the screen for this edit in the other view on this file.
+1 this is very, very useful in Emacs for editing big files, were you can make two (or more) "windows" display the same "buffer" (file), usually in different positions.
+1 Need full horizontal width for both the editor windows
There is a workaround where you can open context menu of the file in the sidebar and use option Select for Compare and then open context menu again on the same file and use Compare with Selected. This will open new comparison view which is by default in side-by-side view. To switch it just use Toggle Inline View in the tab right corner menu.
This allows to open the same file in two separate tabs (without splitting editor). Changes between the tabs get synced, but unfortunately highlighting is only in the scope of a single tab. And as far as I know this only lets you to open the same file twice, no more.
@bpasero Would a PR be welcome here? If so, could you provide a pointer to likely starting points in the code base? Not sure I'd have time, but I'd at least like to take a look.
@ultraGentle please keep PRs to issues labeled "help wanted" or "good first issue". Thanks for understanding.
@bpasero understood. If at some point you reconsider "help wanted" on this issue, happy to look into expediting this feature.
Re: @DominikSerafin 's workaround (using the "select for compare" function to compare a file with itself):
This process can be streamlined to a keyboard-only sequence by
command palette > compare active file with ... > up arrow to select current file > enter.
Then, once you've selected "inline view" (i.e. full width) once from the top-right menu in compare-view VSCode will default to that view next time.
Still not ideal, but at least it's a muscle-memory friendly way of getting the same file full-screen in two separate tabs!
Or, since this is all command/keyboard based, I wonder if this could be turned into an mini-extension, or a macro in the existing extension multi-command ...
+1 sometimes you need it
We closed this issue because we don't plan to address it in the foreseeable future. You can find more detailed information about our decision-making process here. If you disagree and feel that this issue is crucial: We are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding and happy coding!
It's not going to get implemented right now, it seems.
To be honest, VSCode is amazing and let's try not to be too negative here. It's amazing that the team delivers at the same pace every release. Let's cut them some slack. 4.3k open issues must be crazy to try and handle. I would suspect that the response above, while from a bot, is the result of human action in another system.
Be nice, people =]
Most helpful comment
Sublime has this with File -> New View Into File