diff --git a/myconfig.org b/myconfig.org index c5a6a6e..a9dc663 100644 --- a/myconfig.org +++ b/myconfig.org @@ -103,7 +103,7 @@ Some notes about [[https://github.com/jwiegley/use-package][use-package]] ;; Set encoding (prefer-coding-system 'utf-8) #+end_src - + ** Some shortcuts Useful shortcuts: - Revert buffer (recargar) @@ -238,6 +238,26 @@ Some notes about [[https://github.com/jwiegley/use-package][use-package]] (put 'narrow-to-region 'disabled nil) #+end_src +** Insert-date +#+begin_src emacs-lisp + (global-set-key (kbd "C-c d") 'slv/insert-date) + (defun slv/insert-date (prefix) + "Insert the current date. With prefix-argument, use ISO format. With + two prefix arguments, write out the day and month name." + (interactive "P") + (let ((format (cond + ((not prefix) "%Y-%m-%d") + ((equal prefix '(4)) "%Y-%m-%dT%H:%M:%S%z") + ((equal prefix '(16)) "%d.%m.%Y") + ((equal prefix '(64)) "%c"))) + (system-time-locale "es_ES")) + (insert (format-time-string format)))) + (defun insert-standard-date () + "Inserts standard date time string." + (interactive) + (insert (format-time-string "%c"))) +#+end_src + * doom-modeline A fancy modeline. Remember to execute =M-x all-the-icons-install-fonts= See [[http://sodaware.sdf.org/notes/emacs-daemon-doom-modeline-icons/][this]] for fixing icons in terminal