Skip to content

Instantly share code, notes, and snippets.

@gilbertw1
Created July 14, 2017 16:31
Show Gist options
  • Save gilbertw1/05a45632bfc555955740ddfb6af7c61b to your computer and use it in GitHub Desktop.
Save gilbertw1/05a45632bfc555955740ddfb6af7c61b to your computer and use it in GitHub Desktop.
(defun toggle-tabs-local ()
(interactive)
(if indent-tabs-mode
(setq-local indent-tabs-mode nil)
(setq-local indent-tabs-mode t)))
(defun set-indentation-local ()
(interactive)
(let ((indent (string-to-number (read-string "Indentation: "))))
(setq-local tab-width indent)
(setq-local c-basic-offset indent)
(setq-local coffee-tab-width indent)
(setq-local javascript-indent-level indent)
(setq-local js-indent-level indent)
(setq-local js2-basic-offset indent)
(setq-local web-mode-markup-indent-offset indent)
(setq-local web-mode-css-indent-offset indent)
(setq-local web-mode-code-indent-offset indent)
(setq-local css-indent-offset indent)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment