diff --git a/emacs/.emacs b/emacs/.emacs index 7ff1cdb..c536b5f 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -43,7 +43,9 @@ ;; 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. - ) + '(neo-dir-link-face ((t (:foreground "#fce94f")))) + '(neo-expand-btn-face ((t (:foreground "#ffe070")))) + '(neo-root-dir-face ((t (:foreground "#fff3c6" :weight bold))))) ;; ensure repo cache is up1date (or (file-exists-p package-user-dir) @@ -103,6 +105,11 @@ (setq ivy-count-format "(%d/%d) ") (define-key ivy-minibuffer-map (kbd "") 'ivy-immediate-done))) +;; swiper +(use-package swiper + :ensure t + :bind ("C-s" . swiper)) + ;; Neotree (use-package neotree :ensure t @@ -153,21 +160,25 @@ (interactive) (let ((window (split-window-below -7))) (select-window window) - (term my/default-shell))) + (term my/default-shell) + (set-window-dedicated-p window t))) (use-package term :bind ("C-x t" . term-split)) -(defadvice term-handle-exit - (after term-kill-buffer-on-exit activate) - (quit-window)) +(defun term-handle-exit--close-buffer (&rest args) + (let ((term-window (get-buffer-window "*terminal*"))) + (when (and term-window (window-dedicated-p term-window)) + (delete-window term-window)))) + +(advice-add 'term-handle-exit :after #'term-handle-exit--close-buffer) + ;; tabbing (doesn't really work yet) (setq-default indent-tabs-mode t) (setq-default tab-width 4) (setq-default LateX-indent-level 4) - ;; Activate line numbers (global-linum-mode t) @@ -206,17 +217,12 @@ (shrink-window (- h compilation-window-height))))))) (add-hook 'compilation-mode-hook 'my-compilation-hook) - -(defun nope () - (interactive) - (message "Nope! Nope! Nope!")) - ;; Window movement ; Old keys -(global-set-key (kbd "C-x ") 'nope) -(global-set-key (kbd "C-x ") 'nope) -(global-set-key (kbd "C-x ") 'nope) -(global-set-key (kbd "C-x ") 'nope) +(global-set-key (kbd "C-x ") 'windmove-up) +(global-set-key (kbd "C-x ") 'windmove-down) +(global-set-key (kbd "C-x ") 'windmove-left) +(global-set-key (kbd "C-x ") 'windmove-right) ; New keys (global-set-key (kbd "") 'windmove-up) @@ -231,17 +237,6 @@ (global-set-key (kbd "") 'cycle-window) -;; Kill term buffer on exit -;(defun term-handle-exit--close-buffer (&rest args) -; (when (null (get-buffer-process (current-buffer))) -; (progn -; (let (window (get-buffer-window (current-buffer)) -; (when (window-dedicated-p )) -; (kill-buffer (current-buffer)) -; Fix... - -; (advice-add 'term-handle-exit :after #'term-handle-exit--close-buffer) - ;; Latex german (quail-define-package "latex-german" "UTF-8" "LaGe" t "Transforms umlauts to the better latex notation.