Reconfigure ivy-bibtex for my current needs.

This commit is contained in:
2022-01-17 13:23:01 +00:00
parent 0a35af94d3
commit 5d9a1b72b1
2 changed files with 15 additions and 8 deletions

View File

@@ -4,6 +4,7 @@
;; Begginer configuration
(setq ivy-count-format "(%d/%d) ")
;; keybindings
(global-set-key (kbd "C-s") 'swiper)
(global-set-key (kbd "M-x") 'counsel-M-x)
(global-set-key (kbd "C-x C-f") 'counsel-find-file)
@@ -12,27 +13,33 @@
;(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 "<f2>") 'ivy-bibtex)
;; ivy-bibtex
(setq bibtex-completion-bibliography
'("~/repos/csphy/pesquisa/vis.bib"))
'("~/repos/research/bibliography.bib"))
;; where are the pdfs
(setq bibtex-completion-library-path
'("~/repos/csphy/pesquisa/vis"))
'("~/repos/research/papers"))
;; where are the notes
(setq bibtex-completion-notes-path "~/repos/csphy/pesquisa/paper-notes.org")
(setq bibtex-completion-notes-path "~/repos/research/paper-notes.org")
;; some handy visual markers
(setq bibtex-completion-pdf-symbol "")
(setq bibtex-completion-notes-symbol "")
;; open pdfs in mupdf
(setq bibtex-completion-pdf-open-function
(lambda (fpath)
(call-process "mupdf" nil 0 nil fpath)))
;(setq bibtex-completion-pdf-open-function
; (lambda (fpath)
; (call-process "mupdf" nil 0 nil fpath)))
;; use firefox (Comment this if you want seamonkey)
;add actions to end of default actions list
(ivy-add-actions
'ivy-bibtex
'(("c" ivy-bibtex-insert-citation "Insert reference" ivy-bibtex-insert-citation)))
;; use firefox as default browser
(setq bibtex-completion-browser-function
(lambda (url _) (start-process "firefox" "*firefox*" "firefox" url)))

View File

@@ -6,7 +6,7 @@
(global-set-key (kbd "<kp-0>") 'delete-window)
(global-set-key (kbd "<kp-1>") 'delete-other-windows)
(global-set-key (kbd "<kp-2>") 'split-window-below)
(global-set-key (kbd "<kp-3>") 'ivy-bibtex)
;(global-set-key (kbd "<kp-3>") 'ivy-bibtex)