👉 Support this work via GitHub Sponsors
An experimental package to extend Emacs 29’s sqlite-mode.
I’ve received enough requests to put this on MELPA from folks that have found the package stable and helpful.
Having said that, I want to be upfront that I haven’t tested the code thoroughly, so please use at own risk (please back up your database).
Install from MELPA and enable default bindings via sqlite-extras-minor-mode
.
(use-package sqlite-mode-extras
:ensure t
:hook ((sqlite-mode . sqlite-extras-minor-mode)))
sqlite-mode-extras-tab-dwim
: Tab navigation.
sqlite-mode-extras-ret-dwim
: Edit field.
sqlite-mode-extras-compose-and-execute
: Compose and execute a query.
sqlite-mode-extras-execute
: Execute a query.
sqlite-mode-extras-add-row
: Add row to table at point.
sqlite-mode-extras-delete-row-dwim
: Similar tosqlite-mode-delete
but also enables deleting range in region.
sqlite-mode-extras-refresh
: Refreshes the buffer re-querying the database.sqlite-mode-extras-ret-dwim
: If on table, toggle expansion. If on row, edit it.sqlite-mode-extras-execute-and-display-select-query
: Executes a query and displays results.
Custom variable | Description |
---|---|
sqlite-mode-extras-auto-complete-enabled | Enable value lookup on database column. |
Binding | Command | Description |
---|---|---|
g | sqlite-mode-extras-refresh | Refresh all listings and table queries. |
E | sqlite-mode-extras-execute | Execute a query. |
C | sqlite-mode-extras-compose-and-execute | Compose and execute a query. |
S | sqlite-mode-extras-execute-and-display-select-query | Execute a SELECT QUERY. |
sqlite-mode-extras-edit-row-field | Edit current row’s field. | |
sqlite-mode-extras-next-column | Navigate to next column. | |
sqlite-mode-extras-mode | ||
+ | sqlite-mode-extras-add-row | Add a row to current table. |
DEL or D | sqlite-mode-extras-delete-row-dwim | Delete current row or rows in region. |
<backtab> or b | sqlite-mode-extras-backtab-dwim | Like `sqlite-mode-extras-tab-dwim’ but backwards. |
RET | sqlite-mode-extras-ret-dwim | DWIM binding for RET. |
<tab> or f | sqlite-mode-extras-tab-dwim | DWIM binding for TAB. |
👉 Find this useful? Support this work via GitHub Sponsors