From 8d8181676b1021ace99635c4ccadd2d1bdd9e692 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Thu, 12 Oct 2017 20:19:26 +0200 Subject: [PATCH] Some clean up --- emacs/.emacs.d/init.el | 68 +++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 7db5d24..22b3a9b 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -45,7 +45,6 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - '(ac-ignore-case nil) '(ansi-color-faces-vector [default default default italic underline success warning error]) '(ansi-color-names-vector @@ -62,24 +61,10 @@ (quote ("4f2ede02b3324c2f788f4e0bad77f7ebc1874eff7971d2a2c9b9724a50fb3f65" default))) '(dired-listing-switches "-lh") - '(global-evil-surround-mode t) - '(indent-tabs-mode nil) '(inhibit-startup-screen t) - '(menu-bar-mode nil) '(package-selected-packages (quote - (company delight evil-org org-bullets counsel powerline-evil powerline origami projectile terminal-here shell-pop swiper neotree centered-cursor-mode ivy heroku-theme auto-complete use-package yasnippet evil-surround org evil-magit magit makefile-runner evil))) - '(scroll-bar-mode nil) - '(shell-pop-shell-type - (quote - ("ansi-term" "*ansi-term*" - (lambda nil - (ansi-term shell-pop-term-shell))))) - '(shell-pop-window-position "top") - '(shell-pop-window-size 20) - '(show-trailing-whitespace t) - '(tool-bar-mode nil)) - + (company delight evil-org org-bullets counsel powerline-evil powerline origami projectile terminal-here shell-pop swiper neotree centered-cursor-mode ivy heroku-theme auto-complete use-package yasnippet evil-surround org evil-magit magit makefile-runner evil)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. @@ -109,6 +94,11 @@ '(powerline-evil-normal-face ((t (:inherit powerline-evil-base-face :background "white" :foreground "grey22")))) '(powerline-evil-replace-face ((t (:inherit powerline-evil-base-face :background "dark red"))))) +;; Disable unnecessary UI +(scroll-bar-mode -1) +(tool-bar-mode -1) +(menu-bar-mode -1) + ;; ensure repo cache is up1date (or (file-exists-p package-user-dir) (package-refresh-contents)) @@ -138,15 +128,10 @@ ;; highlight line (global-hl-line-mode) -;; shackle -;(defun my/shackle-rules () -; (setq shackle-rules -; '((term-mode :select t :align 'below :size 0.2)))) -; -;(use-package shackle -; :ensure t -; :demand t -; :config '(my/shackle-rules)) +;; No tabs - tabs are evil +(setq indent-tabs-mode nil) +;; No trailing whitespaces - those are even evileler +(setq show-trailing-whitespace t) (use-package delight :ensure t @@ -251,6 +236,12 @@ (lambda () (evil-org-set-key-theme '(navigation insert shift todo heading))))) +(use-package evil-surround + :ensure t + :demand t + :config + (global-evil-surround-mode t)) + (use-package projectile :ensure t :demand t @@ -277,6 +268,7 @@ ;; :disabled ;; :config ;; (require 'auto-complete-config) +;; (setq ac-ignore-case nil) ;; (setq ac-sources '(ac-source-filename ;; ac-source-functions ;; ac-source-yasnippet @@ -310,7 +302,8 @@ (setq ivy-use-virtual-buffers t) (setq ivy-count-format "(%d/%d) ") (advice-add 'imenu :before 'my/save-imenu-jump) - (define-key ivy-minibuffer-map (kbd "") 'ivy-immediate-done)) + (define-key ivy-minibuffer-map (kbd "") 'ivy-immediate-done) + (set-face-attribute 'ivy-current-match nil :foreground "gold")) (use-package counsel :ensure t @@ -457,14 +450,17 @@ ;; (funcall func (car alist)) ;; (setq alist (cdr alist))))) -;(defun emacs-exit-prompt () -; (foreach -; (buffer-list) -; (lambda (buffer) -; (cond -; ((string-match "^\\*.*\\*$" (buffer-name buffer)) nil) -; ((null (buffer-modified-p buffer)) nil) -; (t nil))))) +(defun check-for-open-buffers () + (interactive) + (or (dolist + (buffer (buffer-list)) + (cond + ((string-match "^\\*.*\\*$" (buffer-name buffer)) + nil) + ((null (buffer-modified-p buffer)) + nil) + (t + (yes-or-no-p (format "Buffer %s is open. Exit anyway?" (buffer-name buffer)))))))) ;; Latex german (quail-define-package "latex-german" "UTF-8" "LaGe" t @@ -494,7 +490,6 @@ ;; Treat _ as part of word in some modes (defun treat-underscore () (modify-syntax-entry ?_ "w")) - (add-hook 'prog-mode-hook 'treat-underscore) ;; Split windows horizontally preferred @@ -526,9 +521,6 @@ (global-set-key (kbd "C-c C-d") 'time-german) -(global-set-key (kbd "") 'backward-paragraph) -(global-set-key (kbd "") 'forward-paragraph) - (defun fefe () (interactive) (eww "https://blog.fefe.de"))