mirror of
https://github.com/kovidgoyal/kitty.git
synced 2024-11-11 09:52:13 +03:00
Move the alt+left/right binding into zsh integration
It works OOTB in bash and fish already.
This commit is contained in:
parent
e3f6f47f10
commit
e4ee2cf995
@ -69,7 +69,7 @@ Detailed list of changes
|
||||
|
||||
- Remote control: When matching windows allow using negative id numbers to match recently created windows (:iss:`5753`)
|
||||
|
||||
- macOS: Bind :kbd:`option+left` and :kbd:`option+right` to :kbd:`alt+b` and :kbd:`alt+f`. This mimics the default bindings in Terminal.app (:iss:`5793`)
|
||||
- ZSH Integration: Bind :kbd:`alt+left` and :kbd:`alt+right` to move by word if not already bound. This mimics the default bindings in Terminal.app (:iss:`5793`)
|
||||
|
||||
0.26.5 [2022-11-07]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
@ -4002,13 +4002,5 @@ map('Open kitty Website',
|
||||
f'open_kitty_website shift+cmd+/ open_url {website_url()}',
|
||||
only='macos',
|
||||
)
|
||||
map('Move right one word',
|
||||
'move_right_one_word alt+right send_text normal,application \\x1bf',
|
||||
only='macos'
|
||||
)
|
||||
map('Move left one word',
|
||||
'move_left_one_word alt+left send_text normal,application \\x1bb',
|
||||
only='macos'
|
||||
)
|
||||
egr() # }}}
|
||||
egr() # }}}
|
||||
|
2
kitty/options/types.py
generated
2
kitty/options/types.py
generated
@ -937,8 +937,6 @@ if is_macos:
|
||||
defaults.map.append(KeyDefinition(trigger=SingleKey(mods=12, key=44), definition='load_config_file')) # noqa
|
||||
defaults.map.append(KeyDefinition(trigger=SingleKey(mods=10, key=44), definition='debug_config')) # noqa
|
||||
defaults.map.append(KeyDefinition(trigger=SingleKey(mods=9, key=47), definition='open_url https://sw.kovidgoyal.net/kitty/')) # noqa
|
||||
defaults.map.append(KeyDefinition(trigger=SingleKey(mods=2, key=57351), definition='send_text normal,application \\x1bf')) # noqa
|
||||
defaults.map.append(KeyDefinition(trigger=SingleKey(mods=2, key=57350), definition='send_text normal,application \\x1bb')) # noqa
|
||||
defaults.mouse_map = [
|
||||
# click_url_or_select
|
||||
MouseMapping(repeat_count=-2, definition='mouse_handle_click selection link prompt'), # noqa
|
||||
|
@ -388,6 +388,11 @@ _ksi_deferred_init() {
|
||||
|
||||
alias edit-in-kitty="kitty-tool edit-in-kitty"
|
||||
|
||||
# Map alt+left/right to move by word if not already mapped. This is expected behavior on macOS and I am tired
|
||||
# of answering questions about it.
|
||||
[[ $(builtin bindkey "^[1;3C") == *" undefined-key" ]] && builtin bindkey "^[1;3C" "forward-word"
|
||||
[[ $(builtin bindkey "^[1;3D") == *" undefined-key" ]] && builtin bindkey "^[1;3D" "backward-word"
|
||||
|
||||
# Unfunction _ksi_deferred_init to save memory. Don't unfunction
|
||||
# kitty-integration though because decent public functions aren't supposed to
|
||||
# to unfunction themselves when invoked. Unfunctioning is done by calling code.
|
||||
|
Loading…
Reference in New Issue
Block a user