consult namesto counsel in swiper, genreal define key
parent
c38db07448
commit
3755344f7c
|
@ -139,7 +139,6 @@ bližnjici (~[~ in ~]~ za prejšnji / naslednji buffer).
|
|||
#+begin_src emacs-lisp
|
||||
(start/leader-keys
|
||||
"b" '(:ignore t :wk "buffer")
|
||||
"b b" 'switch-to-buffer
|
||||
"b p" 'previous-buffer
|
||||
"b n" 'next-buffer
|
||||
"b s" (defun scratch-buffer () "Show scratch buffer" (interactive) (switch-to-buffer "*scratch*"))
|
||||
|
@ -178,7 +177,6 @@ Bližnjice za delo z datotekami se začnejo s ~f~.
|
|||
"f f" 'counsel-find-file
|
||||
"f c" 'odpri-konfiguracijo :wk "odpri konfiguracijo (config.org)"
|
||||
"f i" 'odpri-init :wk "odpri init.el"
|
||||
"f r" 'recentf :wk "nedavno odprto"
|
||||
"f z" 'odpri-zapiske
|
||||
"f t" 'odpri-todo)
|
||||
#+end_src
|
||||
|
@ -192,8 +190,10 @@ Emacs nudi kup uporabnih funkcij, ki so nepogrešljive na poti učenja o funkcio
|
|||
"d" '(:ignore :t :wk "describe")
|
||||
"d f" 'describe-function
|
||||
"d k" 'describe-key
|
||||
"d l" 'find-library
|
||||
"d m" 'describe-mode
|
||||
"d s" 'describe-symbol
|
||||
"d m" 'describe-mode)
|
||||
"d v" 'describe-variable)
|
||||
#+end_src
|
||||
|
||||
** Info
|
||||
|
@ -347,37 +347,24 @@ Paket za dopolnjevanje, nadomestek ~ivy~. Nudi nekoliko lepšo iskušnjo priporo
|
|||
|
||||
** Iskanje
|
||||
|
||||
~swiper~ je ivy-jev iskalnik po bufferjih, ki nudi lep vmesnik s predogledom rezultatov, nastavimo ga na ~C-S~.
|
||||
~consult~ pa nudi kup zamenjav privzetih emacs ukazov/operacij za prijetnejša opravila. Nastavimo nekaj bližnjic za njih. Recimo ~M-x~ menjava ki kaže predoglede v minibuferju, ~SPC RET~ za shranjevanje in menjavo med zaznamki, ~SPC /~ za ripgrep rekurzivno iskanje po vsebini datotek (potrebuje nameščen ~ripgrep~!).
|
||||
|
||||
@TODO raziskat več o morebitno uporabni ~consult~ funkcionalnosti.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package swiper
|
||||
:config
|
||||
(global-set-key "\C-s" 'swiper))
|
||||
#+end_src
|
||||
|
||||
~counsel~ pa nudi kup zamenjav privzetih emacs ukazov/operacij za prijetnejša opravila. Nastavimo nekaj bližnjic za njih. Recimo ~M-x~ menjava ki kaže predoglede v minibuferju, ~SPC RET~ za shranjevanje in menjavo med zaznamki, ~SPC /~ za ripgrep rekurzivno iskanje po vsebini datotek (potrebuje nameščen ~ripgrep~!).
|
||||
|
||||
@TODO zamenjamo raje s ~consult~?
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package counsel
|
||||
(use-package consult
|
||||
:config
|
||||
(general-define-key
|
||||
;(global-set-key (kbd "M-x") 'counsel-M-x)
|
||||
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
|
||||
(global-set-key (kbd "<f1> f") 'counsel-describe-function)
|
||||
(global-set-key (kbd "<f1> v") 'counsel-describe-variable)
|
||||
(global-set-key (kbd "<f1> o") 'counsel-describe-symbol)
|
||||
(global-set-key (kbd "<f1> l") 'counsel-find-library)
|
||||
(global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
|
||||
(global-set-key (kbd "<f2> u") 'counsel-unicode-char)
|
||||
(global-set-key (kbd "C-c g") 'counsel-git)
|
||||
(global-set-key (kbd "C-c j") 'counsel-git-grep)
|
||||
(global-set-key (kbd "C-c k") 'counsel-ag)
|
||||
(global-set-key (kbd "C-x l") 'counsel-locate)
|
||||
(define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history)
|
||||
"C-s" 'consult-line
|
||||
"C-c j" 'consult-git-grep
|
||||
"C-c k" 'consult-ag
|
||||
"C-x l" 'consult-locate)
|
||||
(start/leader-keys
|
||||
"RET" 'counsel-bookmark
|
||||
"/" 'counsel-projectile-rg)
|
||||
"RET" 'consult-bookmark
|
||||
"/" 'consult-ripgrep
|
||||
"b b" 'consult-buffer
|
||||
"f r" 'consult-recent-file :wk "nedavno odprto")
|
||||
#+end_src
|
||||
|
||||
~counsel-M-x~ poganjalnik ukazov doplnimo s paketom ~smex~ za prikazovanje nedavno uporabljenih ukazov pri vrhu.
|
||||
|
@ -505,10 +492,9 @@ Nekoliko bolj prijazen elisp REPL, ki ima med drugim zgodovino.
|
|||
";" 'ielm)
|
||||
:config
|
||||
(advice-add 'ielm-send-input :after 'g-ielm-write-history)
|
||||
(define-key inferior-emacs-lisp-mode-map (kbd "C-l")
|
||||
'comint-clear-buffer)
|
||||
(define-key inferior-emacs-lisp-mode-map (kbd "C-r")
|
||||
'helm-comint-input-ring))
|
||||
(general-define-key
|
||||
:keymaps 'inferior-emacs-list-mode-map
|
||||
"C-l" 'comint-clear-buffer)
|
||||
#+end_src
|
||||
|
||||
* ORG
|
||||
|
|
|
@ -81,6 +81,32 @@
|
|||
'("ba323a013c25b355eb9a0550541573d535831c557674c8d59b9ac6aa720c21d3"
|
||||
default))
|
||||
'(helm-minibuffer-history-key "M-p")
|
||||
'(package-selected-packages
|
||||
'(a arduino-mode benchmark-init bui cider company consult
|
||||
counsel-projectile crdt dashboard diminish direnv doom-modeline
|
||||
drupal-mode editorconfig evil-collection evil-org
|
||||
extempore-mode faceup fluxus-mode flycheck format-all geben
|
||||
geiser-guile general gruvbox-theme helm helpful htmlize jq-mode
|
||||
list-utils loop lsp-mode magit magit-popup marginalia mu4e
|
||||
mu4e-dashboard mu4e-marker-icons nerd-icons-completion
|
||||
nyan-mode ob-mermaid openwith orderless org-bullets org-caldav
|
||||
org-present org-projectile page-break-lines paredit pkg-info
|
||||
pos-tip pretty-sha-path pyvenv racket-mode rainbow-delimiters
|
||||
restclient rjsx-mode sclang-extensions shut-up slime
|
||||
smartparens smex subed svg-icon tidal toml-mode
|
||||
treemacs-projectile treesit-auto undo-tree use-package vertico
|
||||
vue-mode w3m web-beautify web-mode which-key writeroom-mode
|
||||
yaml-mode zone-nyan))
|
||||
'(package-vc-selected-packages
|
||||
'((svg-icon :url "https://github.com/rougier/emacs-svg-icon")))
|
||||
'(sclang-indent-level 2))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(org-document-title ((t (:inherit default :weight bold :family "Sans Serif" :height 2.0 :underline nil))))
|
||||
'(org-level-1 ((t (:inherit default :weight bold :family "Sans Serif" :height 1.75))))
|
||||
'(org-level-2 ((t (:inherit default :weight bold :family "Sans Serif" :height 1.45))))
|
||||
'(org-level-3 ((t (:inherit default :weight bold :family "Sans Serif" :height 1.25))))
|
||||
'(org-level-4 ((t (:inherit default :weight bold :family "Sans Serif" :height 1.1)))))
|
||||
|
|
Loading…
Reference in New Issue