From 4cbf15ca8aab62aea5c7a673c66f879fad2d5140 Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Fri, 6 Oct 2017 08:36:41 +0200 Subject: [PATCH] Emacs kill buf, datetime --- emacs/.emacs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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