From d6a9570f4d0426d36322a6fa7ddb3413ffd3030a Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Wed, 9 Sep 2020 22:25:28 +0200 Subject: [PATCH] Change quelques comportements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - C-s dans swiper cycle maintenant dans la liste - affiche en noir le texte mis en lumière dans les recherches pour plus de visibilité - ne ferme plus la fenêtre de compilation même en cas de succès --- Configuration.org | 70 +++++++++++++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 27 deletions(-) diff --git a/Configuration.org b/Configuration.org index 87a85df..8216064 100644 --- a/Configuration.org +++ b/Configuration.org @@ -264,7 +264,15 @@ Interface de complétion (ivy-mode 1) (setq ivy-use-virtual-buffers t) (setq ivy-count-format "%d/%d ") - (setq ivy-display-style 'fancy)) + (setq ivy-display-style 'fancy) + (setq ivy-wrap t) + ;; (custom-set-faces + ;; '(ivy-minibuffer-match-face-1 ((t (:background "#74b5727c5654" :foreground "black")))) + ;; '(ivy-minibuffer-match-face-2 ((t (:background "#ce8bf1006cba" :foreground "black")))) + ;; '(ivy-minibuffer-match-face-3 ((t (:background "#fefdc4fe5941" :foreground "black")))) + ;; '(ivy-minibuffer-match-face-4 ((t (:background "#fefd9c40f85a" :foreground "black")))) + ;; ) + ) #+END_SRC ** Swiper @@ -286,20 +294,28 @@ classiques. Deux différences notables. | ~C-x C-f~ | Recherche incrémentale ou création d'un fichier | #+BEGIN_SRC emacs-lisp (use-package swiper - :ensure t - :bind (("C-s" . swiper-isearch) - ("C-r" . swiper-isearch) - ("C-c C-r" . ivy-resume) - ("M-x" . counsel-M-x) - ("C-x C-f" . counsel-find-file)) - :config - (progn - (ivy-mode 1) - (setq ivy-use-virtual-buffers t) - (setq ivy-display-style 'fancy) - (setq ivy-use-selectable-prompt t) - (define-key read-expression-map (kbd "C-r") 'counsel-expression-history) - (define-key ivy-minibuffer-map (kbd "C-w") 'ivy-yank-word))) + :ensure t + :bind (("C-s" . swiper-isearch) + ("C-r" . swiper-isearch) + ("C-c C-r" . ivy-resume) + ("M-x" . counsel-M-x) + ("C-x C-f" . counsel-find-file)) + :config + (progn + (ivy-mode 1) + (setq ivy-use-virtual-buffers t) + (setq ivy-display-style 'fancy) + (setq ivy-use-selectable-prompt t) + (define-key read-expression-map (kbd "C-r") 'counsel-expression-history) + (define-key ivy-minibuffer-map (kbd "C-w") 'ivy-yank-word) + (custom-set-faces + '(swiper-match-face-1 ((t (:background "#74b5727c5654" :foreground "black")))) + '(swiper-match-face-2 ((t (:background "#ce8bf1006cba" :foreground "black")))) + '(swiper-match-face-3 ((t (:background "#fefdc4fe5941" :foreground "black")))) + '(swiper-match-face-4 ((t (:background "#fefd9c40f85a" :foreground "black")))) + ) + ) + ) #+END_SRC ** Avy @@ -982,18 +998,18 @@ Active le rendu des couleurs ANSI dans le /buffer/ de compilation Ferme automatiquement le /buffer/ de compilation lorsqu'il n'y a aucune erreur (/warnings/ compris). #+BEGIN_SRC emacs-lisp - (setq compilation-finish-function - (lambda (buf str) - (if (string-match "*Compilation*" (buffer-name buf)) - (if (string-match "abnormally" str) - (message "There were errors :-(") - ;;no errors, make the compilation window go away in 1 second - (run-at-time 1 nil - (lambda (buf) - (delete-windows-on buf) - (bury-buffer buf)) - buf) - (message "No errors :-)"))))) + ;; (setq compilation-finish-function + ;; (lambda (buf str) + ;; (if (string-match "*Compilation*" (buffer-name buf)) + ;; (if (string-match "abnormally" str) + ;; (message "There were errors :-(") + ;; ;;no errors, make the compilation window go away in 1 second + ;; (run-at-time 1 nil + ;; (lambda (buf) + ;; (delete-windows-on buf) + ;; (bury-buffer buf)) + ;; buf) + ;; (message "No errors :-)"))))) #+END_SRC Force la création du /buffer/ de compilation en dessous -- GitLab