tabs don't belong in Lisp

ご主人様
not manx 4 years ago
parent 4accec9268
commit da4a856b80
Signed by: C-xC-c
GPG Key ID: F52ED472284EF2F4

@ -61,11 +61,12 @@
(use-package htmlize)
(use-package spaceline
:custom (powerline-default-seperator (quote arrow))
:init
(require 'spaceline-config)
(spaceline-spacemacs-theme)
:config (spaceline-toggle-buffer-size-off))
:config
(spaceline-toggle-buffer-size-off)
(setq powerline-default-seperator (quote arrow)))
(use-package dashboard
:diminish (dashboard-mode page-break-lines-mode)
@ -145,6 +146,9 @@
(add-to-list 'org-structure-template-alist '("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC"))
(setq org-src-tab-acts-natively t
org-edit-src-content-indentation 0)
(setq org-html-doctype "html5")
(definteractive manx/save-org-to-html()
@ -156,7 +160,7 @@
(local-keybind "C-c s h" manx/save-org-to-html))
(definteractive manx/delete-org-link ()
(if (org-in-regexp org-bracket-link-regexp 1)
(when (org-in-regexp org-bracket-link-regexp 1)
(apply 'delete-region (list (match-beginning 0) (match-end 0)))))
(add-hook 'org-mode-hook (local-keybind "C-c o l" manx/delete-org-link))
@ -209,9 +213,10 @@
(global-set-key (kbd "C-x 2") (lambdainteractive () (manx/split-and-follow (split-window-horizontally))))
(defun unix-line-ends ()
(let ((coding-str (symbol-name buffer-file-coding-system)))
(when (string-match "-\\(?:dos\\|mac\\)$" coding-str)
(set-buffer-file-coding-system 'unix))))
(when (string-match
"-\\(?:dos\\|mac\\)$"
(symbol-name buffer-file-coding-system))
(set-buffer-file-coding-system 'unix)))
(add-hook 'find-file-hooks 'unix-line-ends)
@ -246,6 +251,9 @@
(setq-default tab-width 2
indent-tabs-mode t)
(add-hook 'lisp-mode-hook (lambda () (setq indent-tabs-mode nil)))
(add-hook 'emacs-lisp-mode-hook (lambda () (setq indent-tabs-mode nil)))
(defvaralias 'css-indent-offset 'tab-width)
(defvaralias 'js-indent-level 'tab-width)

@ -24,7 +24,7 @@ functions
** use-package config
Always ensure packages are installed. Log to ~*Messages*~.
#+BEGIN_SRC emacs-lisp
(setq use-package-always-ensure t
(setq use-package-always-ensure t
use-package-verbose t)
#+END_SRC
** diminish
@ -96,11 +96,12 @@ sbcl is in a werid place on Gentoo.
** spaceline
#+BEGIN_SRC emacs-lisp
(use-package spaceline
:custom (powerline-default-seperator (quote arrow))
:init
(require 'spaceline-config)
(spaceline-spacemacs-theme)
:config (spaceline-toggle-buffer-size-off))
:config
(spaceline-toggle-buffer-size-off)
(setq powerline-default-seperator (quote arrow)))
#+END_SRC
** dashboard
#+BEGIN_SRC emacs-lisp
@ -195,15 +196,18 @@ Also saves config if open.
#+END_SRC
** misc
#+BEGIN_SRC emacs-lisp
(setq org-src-window-setup 'current-window)
(setq org-src-window-setup 'current-window)
;; I read somewhere that Company breaks things?
(add-hook 'org-mode-hook 'company-mode)
;; I read somewhere that Company breaks things?
(add-hook 'org-mode-hook 'company-mode)
;; Don't indent whole file with org-mode
(eval-after-load "org-mode" (local-set-key (kbd "s-i") nil))
;; Don't indent whole file with org-mode
(eval-after-load "org-mode" (local-set-key (kbd "s-i") nil))
(add-to-list 'org-structure-template-alist '("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC"))
(add-to-list 'org-structure-template-alist '("el" "#+BEGIN_SRC emacs-lisp\n?\n#+END_SRC"))
(setq org-src-tab-acts-natively t
org-edit-src-content-indentation 0)
#+END_SRC
** html export
#+BEGIN_SRC emacs-lisp
@ -220,7 +224,7 @@ Also saves config if open.
** Links
#+BEGIN_SRC emacs-lisp
(definteractive manx/delete-org-link ()
(if (org-in-regexp org-bracket-link-regexp 1)
(when (org-in-regexp org-bracket-link-regexp 1)
(apply 'delete-region (list (match-beginning 0) (match-end 0)))))
(add-hook 'org-mode-hook (local-keybind "C-c o l" manx/delete-org-link))
@ -288,9 +292,10 @@ Also saves config if open.
** unix line endings
#+BEGIN_SRC emacs-lisp
(defun unix-line-ends ()
(let ((coding-str (symbol-name buffer-file-coding-system)))
(when (string-match "-\\(?:dos\\|mac\\)$" coding-str)
(set-buffer-file-coding-system 'unix))))
(when (string-match
"-\\(?:dos\\|mac\\)$"
(symbol-name buffer-file-coding-system))
(set-buffer-file-coding-system 'unix)))
(add-hook 'find-file-hooks 'unix-line-ends)
#+END_SRC
@ -330,12 +335,15 @@ parens.
(global-unset-key (kbd "C-z")) ;; Fuck unix
#+END_SRC
** indentation
tabs > spaces.
tabs > spaces. Except in Lisp.
#+BEGIN_SRC emacs-lisp
(setq-default tab-width 2
(setq-default tab-width 2
indent-tabs-mode t)
(defvaralias 'css-indent-offset 'tab-width)
(defvaralias 'js-indent-level 'tab-width)
(add-hook 'lisp-mode-hook (lambda () (setq indent-tabs-mode nil)))
(add-hook 'emacs-lisp-mode-hook (lambda () (setq indent-tabs-mode nil)))
(defvaralias 'css-indent-offset 'tab-width)
(defvaralias 'js-indent-level 'tab-width)
#+END_SRC
** Prettify symbols
#+BEGIN_SRC emacs-lisp

Loading…
Cancel
Save