Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions sqlit/core/keymap.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def get_action_keys(self) -> list[ActionKeyDef]:
def _build_leader_commands(self) -> list[LeaderCommandDef]:
return [
# View
LeaderCommandDef("e", "toggle_explorer", "Toggle Explorer", "View"),
LeaderCommandDef("E", "toggle_explorer", "Toggle Explorer", "View"),
LeaderCommandDef("f", "toggle_fullscreen", "Toggle Maximize", "View"),
# Connection
LeaderCommandDef("c", "show_connection_picker", "Connect", "Connection"),
Expand Down Expand Up @@ -370,8 +370,9 @@ def _build_action_keys(self) -> list[ActionKeyDef]:
ActionKeyDef("escape", "exit_insert_mode", "query_insert"),
ActionKeyDef("ctrl+enter", "execute_query_insert", "query_insert"),
ActionKeyDef("tab", "autocomplete_accept", "query_insert"),
ActionKeyDef("e", "cursor_word_end", "query_normal"),
# Navigation
ActionKeyDef("e", "focus_explorer", "navigation"),
ActionKeyDef("E", "focus_explorer", "navigation"),
ActionKeyDef("q", "focus_query", "navigation"),
ActionKeyDef("r", "focus_results", "navigation"),
# Query (autocomplete)
Expand Down
1 change: 1 addition & 0 deletions sqlit/domains/query/state/query_normal.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def _setup_actions(self) -> None:
self.allows("cursor_down", help="Move cursor down")
self.allows("cursor_word_forward", help="Move to next word")
self.allows("cursor_WORD_forward", help="Move to next WORD")
self.allows("cursor_word_end", help="Move to word end")
self.allows("cursor_word_back", help="Move to previous word")
self.allows("cursor_WORD_back", help="Move to previous WORD")
self.allows("cursor_line_start", help="Move to line start")
Expand Down
4 changes: 4 additions & 0 deletions sqlit/domains/query/ui/mixins/query_editing_cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ def action_cursor_WORD_forward(self: QueryMixinHost) -> None:
"""Move cursor to next WORD (W)."""
self._move_with_motion("W")

def action_cursor_word_end(self: QueryMixinHost) -> None:
"""Move cursor to end of word (e)."""
self._move_with_motion("e")

def action_cursor_word_back(self: QueryMixinHost) -> None:
"""Move cursor to previous word (b)."""
self._move_with_motion("b")
Expand Down
3 changes: 2 additions & 1 deletion sqlit/domains/shell/state/machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def binding(key: str, desc: str, indent: int = 4) -> str:
# NAVIGATION
# ═══════════════════════════════════════════════════════════════════
lines.append(section("NAVIGATION"))
lines.append(binding("e", "Focus Explorer pane"))
lines.append(binding("E", "Focus Explorer pane"))
lines.append(binding("q", "Focus Query pane"))
lines.append(binding("r", "Focus Results pane"))
lines.append(binding(leader_key, "Open command menu"))
Expand Down Expand Up @@ -223,6 +223,7 @@ def binding(key: str, desc: str, indent: int = 4) -> str:
lines.append(subsection("Vim Motions:"))
lines.append(binding("h/j/k/l", "Cursor left/down/up/right"))
lines.append(binding("w/W", "Word forward"))
lines.append(binding("e", "Word end"))
lines.append(binding("b/B", "Word backward"))
lines.append(binding("0/$", "Line start/end"))
lines.append(binding("gg/G", "File start/end"))
Expand Down