add documentation, fez/kill-all-buffers

This commit is contained in:
opfez 2021-05-28 12:34:36 +02:00
parent 88d2bdb556
commit b6afa5162e
2 changed files with 12 additions and 2 deletions

View File

@ -17,12 +17,13 @@
(set-mark (point))
(move-end-of-line nil))
;; Toggle between indenting with tabs or spaces.
(defun fez/toggle-indent ()
"Toggle between indenting with tabs or spaces."
(interactive)
(setq-default indent-tabs-mode (not indent-tabs-mode)))
(defun fez/current-line-empty-p ()
"Checks if the current line is empty or not."
(save-excursion
(beginning-of-line)
(looking-at-p "[[:space:]]*$")))
@ -45,15 +46,22 @@
(transient-mark-mode))
(defun fez/insert-keybind ()
"Prompts the user for a key combination like C-h k does, then inserts that key combination."
(interactive)
(insert (concat "(kbd \""
(key-description (read-key-sequence-vector "Key sequence: "))
"\")")))
(defun fez/time-stamp ()
"Insert the current date."
(interactive)
(shell-command "LANG=nb_NO.UTF-8 date +%d-%m-%Y" t))
(defun fez/kill-all-buffers ()
"Kill all buffers other than the currently active one."
(interactive)
(mapc #'kill-buffer (delete (current-buffer) (buffer-list))))
;; Eshell convinience commands.
(defalias 'open 'find-file-other-window)
(defalias 'clean 'eshell/clear-scrollback)

View File

@ -88,7 +88,8 @@
(use-package multiple-cursors
:ensure t
:config
(global-set-key (kbd "C->") 'mc/mark-next-like-this))
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(setq mc/always-run-for-all t))
;; Jump to definitions and files with M-.
(use-package dumb-jump
@ -127,6 +128,7 @@
(use-package elpher
:ensure t)
;; org-mode
(use-package org
:ensure t
:config