Skip to content

Commit

Permalink
Add tab clone command and improve file organization
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-clarke committed Sep 25, 2024
1 parent d426076 commit c52bc2b
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions apps/vscode/vscode.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ def split_window_vertically():
def split_window():
actions.user.vscode("workbench.action.splitEditor")

def split_number(index: int):
"""Navigates to a the specified split"""
if index < 9:
if is_mac:
actions.key(f"cmd-{index}")
else:
actions.key(f"ctrl-{index}")

# splits.py support end

# multiple_cursor.py support begin
Expand Down Expand Up @@ -254,6 +262,9 @@ def multi_cursor_select_more_occurrences():
def multi_cursor_skip_occurrence():
actions.user.vscode("editor.action.moveSelectionToNextFindMatch")

# multiple_cursor.py support end

# tabs.py support begin
def tab_jump(number: int):
if number < 10:
if is_mac:
Expand All @@ -273,16 +284,12 @@ def tab_final():
else:
actions.key("alt-0")

# splits.py support begin
def split_number(index: int):
"""Navigates to a the specified split"""
if index < 9:
if is_mac:
actions.key(f"cmd-{index}")
else:
actions.key(f"ctrl-{index}")

# splits.py support end
def tab_duplicate():
# Duplicates the current tab into a new tab group
# vscode does not allow duplicate tabs in the same tab group, and so is implemented through splits
actions.user.split_window_vertically()

# tabs.py support end

# find_and_replace.py support begin

Expand Down

0 comments on commit c52bc2b

Please sign in to comment.