Skip to content

xenodium/sqlite-mode-extras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

👉 Support this work via GitHub Sponsors

sqlite-mode-extras

An experimental package to extend Emacs 29’s sqlite-mode.

⚠️ Experimental package ⚠️

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).

Recommended bindings and installation

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)))

What kind of extras?

  • sqlite-mode-extras-tab-dwim: Tab navigation.

images/sqlite-forward.gif

images/sqlite-previous.gif

  • sqlite-mode-extras-ret-dwim: Edit field.

images/sqlite-edits.gif

  • sqlite-mode-extras-compose-and-execute: Compose and execute a query.

images/compose-execute.gif

  • sqlite-mode-extras-execute: Execute a query.

images/execute.gif

  • sqlite-mode-extras-add-row: Add row to table at point.

images/add-row.gif

  • sqlite-mode-extras-delete-row-dwim: Similar to sqlite-mode-delete but also enables deleting range in region.

images/delete-rows.gif

  • 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.

images/select-earth.gif

Customizations

Custom variableDescription
sqlite-mode-extras-auto-complete-enabledEnable value lookup on database column.

Commands

BindingCommandDescription
gsqlite-mode-extras-refreshRefresh all listings and table queries.
Esqlite-mode-extras-executeExecute a query.
Csqlite-mode-extras-compose-and-executeCompose and execute a query.
Ssqlite-mode-extras-execute-and-display-select-queryExecute a SELECT QUERY.
sqlite-mode-extras-edit-row-fieldEdit current row’s field.
sqlite-mode-extras-next-columnNavigate to next column.
sqlite-mode-extras-mode
+sqlite-mode-extras-add-rowAdd a row to current table.
DEL or Dsqlite-mode-extras-delete-row-dwimDelete current row or rows in region.
<backtab> or bsqlite-mode-extras-backtab-dwimLike `sqlite-mode-extras-tab-dwim’ but backwards.
RETsqlite-mode-extras-ret-dwimDWIM binding for RET.
<tab> or fsqlite-mode-extras-tab-dwimDWIM binding for TAB.

👉 Find this useful? Support this work via GitHub Sponsors

About

Emacs sqlite-mode extras

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published