at main 978 B view raw
1;; Save all by default 2(global-set-key (kbd "C-x s") 3 (lambda () 4 (interactive) 5 (save-some-buffers t))) 6 7;; Get rid of backup files 8(setq make-backup-files nil) 9(setq create-lockfiles nil) 10(auto-save-visited-mode) 11 12;; Command-line reformatters should reload 13(global-auto-revert-mode t) 14 15;; Sometimes hit C-x C-c and lose state. Forbid this. 16(defun exit () 17 (interactive) 18 (save-buffers-kill-terminal t)) 19(defun remove-exit () 20 (interactive) 21 (global-set-key (kbd "C-x C-c") nil)) 22 23(setq compilation-always-kill t) 24(setq compilation-ask-about-save nil) 25(setq compile-command "") 26(global-set-key (kbd "C-c c") 'compile) 27 28;; TODO: Do I want keybindings for this? 29(defun osc52-encode-utf8-base64 (string &rest base64-encode-args) 30 (apply 'base64-encode-string 31 (encode-coding-string string 'utf-8) 32 base64-encode-args)) 33(defun osc52-select-text (string &rest args) 34 (send-string-to-terminal 35 (concat "\e]52;c;" 36 (osc52-encode-utf8-base64 string t) 37 "\07")))