Skip to content

Instantly share code, notes, and snippets.

View royseto's full-sized avatar

Roy Seto royseto

View GitHub Profile
@royseto
royseto / indent_sql.el
Last active February 3, 2019 22:23 — forked from stuntgoat/indent_sql.el
An indentation heuristic for Emacs' sql-mode
(defun get-previous-indentation ()
"Get the column of the previous indented line"
(interactive)
(save-excursion
(progn
(move-beginning-of-line nil)
(skip-chars-backward "\n \t")
(back-to-indentation))
(current-column)))