From 3ffe36c5aeed7d09e5b3b5285ec03f809e4328ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Tue, 2 Nov 2021 12:26:30 +0100 Subject: [PATCH] Update emacs init MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marcin Woźniak --- .emacs.d/init.el | 53 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 39 insertions(+), 14 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 321539d..07ad7ff 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -14,18 +14,29 @@ (package-initialize) (setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3") +;; Packages list refresh +(when (not package-archive-contents) + (package-refresh-contents)) + +;; Auto Package Update +(use-package auto-package-update + :ensure t + :config + (progn + (setq + auto-package-update-delete-old-verions t + auto-package-update-interval 5 + ) + (auto-package-update-maybe) + ) +) + ;; Remove welcome screen (setq inhibit-startup-screen t) ;; Disable menu (menu-bar-mode 0) -;; Enable IDO mode -(setq ido-enable-flex-matching t) -;;(setq ido-everywhere t) -(ido-mode 1) -(global-set-key (kbd "C-x b") 'ido-switch-buffer) - ;; Remove working cl (require 'cl-lib) (setq byte-compile-warnings '(cl-functions)) @@ -79,6 +90,20 @@ (setq browse-url-browser-function 'browse-url-generic browse-url-generic-program "browser-x") +;; Amx +(use-package amx + :ensure t + :after ivy + :custom + ( + (amx-backend 'ivy) + (amx-show-key-bindings t) + ) + :config + (amx-mode t) + ) + + ;; Custom theme (add-to-list 'custom-theme-load-path "~/.emacs.d/plugins/") @@ -172,15 +197,10 @@ (add-to-list 'default-frame-alist `(font . ,(rc/get-default-font))) ;; Theme -;;(use-package dracula-theme -;; :ensure t -;; :config -;; (load-theme 'dracula t)) - -(use-package zenburn-theme +(use-package gruvbox-theme :ensure t :config - (load-theme 'zenburn t)) + (load-theme 'gruvbox-dark-hard t)) ;; Sitebar dirred (use-package dired-sidebar @@ -193,15 +213,19 @@ ;; Smex (require 'smex) (smex-initialize) -(global-set-key (kbd "M-x") 'smex) +(global-set-key (kbd "M-x") 'counsel-M-x) ;;buffer-move (require 'buffer-move) +(global-set-key (kbd "C-x b") 'counsel-buffer-or-recentf) (global-set-key (kbd "") 'buf-move-up) (global-set-key (kbd "") 'buf-move-down) (global-set-key (kbd "") 'buf-move-left) (global-set-key (kbd "") 'buf-move-right) +;; Files +(global-set-key (kbd "C-x f") 'counsel-find-file) + ;; Multiple-cursors (use-package multiple-cursors :ensure t @@ -588,3 +612,4 @@ (other-window 1) ) (global-set-key (kbd "C-x x") 'kill-and-remove-split) +(global-set-key (kbd "") 'keyboard-escape-quit)