Skip to content

Commit 0975972

Browse files
committed
Remove e/E cursor motions; keep operator usage
1 parent aafd432 commit 0975972

File tree

6 files changed

+1
-36
lines changed

6 files changed

+1
-36
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ Use with operators like `y`, `d`, `c` (e.g. `dw`, `y$`).
205205
| `h` / `j` / `k` / `l` | Move cursor left / down / up / right |
206206
| `w` / `W` | Next word / WORD |
207207
| `b` / `B` | Previous word / WORD |
208-
| `e` / `E` | End of word / WORD |
209208
| `0` / `$` | Line start / end |
210209
| `gg` / `G` | File start / end |
211210
| `f{c}` / `F{c}` | Find char forward / backward |

sqlit/core/keymap.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,6 @@ def _build_action_keys(self) -> list[ActionKeyDef]:
350350
ActionKeyDef("W", "cursor_WORD_forward", "query_normal"),
351351
ActionKeyDef("b", "cursor_word_back", "query_normal"),
352352
ActionKeyDef("B", "cursor_WORD_back", "query_normal"),
353-
ActionKeyDef("e", "cursor_word_end", "query_normal"),
354-
ActionKeyDef("E", "cursor_WORD_end", "query_normal"),
355353
ActionKeyDef("0", "cursor_line_start", "query_normal"),
356354
ActionKeyDef("dollar_sign", "cursor_line_end", "query_normal"),
357355
ActionKeyDef("G", "cursor_last_line", "query_normal"),

sqlit/domains/query/state/query_normal.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ def _setup_actions(self) -> None:
3030
self.allows("cursor_WORD_forward", help="Move to next WORD")
3131
self.allows("cursor_word_back", help="Move to previous word")
3232
self.allows("cursor_WORD_back", help="Move to previous WORD")
33-
self.allows("cursor_word_end", help="Move to end of word")
34-
self.allows("cursor_WORD_end", help="Move to end of WORD")
3533
self.allows("cursor_line_start", help="Move to line start")
3634
self.allows("cursor_line_end", help="Move to line end")
3735
self.allows("cursor_last_line", help="Move to last line")

sqlit/domains/query/ui/mixins/query_editing_cursor.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def action_g_WORD_end_back(self: QueryMixinHost) -> None:
4040
self._clear_leader_pending()
4141
self._move_with_motion("gE")
4242

43+
4344
def action_cursor_left(self: QueryMixinHost) -> None:
4445
"""Move cursor left (h in normal mode)."""
4546
row, col = self.query_input.cursor_location
@@ -84,13 +85,6 @@ def action_cursor_WORD_back(self: QueryMixinHost) -> None:
8485
"""Move cursor to previous WORD (B)."""
8586
self._move_with_motion("B")
8687

87-
def action_cursor_word_end(self: QueryMixinHost) -> None:
88-
"""Move cursor to end of word (e)."""
89-
self._move_with_motion("e")
90-
91-
def action_cursor_WORD_end(self: QueryMixinHost) -> None:
92-
"""Move cursor to end of WORD (E)."""
93-
self._move_with_motion("E")
9488

9589
def action_cursor_line_start(self: QueryMixinHost) -> None:
9690
"""Move cursor to start of line (0)."""

sqlit/domains/shell/state/machine.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,6 @@ def binding(key: str, desc: str, indent: int = 4) -> str:
212212
lines.append(binding("h/j/k/l", "Cursor left/down/up/right"))
213213
lines.append(binding("w/W", "Word forward"))
214214
lines.append(binding("b/B", "Word backward"))
215-
lines.append(binding("e/E", "End of word"))
216215
lines.append(binding("0/$", "Line start/end"))
217216
lines.append(binding("gg/G", "File start/end"))
218217
lines.append(binding("f{c}/F{c}", "Find char forward/back"))

tests/ui/keybindings/test_vim_motions.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,29 +49,6 @@ async def test_word_motions_w_W_b_B(self) -> None:
4949
await pilot.pause()
5050
assert app.query_input.cursor_location == (0, 0)
5151

52-
@pytest.mark.asyncio
53-
async def test_word_end_motions_e_E(self) -> None:
54-
app = _make_app()
55-
56-
async with app.run_test(size=(100, 35)) as pilot:
57-
app.action_focus_query()
58-
await pilot.pause()
59-
60-
app.query_input.text = "foo-bar baz"
61-
app.query_input.cursor_location = (0, 0)
62-
await pilot.pause()
63-
64-
await pilot.press("e")
65-
await pilot.pause()
66-
assert app.query_input.cursor_location == (0, 2)
67-
68-
app.query_input.cursor_location = (0, 0)
69-
await pilot.pause()
70-
71-
await pilot.press("E")
72-
await pilot.pause()
73-
assert app.query_input.cursor_location == (0, 6)
74-
7552
@pytest.mark.asyncio
7653
async def test_line_motions_0_dollar_G(self) -> None:
7754
app = _make_app()

0 commit comments

Comments
 (0)