Skip to content

Commit

Permalink
remove c-t incorrect key bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Aug 25, 2024
1 parent 7703136 commit 9b10ba3
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions pyvim/key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,18 +360,6 @@ def _delete_before_cursor(event: E) -> None:
event.app.clipboard.set_text(text)
editor.finish_edit_command()

@kb.add(">", ">", filter=vi_navigation_mode)
@kb.add("c-t", filter=vi_insert_mode)
def _indent(event: E) -> None:
"""
Indent lines.
"""
from prompt_toolkit.buffer import indent
buffer = event.current_buffer
current_row = buffer.document.cursor_position_row
indent(buffer, current_row, current_row + event.arg)

@kb.add("<", "<", filter=vi_navigation_mode)
@kb.add('c-d', filter=in_insert_mode)
def _unindent(event):
buffer = event.current_buffer
Expand Down Expand Up @@ -488,26 +476,6 @@ def _(event):
"""
pass

@kb.add('c-t', filter=in_insert_mode)
def indent_line(event):
"""
Indent current line.
"""
b = event.app.current_buffer

# Move to start of line.
pos = b.document.get_start_of_line_position(after_whitespace=True)
b.cursor_position += pos

# Insert tab.
if b.expand_tab:
b.insert_text(' ' * b.shiftwidth)
else:
b.insert_text('\t')

# Restore cursor.
b.cursor_position -= pos

@kb.add('c-r', filter=in_navigation_mode, save_before=(lambda e: False))
def redo(event):
"""
Expand Down

0 comments on commit 9b10ba3

Please sign in to comment.