Zulip Chat Archive
Stream: lean4
Topic: Open two editors with same file on ctrl+click
Filippo A. E. Nuccio (Jul 04 2023 at 07:47):
If I ctrl+click on a declaration that appears in the infoview, a new VSCode editor opens, with the file where the declaration is defined, already placed at the right point. Is there a way to open two (or more) editors with the same file, in case I want to ctrl+click on more than one declaration but both are defined in the same file? What happens now is that if both foo
and bar
are defined in file.lean
, when I ctrl+click on foo
the editors goes to the line of foo
, and if I ctrl+click on bar
the same editor moves to the line where bar
is defined, but now I do not see foo
any more. I would like to end up with two editors, one with file.lean
at the foo
line and the other with file.lean
at the bar
line.
Filippo A. E. Nuccio (Jul 04 2023 at 07:50):
Oh, found one trick! If after the first click (say, for foo
) I go to View->Editor Layout->Split Right and I activate the right sub-window by clicking on it, it becomes the "active" sub-window, and if I click on bar
it will be this new one that moves to the bar
line.
Sebastian Ullrich (Jul 04 2023 at 07:52):
Ctrl+Alt+Click should do that I believe
Filippo A. E. Nuccio (Jul 04 2023 at 08:07):
Not for me, at least...
Filippo A. E. Nuccio (Jul 04 2023 at 08:07):
The ctrl+Alt+Click and simply ctrl+Click seem to have the same effect.
Wojciech Nawrocki (Jul 06 2023 at 19:21):
Oh yeah there is no support for Ctrl+alt+click in the infoview, only Ctrl+click.
Last updated: Dec 20 2023 at 11:08 UTC