mrjones2014 / smart-splits.nvim

🧠 Smart, seamless, directional navigation and resizing of Neovim + terminal multiplexer splits. Supports tmux, Wezterm, and Kitty. Think about splits in terms of "up/down/left/right".
MIT License
895 stars 37 forks source link

[Feature]: kitty pass_keys.py remove the use of regulars and instead use the kitty api #147

Closed ghost closed 4 months ago

ghost commented 7 months ago

Similar Issues

Description

map ctrl+j kitten pass_keys.py neighboring_window bottom ctrl+j "^.* - nvim$"
map ctrl+k kitten pass_keys.py neighboring_window top    ctrl+k "^.* - nvim$"
map ctrl+h kitten pass_keys.py neighboring_window left   ctrl+h "^.* - nvim$"
map ctrl+l kitten pass_keys.py neighboring_window right  ctrl+l "^.* - nvim$"

unable to resolve nvim recognition in python virtual environment

pass_keys.py

if window is None:
        return

cmd = window.child.foreground_cmdline[0]

# keyboard_mode_name(window.screen) == "kitty"  You can get kitty.
# result: zsh, tmux, nvim
if cmd[-4:] == "nvim":
    for keymap in key_mapping.split(">"):
        encoded = encode_key_mapping(window, keymap)
        window.write_to_child(encoded)
elif action == "neighboring_window":
    boss.active_tab.neighboring_window(direction)
elif action == "relative_resize":
    relative_resize_window(direction, amount, target_window_id, boss)

ability to visually recognize the current environment

mrjones2014 commented 4 months ago

Fixed by #175