Skip to content

Instantly share code, notes, and snippets.

@pgdad
pgdad / emacs-config-cfn
Created September 10, 2021 19:23
emacs edit indirect use for cfn lambda
(defvar-local lainedev-edit-indirect-leading-spaces 0)
(defun lainedev--leading-spaces ()
(interactive)
(let* ((current-line (thing-at-point 'line 't))
(line-length (length current-line))
(trimmed-line (replace-regexp-in-string "^ +" "" current-line))
(trimmed-line-length (length trimmed-line)))
(- line-length trimmed-line-length)))