

GitHub - alex-hhh/emacs-sql-indent: Syntax based indentation for SQL files insid...
source link: https://github.com/alex-hhh/emacs-sql-indent
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md
Syntax based indentation for SQL files for GNU Emacs
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.
Recommend
-
47
smarttabs - Emacs smart tabs - indent with tabs, align with spaces!
-
74
Fibonacci Indentation for Vim. Contribute to dodie/vim-fibo-indent development by creating an account on GitHub.
-
57
README.md About This is the official PHP indentation plug-in for VIm (version 1.39 is bundled with VIm 7.4). Please, visit
-
141
README.md Indent Blankline This plugin adds indentation guides to empty lines. It is recommended, but not required, to use it together with
-
7
vim-svelte Vim syntax highlighting and indentation for Svelte 3 components. This is mostly just HTML syntax highlighting with some keywords added and all expressions inside of { a...
-
9
About org-bars-mode is a minor mode for org-mode. It adds bars to the virtual indentation provided by the built-in package org-indent. Install Be sure to read the
-
11
yank-indent Emacs minor-mode that ensures pasted (yanked) text has the correct indentation level. Do you often find yourself fixing the indentation of a code snippet right after pasting it...
-
5
Reddit - https://preview.redd.it/emacs-python-mode-weird-indentation-v0-u4hwbcg0lesb1.png?width=2880&format=png&auto=webp&s=0e96d3e8868d9b3a39e141e891f7c9bf813fd385 ...
-
9
Reddit - https://preview.redd.it/emacs-python-mode-weird-indentation-v0-o0hh9a6qkesb1.png?width=2880&format=png&auto=webp&s=c6bd0d6fb3616e343ec30a951d28e24d04250801 ...
-
10
Reddit - https://preview.redd.it/emacs-python-mode-weird-indentation-v0-7qjnl97okesb1.png?width=2880&format=png&auto=webp&s=d2b4bd308089d120aebe3d7871d64baf7459ae82 ...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK