From 9b38531f1d3ce984b58d5b1ed394b78792479f0d Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 25 Feb 2021 17:46:35 -0600 Subject: Use TABs and Smart-Tabs --- config.org | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/config.org b/config.org index 4fe6c25..f68f3e9 100644 --- a/config.org +++ b/config.org @@ -1466,13 +1466,24 @@ enabled). (add-hook 'before-save-hook #'whitespace-cleanup) #+end_src -*** Don't use TABs +*** USE TABs -I was team TAB for a while, but I find them easier to avoid in Emacs. -It manages my whitespace for me, anyway. +I love TABs. They're great. I want to use them, dag nab it. Emacs sometimes +makes that harder than it should be, but let's start at the basics. #+begin_src emacs-lisp :noweb-ref settings - (setq-default indent-tabs-mode nil) + (setq-default indent-tabs-mode t + tab-width 8) +#+end_src + +**** Smart tabs :package: + +#+begin_src emacs-lisp :noweb-ref packages + (straight-use-package 'smart-tabs-mode) +#+end_src + +#+begin_src emacs-lisp :noweb-ref modes + (smart-tabs-insinuate 'c 'c++ 'java 'javascript 'cperl 'python 'ruby 'nxml) #+end_src **** TODO smart-tabs-mode @@ -1887,7 +1898,16 @@ Since aggressive indenting takes care of tabs, I can use == to complete things! #+begin_src emacs-lisp :noweb-ref settings - (setq-default tab-always-indent 'complete) + (setq-default tab-always-indent nil) +#+end_src + +*** Reformatter :package: + +Steve Purcell's automatic reformatting tool. + +#+begin_src emacs-lisp :noweb-ref packages + (straight-use-package 'reformatter) + (require 'reformatter) #+end_src ** Typesetting -- cgit 1.4.1-21-gabe81