diff --git a/emacs/.emacs b/emacs/.emacs index f49e582..8c51552 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -152,6 +152,7 @@ (evil-mode 1) (setq evil-ex-substitute-global t) (define-key evil-normal-state-map "/" 'swiper) + (evil-ex-define-cmd "q" 'kill-buffer) (define-key evil-motion-state-map [down-mouse-1] 'silence) (define-key evil-motion-state-map [mouse-1] 'silence) (setq-default evil-cross-lines t)) @@ -373,6 +374,7 @@ (modify-syntax-entry ?_ "w")) (add-hook 'cperl-mode-hook 'treat-underscore) +(add-hook 'c-mode-hook 'treat-underscore) ;; Split windows horizontally preferred (setq split-height-threshold 6) @@ -389,12 +391,17 @@ ;; Change all prompts to y or n (fset 'yes-or-no-p 'y-or-n-p) -;; Insert time, german format +;; Insert date time, german format (defun datetime-german () (interactive) (insert (format-time-string "%d.%m.%Y %H:%M"))) -(global-set-key (kbd "C-c C-d") 'datetime-german) +;; Insert time, german format +(defun time-german () + (interactive) + (insert (format-time-string "%H:%M"))) + +(global-set-key (kbd "C-c C-d") 'time-german) ;; Comment fun