Convert tabs to spaces
This commit is contained in:
parent
dea204c572
commit
0dea0c81a8
114
.emacs.d/init.el
114
.emacs.d/init.el
@ -12,8 +12,8 @@
|
|||||||
read-file-name-completion-ignore-case t
|
read-file-name-completion-ignore-case t
|
||||||
inhibit-startup-screen t
|
inhibit-startup-screen t
|
||||||
vc-follow-symlinks t
|
vc-follow-symlinks t
|
||||||
custom-file (expand-file-name "~/.emacs.d/custom.el")
|
custom-file (expand-file-name "~/.emacs.d/custom.el")
|
||||||
gc-cons-threshold 100000000)
|
gc-cons-threshold 100000000)
|
||||||
(load-theme 'fred t)
|
(load-theme 'fred t)
|
||||||
(savehist-mode 1)
|
(savehist-mode 1)
|
||||||
(show-paren-mode 1)
|
(show-paren-mode 1)
|
||||||
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
;;;; save backups and autosaves in tmp
|
;;;; save backups and autosaves in tmp
|
||||||
(setq backup-directory-alist `((".*" . ,temporary-file-directory))
|
(setq backup-directory-alist `((".*" . ,temporary-file-directory))
|
||||||
auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
|
auto-save-file-name-transforms `((".*" ,temporary-file-directory t)))
|
||||||
|
|
||||||
;;;; keybinds
|
;;;; keybinds
|
||||||
(global-set-key (kbd "C-z") `recompile)
|
(global-set-key (kbd "C-z") `recompile)
|
||||||
@ -48,13 +48,13 @@
|
|||||||
:config
|
:config
|
||||||
(global-set-key (kbd "C-x C-b") `ibuffer)
|
(global-set-key (kbd "C-x C-b") `ibuffer)
|
||||||
(setq ibuffer-saved-filter-groups
|
(setq ibuffer-saved-filter-groups
|
||||||
(quote (("default"
|
(quote (("default"
|
||||||
("emacs" (or
|
("emacs" (or
|
||||||
(name . "^\\*scratch\\*$")
|
(name . "^\\*scratch\\*$")
|
||||||
(name . "^\\*Messages\\*$")))))))
|
(name . "^\\*Messages\\*$")))))))
|
||||||
(add-hook 'ibuffer-mode-hook (lambda ()
|
(add-hook 'ibuffer-mode-hook (lambda ()
|
||||||
(ibuffer-auto-mode 1)
|
(ibuffer-auto-mode 1)
|
||||||
(setq ibuffer-show-empty-filter-groups nil))))
|
(setq ibuffer-show-empty-filter-groups nil))))
|
||||||
|
|
||||||
(use-package compile
|
(use-package compile
|
||||||
:config
|
:config
|
||||||
@ -63,19 +63,19 @@
|
|||||||
:defer
|
:defer
|
||||||
:config
|
:config
|
||||||
(setq verilog-indent-level 4
|
(setq verilog-indent-level 4
|
||||||
verilog-indent-level-behavioral 4
|
verilog-indent-level-behavioral 4
|
||||||
verilog-indent-level-declaration 4
|
verilog-indent-level-declaration 4
|
||||||
verilog-indent-level-module 4
|
verilog-indent-level-module 4
|
||||||
verilog-auto-newline nil)
|
verilog-auto-newline nil)
|
||||||
(add-hook 'verilog-mode-hook (lambda () (setq indent-tabs-mode nil))))
|
(add-hook 'verilog-mode-hook (lambda () (setq indent-tabs-mode nil))))
|
||||||
;;;; external packages (required)
|
;;;; external packages (required)
|
||||||
(use-package company :quelpa
|
(use-package company :quelpa
|
||||||
:config
|
:config
|
||||||
(global-company-mode)
|
(global-company-mode)
|
||||||
(setq company-idle-delay 0.1
|
(setq company-idle-delay 0.1
|
||||||
company-dabbrev-downcase nil
|
company-dabbrev-downcase nil
|
||||||
company-dabbrev-ignore-case nil
|
company-dabbrev-ignore-case nil
|
||||||
company-clang-arguments (quote ("-I/usr/include" "-I/usr/arm-frc-linux-gnueabi/include/")))
|
company-clang-arguments (quote ("-I/usr/include" "-I/usr/arm-frc-linux-gnueabi/include/")))
|
||||||
(global-set-key (kbd "<C-tab>") 'company-manual-begin))
|
(global-set-key (kbd "<C-tab>") 'company-manual-begin))
|
||||||
(use-package smart-mode-line :quelpa
|
(use-package smart-mode-line :quelpa
|
||||||
:config
|
:config
|
||||||
@ -142,15 +142,15 @@
|
|||||||
(add-to-list 'company-backends 'company-jedi)
|
(add-to-list 'company-backends 'company-jedi)
|
||||||
(jedi-mode)))
|
(jedi-mode)))
|
||||||
(setq jedi:use-shortcuts t
|
(setq jedi:use-shortcuts t
|
||||||
jedi:get-in-function-call-delay 500
|
jedi:get-in-function-call-delay 500
|
||||||
jedi:tooltip-method nil)
|
jedi:tooltip-method nil)
|
||||||
:commands (jedi-mode))
|
:commands (jedi-mode))
|
||||||
(use-package gnuplot-mode
|
(use-package gnuplot-mode
|
||||||
:mode ("\\.gp$" . gnuplot-mode))
|
:mode ("\\.gp$" . gnuplot-mode))
|
||||||
(use-package markdown-mode
|
(use-package markdown-mode
|
||||||
:config
|
:config
|
||||||
(setq markdown-command "markdown_py -x markdown.extensions.wikilinks -x markdown.extensions.smarty -x markdown.extensions.extra -x latex -x markdown.extensions.sane_lists -x markdown.extensions.toc -x markdown_checklist.extension -c ~/.emacs.d/markdownConfig.yml"
|
(setq markdown-command "markdown_py -x markdown.extensions.wikilinks -x markdown.extensions.smarty -x markdown.extensions.extra -x latex -x markdown.extensions.sane_lists -x markdown.extensions.toc -x markdown_checklist.extension -c ~/.emacs.d/markdownConfig.yml"
|
||||||
markdown-enable-math t)
|
markdown-enable-math t)
|
||||||
(local-set-key (kbd "<tab>") 'markdown-demote)
|
(local-set-key (kbd "<tab>") 'markdown-demote)
|
||||||
(local-set-key (kbd "S-<tab>") 'markdown-promote)
|
(local-set-key (kbd "S-<tab>") 'markdown-promote)
|
||||||
:mode "\\.md\\'")
|
:mode "\\.md\\'")
|
||||||
@ -158,9 +158,9 @@
|
|||||||
:mode "\\.scad$"
|
:mode "\\.scad$"
|
||||||
:config
|
:config
|
||||||
(defun scad-compile (ext)
|
(defun scad-compile (ext)
|
||||||
"Compile current buffer using 'scad-command' and the extention 'ext'"
|
"Compile current buffer using 'scad-command' and the extention 'ext'"
|
||||||
(interactive (list (completing-read "Extension: " '("stl" "off" "amf" "dxf" "svg" "csg" "png"))))
|
(interactive (list (completing-read "Extension: " '("stl" "off" "amf" "dxf" "svg" "csg" "png"))))
|
||||||
(compile (concat scad-command " -o " (file-name-sans-extension buffer-file-name) "." ext " " buffer-file-name)))
|
(compile (concat scad-command " -o " (file-name-sans-extension buffer-file-name) "." ext " " buffer-file-name)))
|
||||||
(define-key scad-mode-map (kbd "C-c z") 'scad-compile))
|
(define-key scad-mode-map (kbd "C-c z") 'scad-compile))
|
||||||
(use-package smart-tabs-mode
|
(use-package smart-tabs-mode
|
||||||
:config
|
:config
|
||||||
@ -168,43 +168,43 @@
|
|||||||
(use-package todotxt-mode
|
(use-package todotxt-mode
|
||||||
:config
|
:config
|
||||||
(setq todotxt-default-file (expand-file-name "~/Sync/todo/todo.txt")
|
(setq todotxt-default-file (expand-file-name "~/Sync/todo/todo.txt")
|
||||||
todotxt-default-archive-file (expand-file-name "~/Sync/todo/done.txt")
|
todotxt-default-archive-file (expand-file-name "~/Sync/todo/done.txt")
|
||||||
todotxt-due-tag "due"
|
todotxt-due-tag "due"
|
||||||
todotxt-mode-keywords
|
todotxt-mode-keywords
|
||||||
'(("^x .*$" 0 '(:foreground "gray80" :strike-through t))
|
'(("^x .*$" 0 '(:foreground "gray80" :strike-through t))
|
||||||
("^(A) " 0 '(:foreground "red"))
|
("^(A) " 0 '(:foreground "red"))
|
||||||
("^(B) " 0 '(:foreground "orange"))
|
("^(B) " 0 '(:foreground "orange"))
|
||||||
("^(C) " 0 '(:foreground "teal"))
|
("^(C) " 0 '(:foreground "teal"))
|
||||||
("^(D) " 0 '(:foreground "light green"))
|
("^(D) " 0 '(:foreground "light green"))
|
||||||
("^(Y) " 0 '(:foreground "light grey"))
|
("^(Y) " 0 '(:foreground "light grey"))
|
||||||
("([A-Z]+)" . font-lock-builtin-face)
|
("([A-Z]+)" . font-lock-builtin-face)
|
||||||
("\\([a-zA-Z0-9_-]+\\):\\([a-zA-Z0-9._-]+\\)" . font-lock-variable-name-face)
|
("\\([a-zA-Z0-9_-]+\\):\\([a-zA-Z0-9._-]+\\)" . font-lock-variable-name-face)
|
||||||
("+\\w+" . font-lock-function-name-face)
|
("+\\w+" . font-lock-function-name-face)
|
||||||
("@\\w+" . font-lock-type-face)
|
("@\\w+" . font-lock-type-face)
|
||||||
("#important" 0 '(:foreground "orange red")) ; special tag
|
("#important" 0 '(:foreground "orange red")) ; special tag
|
||||||
("#waiting" 0 '(:foreground "dark orange")) ; special tag
|
("#waiting" 0 '(:foreground "dark orange")) ; special tag
|
||||||
("#\\w+" . font-lock-comment-face)
|
("#\\w+" . font-lock-comment-face)
|
||||||
("-\\([a-zA-Z_-]+\\)" . font-lock-variable-name-face)
|
("-\\([a-zA-Z_-]+\\)" . font-lock-variable-name-face)
|
||||||
("^[0-9]+-[0-9]+-[0-9]+" 0 '(:foreground "gray90")))))
|
("^[0-9]+-[0-9]+-[0-9]+" 0 '(:foreground "gray90")))))
|
||||||
(use-package latex
|
(use-package latex
|
||||||
:config
|
:config
|
||||||
(setq TeX-command-extra-options "-shell-escape")
|
(setq TeX-command-extra-options "-shell-escape")
|
||||||
(define-key LaTeX-mode-map (kbd "C-z")
|
(define-key LaTeX-mode-map (kbd "C-z")
|
||||||
'(lambda () (interactive)
|
'(lambda () (interactive)
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
(TeX-command "LaTeX" 'TeX-master-file -1)))
|
(TeX-command "LaTeX" 'TeX-master-file -1)))
|
||||||
(define-key LaTeX-mode-map (kbd "C-c e") 'tex-close-latex-block)
|
(define-key LaTeX-mode-map (kbd "C-c e") 'tex-close-latex-block)
|
||||||
(add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)
|
(add-hook 'LaTeX-mode-hook 'TeX-source-correlate-mode)
|
||||||
(defun latex-tsv-to-table ()
|
(defun latex-tsv-to-table ()
|
||||||
"Converts tab-seperated-values to a LaTeX table."
|
"Converts tab-seperated-values to a LaTeX table."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((beg (region-beginning)) (end-line (line-number-at-pos (region-end))))
|
(let ((beg (region-beginning)) (end-line (line-number-at-pos (region-end))))
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-line end-line)
|
(goto-line end-line)
|
||||||
(indent-region beg (point-at-eol))
|
(indent-region beg (point-at-eol))
|
||||||
(replace-regexp "\t" " & " nil beg (point-at-eol))
|
(replace-regexp "\t" " & " nil beg (point-at-eol))
|
||||||
(replace-regexp "$" " \\\\\\\\" nil beg (point-at-eol))
|
(replace-regexp "$" " \\\\\\\\" nil beg (point-at-eol))
|
||||||
(align beg (point))))))
|
(align beg (point))))))
|
||||||
(use-package fasd
|
(use-package fasd
|
||||||
:config
|
:config
|
||||||
(global-set-key (kbd "C-x C-S-f") 'fasd-find-file)
|
(global-set-key (kbd "C-x C-S-f") 'fasd-find-file)
|
||||||
@ -213,9 +213,9 @@
|
|||||||
(use-package yasnippet
|
(use-package yasnippet
|
||||||
:config
|
:config
|
||||||
(defun company-to-yasnippet ()
|
(defun company-to-yasnippet ()
|
||||||
(interactive)
|
(interactive)
|
||||||
(company-abort)
|
(company-abort)
|
||||||
(call-interactively 'company-yasnippet))
|
(call-interactively 'company-yasnippet))
|
||||||
(bind-key "<backtab>" 'company-to-yasnippet company-active-map)
|
(bind-key "<backtab>" 'company-to-yasnippet company-active-map)
|
||||||
(bind-key "<backtab>" 'company-yasnippet))
|
(bind-key "<backtab>" 'company-yasnippet))
|
||||||
(use-package swiper
|
(use-package swiper
|
||||||
@ -225,9 +225,9 @@
|
|||||||
(use-package helm-dash
|
(use-package helm-dash
|
||||||
:config
|
:config
|
||||||
(setq helm-dash-browser-func 'eww
|
(setq helm-dash-browser-func 'eww
|
||||||
helm-dash-enable-debugging nil)
|
helm-dash-enable-debugging nil)
|
||||||
(add-hook 'python-mode-hook
|
(add-hook 'python-mode-hook
|
||||||
'(lambda ()(setq-local helm-dash-docsets '("Python 3")))))
|
'(lambda ()(setq-local helm-dash-docsets '("Python 3")))))
|
||||||
;;; Local Variables
|
;;; Local Variables
|
||||||
(add-to-list 'safe-local-eval-forms '(outline-hide-body))
|
(add-to-list 'safe-local-eval-forms '(outline-hide-body))
|
||||||
;; Local Variables:
|
;; Local Variables:
|
||||||
|
Loading…
Reference in New Issue
Block a user