new fancy config

This commit is contained in:
Grigory Shipunov 2023-05-01 11:02:23 +02:00
parent b9188d14cc
commit b45712de26
Signed by: 0xa
GPG key ID: 91FA5E5BF9AA901C
7 changed files with 254 additions and 457 deletions

16
lisp/oxa/misc.el Normal file
View file

@ -0,0 +1,16 @@
;; Stolen from https://github.com/rexim/dotfiles
(defun rc/duplicate-line ()
"Duplicate current line"
(interactive)
(let ((column (- (point) (point-at-bol)))
(line (let ((s (thing-at-point 'line t)))
(if s (string-remove-suffix "\n" s) ""))))
(move-end-of-line 1)
(newline)
(insert line)
(move-beginning-of-line 1)
(forward-char column)))
(global-set-key (kbd "C-,") 'rc/duplicate-line)
(provide 'oxa/misc)