X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/1f5c92ffb2a1c3cb52b01195e664876be7b69047..be78d2d531eb16d8c72499cb7396354c9d2b16b4:/.emacs.d/init.el diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 435cf97..631ce8c 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -145,20 +145,18 @@ This sets each user option VAR's value to the corresponding VALUE. ("org" . "https://orgmode.org/elpa/")) package-load-list '(;; GNU ELPA - (ivy "0.13.1") - (counsel "0.13.1") - (swiper "0.13.1") (debbugs "0.26") (delight "1.7") - (ebdb "0.6.19") + (ebdb "0.6.20") (orgalist "1.13") (rt-liberation "1.31") (yasnippet "0.14.0") (expand-region "0.11.0") + (emms "6.2") ;; bndl ;; (refinery-theme "0.1.1") ;; Org ELPA - (org-plus-contrib "20201012")))) + (org-plus-contrib "20201109")))) (package-initialize)) (csetq package-archive-upload-base "/ssh:caffeine:~/www/p/elpa") @@ -291,6 +289,31 @@ This sets each user option VAR's value to the corresponding VALUE. ;;;; Elisp-level customizations +;; (define-key minibuffer-local-completion-map +;; "\t" #'minibuffer-force-complete) + +(with-eval-after-load 'icomplete + +(setq icomplete-on-del-error-function #'abort-recursive-edit) + +(defun b/icomplete-fido-backward-updir () + "Delete char before or go up directory, like `ido-mode'." + (interactive) + (if (and (eq (char-before) ?/) + (eq (icomplete--category) 'file)) + (save-excursion + (goto-char (1- (point))) + (when (search-backward "/" (point-min) t) + (delete-region (1+ (point)) (point-max)))) + (condition-case nil + (call-interactively #'delete-backward-char) + (error + (when icomplete-on-del-error-function + (funcall icomplete-on-del-error-function)))))) + +(define-key icomplete-fido-mode-map + (kbd "DEL") #'b/icomplete-fido-backward-updir)) + ;; startup ;; don't need to see the startup echo area message (advice-add #'display-startup-echo-area-message :override #'ignore) @@ -520,6 +543,7 @@ Make N (default: 1) copies of the current line or region." (global-set-key (kbd "C-a") #'b/move-indentation-or-beginning-of-line) (global-set-key (kbd "C-c a i") #'ielm) (global-set-key (kbd "C-c d") #'b/duplicate-line-or-region) +(global-set-key (kbd "C-c j") #'b/join-line-top) (global-set-key (kbd "C-S-j") #'b/join-line-top) (global-set-key (kbd "C-c x") #'execute-extended-command) @@ -565,14 +589,13 @@ Make N (default: 1) copies of the current line or region." (expand-file-name (convert-standard-filename "lisp") user-emacs-directory)) -(require 'bandali-exwm) +(when (featurep 'exwm) + (require 'bandali-exwm)) (require 'bandali-org) (require 'bandali-theme) -;; (require 'bandali-magit) - ;; recently opened files (csetq recentf-max-saved-items 2000 recentf-save-file (b/var "recentf-save.el")) @@ -581,15 +604,7 @@ Make N (default: 1) copies of the current line or region." ;; (add-to-list 'recentf-keep #'file-remote-p) (recentf-mode)) -;; needed for history for counsel -(csetq amx-save-file (b/var "amx-save.el")) -(add-to-list 'load-path (b/lisp "s")) -(add-to-list 'load-path (b/lisp "amx")) -(run-with-idle-timer 0.3 nil #'require 'amx) -(with-eval-after-load 'amx - (amx-mode)) - -(require 'bandali-ivy) +(fido-mode 1) (require 'bandali-eshell) @@ -901,7 +916,7 @@ Make N (default: 1) copies of the current line or region." (defconst yas-verbosity-cur yas-verbosity) (setq yas-verbosity 2) (csetq yas-snippet-dirs `(,(b/etc "yasnippet/snippets"))) - (add-to-list 'yas-snippet-dirs "~/src/git/guix/etc/snippets" t) + ;; (add-to-list 'yas-snippet-dirs "~/src/git/guix/etc/snippets" t) (yas-reload-all) (setq yas-verbosity yas-verbosity-cur) @@ -977,16 +992,6 @@ Make N (default: 1) copies of the current line or region." (other-window 1))) (global-set-key (kbd "C-c w q") #'quit-window) -(run-with-idle-timer 0.6 nil #'require 'windmove) -(global-set-key (kbd "C-c w h") #'windmove-left) -(global-set-key (kbd "C-c w j") #'windmove-down) -(global-set-key (kbd "C-c w k") #'windmove-up) -(global-set-key (kbd "C-c w l") #'windmove-right) -(global-set-key (kbd "C-c w H") #'windmove-swap-states-left) -(global-set-key (kbd "C-c w J") #'windmove-swap-states-down) -(global-set-key (kbd "C-c w K") #'windmove-swap-states-up) -(global-set-key (kbd "C-c w L") #'windmove-swap-states-right) - ;; pass ;; (global-set-key (kbd "C-c a p") #'pass) ;; (add-hook 'pass-mode-hook #'View-exit) @@ -1019,8 +1024,6 @@ Make N (default: 1) copies of the current line or region." (delight 'auto-fill-function " f" "simple") (delight 'abbrev-mode "" "abbrev") (delight 'page-break-lines-mode "" "page-break-lines") - (delight 'ivy-mode "" "ivy") - (delight 'counsel-mode "" "counsel") (delight 'mml-mode " mml" "mml") (delight 'yas-minor-mode "" "yasnippet"))