2020-12-07 21:09:35 +00:00
|
|
|
(defun copy-whole-line ()
|
|
|
|
(interactive)
|
|
|
|
(save-excursion
|
|
|
|
(kill-new
|
|
|
|
(buffer-substring
|
|
|
|
(point-at-bol)
|
|
|
|
(point-at-eol)))))
|
|
|
|
(global-set-key (kbd "C-c w l") 'copy-whole-line)
|
|
|
|
|
|
|
|
(defun kill-all-buffers ()
|
|
|
|
(interactive)
|
|
|
|
(mapc 'kill-buffer (buffer-list)))
|
|
|
|
(global-set-key (kbd "C-c k k") 'kill-all-buffers)
|
2020-12-20 21:07:30 +00:00
|
|
|
|
2020-12-30 00:08:12 +00:00
|
|
|
(defun split-and-follow-horizontally ()
|
|
|
|
(interactive)
|
|
|
|
(split-window-below)
|
|
|
|
(balance-windows)
|
|
|
|
(other-window 1))
|
|
|
|
(global-set-key (kbd "C-x 2") 'split-and-follow-horizontally)
|
|
|
|
|
|
|
|
(defun split-and-follow-vertically ()
|
|
|
|
(interactive)
|
|
|
|
(split-window-right)
|
|
|
|
(balance-windows)
|
|
|
|
(other-window 1))
|
|
|
|
(global-set-key (kbd "C-x 3") 'split-and-follow-vertically)
|
|
|
|
|
2020-12-20 21:07:30 +00:00
|
|
|
;; compilation
|
|
|
|
(setq compile-command "make ")
|
|
|
|
(global-set-key "\C-x\C-m" 'compile)
|