|
|
|
|
@ -129,8 +129,33 @@ |
|
|
|
|
(setq focus-follows-mouse nil) |
|
|
|
|
|
|
|
|
|
(require 'pomodoro) |
|
|
|
|
;; (require 'key-chord) |
|
|
|
|
;; (key-chord-mode 1) |
|
|
|
|
|
|
|
|
|
(defun add-delimiter (delim-begin delim-end r-begin r-end) |
|
|
|
|
"Add the pair of delimiters given in delim at the ends of the region if it is activated" |
|
|
|
|
(interactive "cBegin delimiter: \ncEnd delimiter: \nr") |
|
|
|
|
(if (use-region-p) |
|
|
|
|
(progn |
|
|
|
|
(save-excursion |
|
|
|
|
(goto-char r-end) (insert delim-end) |
|
|
|
|
(goto-char r-begin) (insert delim-begin))) |
|
|
|
|
(insert delim-begin delim-end))) |
|
|
|
|
|
|
|
|
|
(defun add-curlybrackets-delimiter (r-begin r-end) |
|
|
|
|
"Add a pair {} at the boundary of the current region if activated" |
|
|
|
|
(interactive "r") |
|
|
|
|
(add-delimiter "{" "}" r-begin r-end)) |
|
|
|
|
|
|
|
|
|
(defun add-dollar-delimiter (r-begin r-end) |
|
|
|
|
"Add a pair {} at the boundary of the current region if activated" |
|
|
|
|
(interactive "r") |
|
|
|
|
(add-delimiter "$" "$" r-begin r-end)) |
|
|
|
|
|
|
|
|
|
(require 'key-chord) |
|
|
|
|
(key-chord-mode 1) |
|
|
|
|
(setq key-chord-two-keys-delay 0.05) |
|
|
|
|
(key-chord-define-global "{}" 'add-curlybrackets-delimiter) |
|
|
|
|
(key-chord-define-global "4r" "$") |
|
|
|
|
(key-chord-define-global "$%" 'add-dollar-delimiter) |
|
|
|
|
|
|
|
|
|
(global-set-key (kbd "M-[") 'previous-buffer) |
|
|
|
|
(global-set-key (kbd "M-]") 'next-buffer) |
|
|
|
|
|