diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/main.el | 108 |
1 files changed, 3 insertions, 105 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el index 4366abb4..5f9e33cb 100644 --- a/emacs/.emacs.d/main.el +++ b/emacs/.emacs.d/main.el @@ -940,15 +940,6 @@ :init (progn (winner-mode 1))) -;;;;; windmove - -;; Directional window movement - -(use-package windmove - :bind* (("S-<left>" . windmove-left) - ("S-<right>" . windmove-right) - ("S-<up>" . windmove-up) - ("S-<down>" . windmove-down))) ;;;; Blogging ;; I have a [[https://alanpearce.uk][blog]] that I publish with hugo. @@ -1291,40 +1282,6 @@ With two prefix arguments, write out the day and month name." " nil t) (replace-match "")))) -(use-package rect - :ensure nil - :defines (killed-rectangle) - :init (defun copy-rectangle (start end) - "Copy the region-rectangle." - (interactive "r") - (setq killed-rectangle (extract-rectangle start end)))) - -(defun shell-execute (to-current-buffer) - "Execute shell command, replacing % with the current buffer file name. -With prefix TO-CURRENT-BUFFER, insert command output into buffer." - (interactive "P") - (let ((file-buffer (if (buffer-file-name) - (file-name-nondirectory (buffer-file-name)) - "")) - (command (read-shell-command "Shell command: " nil nil nil))) - (shell-command (replace-regexp-in-string "%" file-buffer command) to-current-buffer))) - -(defun process-exit-code (program &rest args) - "Run PROGRAM with ARGS and return the exit code." - (apply 'call-process program nil nil nil args)) - -(defun narrow-to-region-indirect (start end) - "Restrict editing in this buffer to the current region, indirectly." - (interactive "r") - (deactivate-mark) - (let ((buf (clone-indirect-buffer nil nil))) - (with-current-buffer buf - (narrow-to-region start end)) - (switch-to-buffer buf))) - -(bind-key* "M-!" #'shell-execute) -(bind-key* "C-x r M-w" #'copy-rectangle) - ;;;;; Auxillary Configuration (require 'pinentry) @@ -2400,15 +2357,6 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (when (boundp 'x-select-request-type) (setq x-select-request-type '(UTF8_STRING COMPOUND_TEXT TEXT STRING))) -;;;;; Selection - -;; Expanding the region by semantic units was something I quite liked -;; from Sublime Text. As always, there’s a mode for that. - -(use-package expand-region - :bind ("C-M-SPC" . er/expand-region) - :config (setq expand-region-fast-keys-enabled nil)) - ;;;;; avy ;; Avy is a really nice way to move around files, like ace-jump-mode, but @@ -2438,41 +2386,7 @@ Pass ARG to `comint-delchar-or-maybe-eof'." ;; This is like popping the mark, only it filters to only change areas ;; and doesn’t go back to the same place more than once. -(use-package goto-chg - :bind ("C-c C-SPC" . goto-last-change)) - -;;;;; beginend - -;; In special buffers, I would rather have =M->= and =M-<= goto the -;; logical beginning/end rather than the physical ones. - -(use-package beginend - :config (progn - (beginend-setup-all) - (seq-do (lambda (modepair) - (diminish (cdr modepair))) - beginend-modes))) - -;;;;; fontawesome - -;; Sometimes I might want to add a font-awesome icon to some text. -;; This package gives me two interfaces to find the icons - -(use-package fontawesome) - -;;;;; multiple-cursors - -;; I mentioned before that I’d used Sublime Text before. Multiple -;; cursors was one of my favourite features, so I was really happy when I -;; saw that multiple-cursors was released for Emacs. - -(use-package multiple-cursors - :defer 1 - :bind* (("C-." . mc/mark-next-like-this) - ("C-," . mc/mark-previous-like-this) - ("M-<f3>" . mc/mark-all-like-this-dwim) - ("C-<f3>" . mc/mark-more-like-this-extended) - ("C-S-L" . mc/edit-lines))) +(use-package goto-chg) ;;;;; paredit @@ -2487,13 +2401,6 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (put #'paredit-backward-delete 'delete-selection 'supersede) (add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode))) -;;;;; move-text - -;; Transposing lines, made easier. - -(use-package move-text - :config (move-text-default-bindings)) - ;;;;; undo-tree ;; Emacs’ default handling of undo is a bit confusing. Undo-tree makes @@ -2520,19 +2427,10 @@ Pass ARG to `comint-delchar-or-maybe-eof'." (with-eval-after-load "replace.el" (setq case-replace nil)) -;;;;; visual-regexp - -;; I don’t always remember exactly how Emacs’ regular expressions work, -;; so this package is pretty useful because it highlights everything in -;; the buffer for me. - -(use-package visual-regexp - :bind (("C-c r" . vr/replace) - ("C-c q" . vr/query-replace) - ("C-c m" . vr/mc-mark))) - ;;;; Evil +(setq evil-want-integration nil) + (use-package evil-leader ;; must load before evil-mode :init (global-evil-leader-mode +1) |