32 lines
770 B
EmacsLisp
32 lines
770 B
EmacsLisp
(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)
|
|
|
|
(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)
|
|
|
|
;; compilation
|
|
(setq compile-command "make ")
|
|
(global-set-key "\C-x\C-m" 'compile)
|