Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide access to current editor column #1835

Closed
IgnacioHR opened this issue Jan 6, 2016 · 6 comments
Closed

Provide access to current editor column #1835

IgnacioHR opened this issue Jan 6, 2016 · 6 comments
Assignees
Labels
api feature-request Request for new features or functionality
Milestone

Comments

@IgnacioHR
Copy link

I want to open a document right side of current editor according to the following logic:

If current editor is on column 1, side editor must be on column 2,
If current editor is on column 2, side editor must be on column 3,
if current editor is on column 3, side editor must be on column 1.

Also, if the target document to open is already opened in any of the existing editors, then no new editor shall be opened but the editor with the target document opened shall get the focus.

window has the showTextDocument with an argument to indicate the column. This can be used when the new document is still not opened, but if the target document is already opened, you have no way to know in which column.

I've tried a loop over all editors and that doesn't work because the order of the editors array does not follow the same order as the column numbers.

I've found no satisfactory solution for this problem and having access to every editor column might help a lot.

@bpasero bpasero added feature-request Request for new features or functionality api labels Jan 7, 2016
@bpasero bpasero added this to the Backlog milestone Jan 7, 2016
@bpasero bpasero removed their assignment Jan 7, 2016
@bpasero
Copy link
Member

bpasero commented Jan 7, 2016

Also @jrieken fyi

@jrieken jrieken self-assigned this Jan 7, 2016
@jrieken
Copy link
Member

jrieken commented Jan 7, 2016

I like

@jrieken jrieken modified the milestones: Jan 2016, Backlog Jan 11, 2016
@jrieken
Copy link
Member

jrieken commented Jan 11, 2016

tho, there are cases where an editor is embedded inside a 'large' editor - the find reference et al experience. unsure how to handle those...

@jrieken
Copy link
Member

jrieken commented Jan 12, 2016

@bpasero Are there events when editors get rearranged et al?

@bpasero
Copy link
Member

bpasero commented Jan 12, 2016

@jrieken currently not, but I can add such an event to the collection of editor events.

jrieken added a commit that referenced this issue Jan 21, 2016
@jrieken
Copy link
Member

jrieken commented Jan 21, 2016

there is now TextEditor.viewColumn and window.onDidChangeTextEditorViewColumn

@jrieken jrieken closed this as completed Jan 21, 2016
@egamma egamma mentioned this issue Jan 23, 2016
59 tasks
@egamma egamma mentioned this issue Feb 1, 2016
97 tasks
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

3 participants