mirror of
https://github.com/foo-dogsquared/dotfiles.git
synced 2025-02-07 12:19:02 +00:00
Update editor configs
This commit is contained in:
parent
932a81aa81
commit
233e6bac4e
@ -219,7 +219,7 @@ mouse:
|
|||||||
# If this is `true`, the cursor is temporarily hidden when typing.
|
# If this is `true`, the cursor is temporarily hidden when typing.
|
||||||
hide_when_typing: false
|
hide_when_typing: false
|
||||||
|
|
||||||
url:
|
hints:
|
||||||
# URL launcher
|
# URL launcher
|
||||||
#
|
#
|
||||||
# This program is executed when clicking on a text which is recognized as a URL.
|
# This program is executed when clicking on a text which is recognized as a URL.
|
||||||
|
@ -32,11 +32,6 @@
|
|||||||
|
|
||||||
(defvar my/wiki-asset-directory-name "assets")
|
(defvar my/wiki-asset-directory-name "assets")
|
||||||
|
|
||||||
(defun align-non-space (BEG END)
|
|
||||||
"Align non-space columns in region BEG END."
|
|
||||||
(interactive "r")
|
|
||||||
(align-regexp BEG END "\\(\\s-*\\)\\S-+" 1 1 t))
|
|
||||||
|
|
||||||
(defun my/create-assets-folder ()
|
(defun my/create-assets-folder ()
|
||||||
"A quick convenient function to create an assets folder in the wiki folder."
|
"A quick convenient function to create an assets folder in the wiki folder."
|
||||||
(interactive)
|
(interactive)
|
||||||
@ -95,11 +90,15 @@
|
|||||||
|
|
||||||
("l" "literature" plain "%?"
|
("l" "literature" plain "%?"
|
||||||
:if-new
|
:if-new
|
||||||
(file+head ,(f-join "literature" "%<%Y-%m-%d-%H-%M-%S>")"#+title: ${title}
|
(file+head ,(f-join "literature" "%<%Y-%m-%d-%H-%M-%S>.org") "#+title: ${title}
|
||||||
#+date: \"%<%Y-%m-%d %T %:z>\"
|
#+date: \"%<%Y-%m-%d %T %:z>\"
|
||||||
#+date_modified: \"%<%Y-%m-%d %T %:z>\"
|
#+date_modified: \"%<%Y-%m-%d %T %:z>\"
|
||||||
#+language: en")
|
#+language: en")
|
||||||
:unnarrowed t))
|
:unnarrowed t)
|
||||||
|
|
||||||
|
("d" "dailies" entry "* %?"
|
||||||
|
:if-new
|
||||||
|
(file+head ,(expand-file-name "%<%Y-%m-%d>.org" org-roam-dailies-directory) "#+title: %<%Y-%m-%d>\n")))
|
||||||
|
|
||||||
org-roam-dailies-capture-templates `(("d" "default" entry "* %?"
|
org-roam-dailies-capture-templates `(("d" "default" entry "* %?"
|
||||||
:if-new
|
:if-new
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#+title: tools/wiki
|
#+title: tools/wiki
|
||||||
#+date: "2021-05-05 00:27:26 +08:00"
|
#+date: "2021-05-05 00:27:26 +08:00"
|
||||||
#+date_modified: "2021-05-05 01:52:39 +08:00"
|
#+date_modified: "2021-05-08 12:28:46 +08:00"
|
||||||
#+language: en
|
#+language: en
|
||||||
|
|
||||||
|
|
||||||
@ -8,14 +8,16 @@
|
|||||||
* Description
|
* Description
|
||||||
|
|
||||||
This module set up my personal wiki configuration with Emacs primarily with org-roam.
|
This module set up my personal wiki configuration with Emacs primarily with org-roam.
|
||||||
|
Just like Emacs itself, tried my best to make it fully configurable.
|
||||||
The setup uses org-roam v2.
|
The setup uses org-roam v2.
|
||||||
|
|
||||||
|
|
||||||
** Module flags
|
** Module flags
|
||||||
|
|
||||||
- ~+anki~ enables Anki cards editing with [[https://github.com/louietan/anki-editor/][anki-editor]].
|
- ~+anki~ enables Anki cards editing with [[https://github.com/louietan/anki-editor/][anki-editor]].
|
||||||
- ~+markdown~ adds Markdown support in org-roam.
|
- ~+biblio~ enables reference management with [[https://github.com/jkitchin/org-ref][org-ref]].
|
||||||
- ~+dendron~ adds [[https://dendron.so/][Dendron]]-inspired features with [[https://github.com/vicrdguez/dendroam][dendroam]].
|
- ~+dendron~ adds [[https://dendron.so/][Dendron]]-inspired features with [[https://github.com/vicrdguez/dendroam][dendroam]].
|
||||||
|
- ~+markdown~ adds Markdown support in org-roam.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -25,6 +27,7 @@ The setup uses org-roam v2.
|
|||||||
- [[https://github.com/louietan/anki-editor/][anki-editor]]
|
- [[https://github.com/louietan/anki-editor/][anki-editor]]
|
||||||
- [[https://github.com/vicrdguez/dendroam][dendroam]]
|
- [[https://github.com/vicrdguez/dendroam][dendroam]]
|
||||||
- [[https://github.com/nobiot/md-roam][md-roam]]
|
- [[https://github.com/nobiot/md-roam][md-roam]]
|
||||||
|
- [[https://github.com/jkitchin/org-ref][org-ref]]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,26 +9,6 @@
|
|||||||
;;; Code:
|
;;; Code:
|
||||||
(defvar +wiki-directory "~/wiki")
|
(defvar +wiki-directory "~/wiki")
|
||||||
|
|
||||||
(defvar +anki-cards-directory-name "cards")
|
|
||||||
(defvar +structured-notes-directory-name "structured")
|
|
||||||
|
|
||||||
(defvar +anki-cards-directory (f-join +wiki-directory +anki-cards-directory-name))
|
|
||||||
(defvar +structured-notes-directory (f-join +wiki-directory +structured-notes-directory-name))
|
|
||||||
|
|
||||||
(defun +anki-editor-push-all-notes-to-anki ()
|
|
||||||
(interactive)
|
|
||||||
(anki-editor-push-notes nil nil (directory-files-recursively +anki-cards-directory "\\.*org" nil)))
|
|
||||||
|
|
||||||
(defun +anki-editor-reset-note () "Reset the Anki note in point by deleting the note ID and the deck."
|
|
||||||
(interactive)
|
|
||||||
(org-entry-delete (point) anki-editor-prop-note-id)
|
|
||||||
(org-entry-delete (point) anki-editor-prop-deck))
|
|
||||||
|
|
||||||
(defun +anki-editor-reset-all-notes ()
|
|
||||||
"Reset the Anki notes in the current buffer by deleting the note ID and the deck."
|
|
||||||
(interactive)
|
|
||||||
(anki-editor-map-note-entries #'+anki-editor-reset-note))
|
|
||||||
|
|
||||||
(use-package! org-roam
|
(use-package! org-roam
|
||||||
:hook (org-load . org-roam-mode)
|
:hook (org-load . org-roam-mode)
|
||||||
:commands
|
:commands
|
||||||
@ -66,7 +46,22 @@
|
|||||||
org-roam-dailies-directory (f-join +wiki-directory "daily"))
|
org-roam-dailies-directory (f-join +wiki-directory "daily"))
|
||||||
(org-roam-setup))
|
(org-roam-setup))
|
||||||
|
|
||||||
(use-package! anki-editor
|
(when (featurep! +anki)
|
||||||
|
(defvar +anki-cards-directory-name "cards")
|
||||||
|
(defvar +anki-cards-directory (f-join +wiki-directory +anki-cards-directory-name))
|
||||||
|
(defun +anki-editor-push-all-notes-to-anki ()
|
||||||
|
(interactive)
|
||||||
|
(anki-editor-push-notes nil nil (directory-files-recursively +anki-cards-directory "\\.*org" nil)))
|
||||||
|
(defun +anki-editor-reset-note ()
|
||||||
|
"Reset the Anki note in point by deleting the note ID and the deck."
|
||||||
|
(interactive)
|
||||||
|
(org-entry-delete (point) anki-editor-prop-note-id)
|
||||||
|
(org-entry-delete (point) anki-editor-prop-deck))
|
||||||
|
(defun +anki-editor-reset-all-notes ()
|
||||||
|
"Reset the Anki notes in the current buffer by deleting the note ID and the deck."
|
||||||
|
(interactive)
|
||||||
|
(anki-editor-map-note-entries #'+anki-editor-reset-note))
|
||||||
|
(use-package! anki-editor
|
||||||
:hook (org-mode . anki-editor-mode)
|
:hook (org-mode . anki-editor-mode)
|
||||||
:preface
|
:preface
|
||||||
(defvar +wiki-directory nil)
|
(defvar +wiki-directory nil)
|
||||||
@ -84,12 +79,15 @@
|
|||||||
"D" #'+anki-editor-reset-all-notes))
|
"D" #'+anki-editor-reset-all-notes))
|
||||||
:config
|
:config
|
||||||
(setq anki-editor-create-decks 't
|
(setq anki-editor-create-decks 't
|
||||||
+anki-cards-directory (f-join +wiki-directory +anki-cards-directory-name)))
|
+anki-cards-directory (f-join +wiki-directory +anki-cards-directory-name))))
|
||||||
|
|
||||||
(use-package! dendroam
|
(when (featurep! +dendron)
|
||||||
|
(defvar +structured-notes-directory-name "structured")
|
||||||
|
(defvar +structured-notes-directory (f-join +wiki-directory +structured-notes-directory-name))
|
||||||
|
(use-package! dendroam
|
||||||
:after org-roam
|
:after org-roam
|
||||||
:preface (defvar +wiki-directory nil)
|
:preface (defvar +wiki-directory nil)
|
||||||
:config
|
:config
|
||||||
(setq +structured-notes-directory (f-join +wiki-directory +structured-notes-directory-name)))
|
(setq +structured-notes-directory (f-join +wiki-directory +structured-notes-directory-name))))
|
||||||
|
|
||||||
;;; config.el ends here
|
;;; config.el ends here
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
(package! org-roam
|
(package! org-roam
|
||||||
:recipe (:host github :repo "org-roam/org-roam" :branch "v2"))
|
:recipe (:host github :repo "org-roam/org-roam" :branch "v2"))
|
||||||
|
|
||||||
|
(when (featurep! +biblio)
|
||||||
|
(package! org-ref
|
||||||
|
:recipe (:host github :repo "jkitchin/org-ref")))
|
||||||
|
|
||||||
(when (featurep! +anki)
|
(when (featurep! +anki)
|
||||||
(package! anki-editor
|
(package! anki-editor
|
||||||
:recipe (:host github
|
:recipe (:host github
|
||||||
|
@ -48,6 +48,9 @@ endif
|
|||||||
|
|
||||||
let g:deoplete#enable_at_startup = 1
|
let g:deoplete#enable_at_startup = 1
|
||||||
|
|
||||||
|
" A linting engine and an LSP client.
|
||||||
|
Plug 'dense-analysis/ale'
|
||||||
|
|
||||||
" One of the most popular plugins.
|
" One of the most popular plugins.
|
||||||
" Allows to create more substantial status bars.
|
" Allows to create more substantial status bars.
|
||||||
Plug 'vim-airline/vim-airline'
|
Plug 'vim-airline/vim-airline'
|
||||||
|
Loading…
Reference in New Issue
Block a user