refactor: Begin moving package configuration to use-package

This is the first in a series of commits for refactoring my
configuration to make use of jwiegley's use-package.

In the previous layout of the configuration there were some questions
around what settings go into which file, but in the end it is all just
related to which packages are being configured (besides settings
related to global Emacs behaviour).

This commit introduces use-package forms for all currently used
packages (which are still installed via Nix, not via package.el) but
does not yet clean up the rest of the configuration in a suitable way.

Note that this version introduces a bug in which the configuration of
telephone line is not correctly initialised after package setup.
This commit is contained in:
Vincent Ambo 2018-06-22 10:29:31 +02:00 committed by Vincent Ambo
parent f0dfc8b06d
commit 4fe8d78dbb
10 changed files with 218 additions and 216 deletions

View file

@ -1,6 +1,4 @@
;; Configuration for multi-term mode:
(require 'multi-term)
;; Utilities for term-mode
(defun open-or-create-term-buffer (buffer-name)
"Switch to the buffer with BUFFER-NAME or create a
@ -31,16 +29,4 @@
(rename-buffer (format "*terminal<%s>*" (read-string "New terminal name: ")))
(error "This function is only intended to rename terminal buffers."))))
(global-set-key (kbd "C-x t") #'counsel-switch-to-term)
;; term-mode's attempt to use isearch is not my favourite thing in the
;; world.
(delete '("C-r" . isearch-backward) term-bind-key-alist)
(delete '("C-s" . isearch-forward) term-bind-key-alist)
(add-to-list 'term-bind-key-alist '("C-r" . term-send-reverse-search-history))
(add-to-list 'term-bind-key-alist '("C-c C-l" . term-line-mode))
(add-to-list 'term-bind-key-alist '("C-s" . swiper))
(add-to-list 'term-bind-key-alist '("C-c C-r" . term-rename))
(provide 'term-setup)