@@ -521,6 +521,62 @@ def split(
521
521
Cell/row or percentage to occupy with respect to current window.
522
522
environment: dict, optional
523
523
Environmental variables for new pane. tmux 3.0+ only. Passthrough to ``-e``.
524
+
525
+ Examples
526
+ --------
527
+ >>> pane
528
+ Pane(%1 Window(@1 1:..., Session($1 ...)))
529
+
530
+ >>> new_pane = pane.split()
531
+
532
+ >>> new_pane
533
+ Pane(%2 Window(@1 1:..., Session($1 ...)))
534
+
535
+ >>> new_pane.pane_at_right
536
+ '1'
537
+
538
+ >>> new_pane.pane_at_left
539
+ '1'
540
+
541
+ >>> new_pane.pane_at_top
542
+ '0'
543
+
544
+ >>> new_pane.pane_at_bottom
545
+ '1'
546
+
547
+ >>> right_pane = pane.split(direction=PaneDirection.Right)
548
+
549
+ >>> right_pane
550
+ Pane(%3 Window(@1 1:..., Session($1 ...)))
551
+
552
+ >>> right_pane.pane_at_right
553
+ '1'
554
+
555
+ >>> right_pane.pane_at_left
556
+ '0'
557
+
558
+ >>> right_pane.pane_at_top
559
+ '1'
560
+
561
+ >>> right_pane.pane_at_bottom
562
+ '0'
563
+
564
+ >>> left_pane = pane.split(direction=PaneDirection.Left)
565
+
566
+ >>> left_pane
567
+ Pane(%4 Window(@1 1:..., Session($1 ...)))
568
+
569
+ >>> left_pane.pane_at_right
570
+ '0'
571
+
572
+ >>> left_pane.pane_at_left
573
+ '1'
574
+
575
+ >>> left_pane.pane_at_top
576
+ '1'
577
+
578
+ >>> left_pane.pane_at_bottom
579
+ '0'
524
580
"""
525
581
tmux_formats = ["#{pane_id}" + FORMAT_SEPARATOR ]
526
582
0 commit comments