spacemacs/layers/!lang/sql
syl20bnr 6b33031dc5 core: dotspacemacs-distribution, spacemacs-core layer and rename contrib
- Rename contrib directory to layers
- Add new variable dotspacemacs-distribution
- Move spacemacs layer to layers/!distribution
- New layer spacemacs-core in layers/!distribution
- User can now set dotspacemacs-distribution to spacemacs or
  spacemacs-core (default spacemacs)

spacemacs-core is very lightweight layer sufficient to build upon
spacemacs.
2015-09-07 23:44:43 -04:00
..
img core: dotspacemacs-distribution, spacemacs-core layer and rename contrib 2015-09-07 23:44:43 -04:00
extensions.el core: dotspacemacs-distribution, spacemacs-core layer and rename contrib 2015-09-07 23:44:43 -04:00
packages.el core: dotspacemacs-distribution, spacemacs-core layer and rename contrib 2015-09-07 23:44:43 -04:00
README.org core: dotspacemacs-distribution, spacemacs-core layer and rename contrib 2015-09-07 23:44:43 -04:00

SQL contribution layer for Spacemacs

/TakeV/spacemacs/media/commit/8bcd42b33e557718fc69489840d6966d81d008e1/layers/!lang/sql/img/sql.png

Description

This layer adds key bindings and configuration for sql-mode, which manages interactive SQL buffers and highlights a wide range of SQL dialects.

Install

To use this contribution layer add it to your ~/.spacemacs

  (set-default dotspacemacs-configuration-layers '(sql))

Key bindings

Highlighting

Key Binding Description
SPC m h k select a SQL dialect to highlight

Inferior Process Interactions (SQLi)

Key Binding Description
SPC m b b show the SQLi buffer name
SPC m b s set the SQLi buffer
SPC m l a List all objects
SPC m l t list all objects in a table

Send SQL queries to SQLi:

Key Binding Description
SPC m s b Send the whole buffer to the SQLi buffer
SPC m s B Send the whole buffer to the SQLi buffer and switch to it in insert state
SPC m s i Start the SQLi process
SPC m s f Send the paragraph under the point to the SQLi buffer
SPC m s F Send the paragraph under the point to the SQLi buffer and switch to it in insert state
SPC m s q Prompt for a string to send to the SQLi buffer
SPC m s Q Prompt for a string to send to the SQLi buffer and switch to it in insert state
SPC m s r Send the selected region to the SQLi buffer
SPC m s R Send the selected region to the SQLi buffer and switch to it in insert state

SQLi buffer

Key Binding Description
SPC m b r rename buffer (follow up in the SQL buffer with SPC m b s)
SPC m b S save the current connection