Skip to content

Text Editor

Robert Brisita edited this page May 4, 2022 · 4 revisions

Splitting

Events

The two main events that give some indication of text editor splitting are:

Unfortunately, there is no indication of when a "[Circular]" (a VSCode label) file closes. The event TextEditorViewColumnChangeEvent only fires when a text editor's viewColum changes to or from 3 by introducing a split that forces a change of a previous split.

Example

  1. There is a source text editor.
  2. A vertical split from source was created and has a viewColumn value of 2.
  3. Then a horizontal split (orthogonal) is created from source.
  4. The horizontal split's viewColumn value is now 2.
  5. This forces the vertical split viewColumn to change to 3; creating an event.

It also can't be told if a split is horizontal or vertical.

Trade-offs

The main aspect of a codio is to teach and there could be situations where an instructor needs to split or duplicate from a source file. The lack of a close event for "[Circular]" files will have them displayed while a codio is playing until a close event happens to the source file.

Clone this wiki locally