diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf index 255ec6fc..f38446ed 100644 --- a/.config/ranger/rc.conf +++ b/.config/ranger/rc.conf @@ -111,7 +111,13 @@ map eeg shell aunpack -e %s -X "$HOME/games/" ## Git map ega shell -w git add %s -map egr shell -w git checkout %s +map egr shell -w git checkout -- %s +map egc shell git commit +map egC shell git commit -a +map egd shell git diff %f +map egD shell git diff %f %s +map egp shell -w git pull +map egP shell -w git push map egs shell -w git status -uno ## Video diff --git a/.emacs.d/main.el b/.emacs.d/main.el index dd9de17c..23608bbb 100644 --- a/.emacs.d/main.el +++ b/.emacs.d/main.el @@ -60,6 +60,19 @@ ;; end. ;; (add-hook 'before-save-hook 'delete-trailing-whitespace) +;; Highlight trailing whitespaces. For programming languages only, so that it +;; does not affect buffer like calendar and so on. +(mapcar + (lambda (mode-hook) + (add-hook + mode-hook + (lambda () (interactive) + (setq show-trailing-whitespace t)))) + '(prog-mode-hook lua-mode-hook)) + +;; Remove whitespaces on region, or whole file. +(define-key my-keys-minor-mode-map (kbd "C-\\") 'delete-trailing-whitespace) + ;; Abbreviation support (setq default-abbrev-mode t) @@ -166,12 +179,3 @@ (setq org-agenda-files '("~/todo.org")) (setq org-enforce-todo-dependencies t)) -;; Highlight trailing whitespaces. For programming languages only, so that it -;; does not affect buffer like calendar and so on. -(mapcar - (lambda (mode-hook) - (add-hook - mode-hook - (lambda () (interactive) - (setq show-trailing-whitespace t)))) - '(prog-mode-hook lua-mode-hook))