• Stars
    star
    111
  • Rank 314,591 (Top 7 %)
  • Language
    Emacs Lisp
  • License
    GNU General Publi...
  • Created almost 9 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Syntax based indentation for SQL files inside GNU Emacs

Syntax based indentation for SQL files for GNU Emacs

CI

sql-indent.el is a GNU Emacs minor mode which adds support for syntax-based indentation when editing SQL code: TAB indents the current line based on the syntax of the SQL code on previous lines. This works like the indentation for C and C++ code.

The package also defines align rules so that the align function works for SQL statements, see sqlind-align-rules for which rules are defined. This can be used to align multiple lines around equal signs or "as" statements, like this.

sqlind-minor-mode together with the align rules can assist in writing tidy SQL code or formatting existing SQL code. The indentation rules are customizable and they can be adapted to match your coding style.

See the manual for more details.

Installation

You can install a released version of this package from GNU ELPA, by running the following commands in Emacs:

M-x package-install RET sql-indent RET

To install sql-indent from this repository, open the file sql-indent.el in Emacs and type:

M-x package-install-from-buffer RET

The syntax-based indentation of SQL code can be turned ON/OFF at any time by enabling or disabling sqlind-minor-mode:

M-x sqlind-minor-mode RET

To enable syntax-based indentation for every SQL buffer, you can add sqlind-minor-mode to sql-mode-hook. First, bring up the customization buffer using the command:

M-x customize-variable RET sql-mode-hook RET

Than, click on the "INS" button to add a new entry and put "sqlind-minor-mode" in the text field.

More Repositories

1

ActivityLog2

Analyze data from swim, bike and run activities
Racket
316
star
2

map-widget

A Racket GUI Widget to display maps based on OpenStreetMap tiles
Racket
38
star
3

TrainerControl

Telemetry and control server for an ANT+ FE-C bike trainer
C++
38
star
4

data-frame

A data frame implementation for Racket
Racket
37
star
5

AL2-IRisk-Dashboard

IRisk Dashboard for ActivityLog2 -- this has been added to ActivityLog2
Racket
11
star
6

emacs-soap-client

Access SOAP web services from GNU Emacs. This package is maintained as part of the GNU Emacs source repository
Emacs Lisp
10
star
7

PiFitSync

Sync FIT files from Garmin watch to a Raspberry PI
C++
7
star
8

gui-widget-mixins

Tool tips, cue text and validation for text-field% GUI widgets in Racket
Racket
7
star
9

AL2-Climb-Analysis

Tool to analyze climbs on a bike route loaded from a GPX file -- this application is now part of ActivityLog2
Racket
7
star
10

plot-container

Embed plots in Racket GUI applications
Racket
6
star
11

Arduino_Inclinometer

Inclinometer using Arduino Nano and OLED display
C++
5
star
12

geoid

work efficiently with geographic data
Racket
5
star
13

Arduino_433Mhz

Arduino 433Mhz Receiver β€” Reading Keyfobs
C++
4
star
14

tzgeolookup

Racket pakcage to find the timezone for a location based on GPS coordinates
Racket
3
star
15

qresults-list

enhanced list-box% control for Racket
Racket
2
star
16

al2-test-runner

alternate rackunit test runner
Racket
2
star
17

colormaps

Additional colormaps for the Racket Plot package
Racket
2
star
18

alex-hhh.github.io

HTML
1
star
19

time-zone-lookup-tests

Racket
1
star
20

vc-clearcase

Emacs VC (version control) backend for ClearCase
Emacs Lisp
1
star