2015-12-02 14:23:39 +00:00
|
|
|
#+TITLE: Deft layer
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2019-05-02 21:49:30 +00:00
|
|
|
#+TAGS: layer|reader
|
|
|
|
|
2019-05-07 20:05:06 +00:00
|
|
|
* Table of Contents :TOC_5_gh:noexport:
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#description][Description]]
|
2018-02-01 20:25:36 +00:00
|
|
|
- [[#features][Features:]]
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#install][Install]]
|
|
|
|
- [[#layer][Layer]]
|
2020-02-10 18:47:00 +00:00
|
|
|
- [[#zetteldeft][Zetteldeft]]
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#configuration][Configuration]]
|
2018-12-05 03:03:03 +00:00
|
|
|
- [[#key-bindings][Key bindings]]
|
2020-02-10 18:47:00 +00:00
|
|
|
- [[#zetteldeft-key-bindings][Zetteldeft key bindings]]
|
|
|
|
- [[#global][Global]]
|
|
|
|
- [[#org-mode][Org-mode]]
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Description
|
2018-02-01 20:25:36 +00:00
|
|
|
This layer adds a search driven note taking system into Spacemacs.
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2018-02-01 20:25:36 +00:00
|
|
|
** Features:
|
2019-06-01 17:13:30 +00:00
|
|
|
- Browsing and creating notes with a powerful search function via [[http://jblevins.org/projects/deft/][Deft]].
|
2018-02-01 20:25:36 +00:00
|
|
|
- Integration of =org-mode= as note editor.
|
|
|
|
- Configurable list of extensions to recognize as notes.
|
2020-02-10 18:47:00 +00:00
|
|
|
- Zettelkasten system with [[https://github.com/EFLS/zetteldeft][zetteldeft]]
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Install
|
|
|
|
** Layer
|
2016-01-06 05:21:55 +00:00
|
|
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
|
|
add =deft= to the existing =dotspacemacs-configuration-layers= list in this
|
|
|
|
file.
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2020-02-10 18:47:00 +00:00
|
|
|
** Zetteldeft
|
|
|
|
Zetteldeft support is included with the layer. To enable it, set the layer variable ~deft-zetteldeft~ to ~t~:
|
|
|
|
|
|
|
|
#+BEGIN_SRC elisp
|
2020-02-22 10:39:46 +00:00
|
|
|
(deft :variables deft-zetteldeft t)
|
2020-02-10 18:47:00 +00:00
|
|
|
#+END_SRC
|
|
|
|
|
2015-06-10 16:44:30 +00:00
|
|
|
** Configuration
|
|
|
|
By default deft tries to put notes in =~/.deft= but you can change
|
2018-02-01 20:25:36 +00:00
|
|
|
this in your =dotspacemacs/user-config= function:
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2015-06-10 21:16:01 +00:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
2018-09-19 03:54:47 +00:00
|
|
|
(setq deft-directory "~/Dropbox/notes")
|
2015-06-10 16:44:30 +00:00
|
|
|
#+END_SRC
|
|
|
|
|
2018-02-01 20:25:36 +00:00
|
|
|
By default =Deft= uses filenames for note titles and =org-mode= for editing.
|
|
|
|
The default extension for new notes is =org=. However also =md= and =txt=
|
|
|
|
files are recognized as notes. Which extensions are used for notes discovery
|
|
|
|
can be configured in your =dotfile=:
|
|
|
|
|
2018-09-19 03:54:47 +00:00
|
|
|
#+BEGIN_SRC emacs-lisp
|
2018-02-01 20:25:36 +00:00
|
|
|
(setq deft-extensions '("org" "md" "txt"))
|
|
|
|
#+END_SRC
|
|
|
|
|
|
|
|
Just add or substitute your preferred extension.
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
* Key bindings
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
| Key binding | Description |
|
2015-06-10 16:44:30 +00:00
|
|
|
|-------------+----------------------------------|
|
2020-06-28 21:25:04 +00:00
|
|
|
| ~SPC a r d~ | Open Deft (works globally) |
|
2020-02-10 18:47:00 +00:00
|
|
|
| ~SPC C d~ | Create new file (works globally) |
|
2017-04-21 03:21:09 +00:00
|
|
|
| ~SPC m c~ | Clear deft filter |
|
2015-06-10 21:16:01 +00:00
|
|
|
| ~SPC m d~ | Delete selected note |
|
|
|
|
| ~SPC m i~ | Toggle to regex search |
|
|
|
|
| ~SPC m n~ | Create new file with filter text |
|
2017-04-21 03:21:09 +00:00
|
|
|
| ~SPC m N~ | Create new file named |
|
|
|
|
| ~SPC m o~ | Deft open file in other window |
|
|
|
|
| ~SPC m r~ | Rename selected note |
|
2017-07-14 02:56:32 +00:00
|
|
|
| ~SPC m q~ | quit deft window |
|
2020-02-10 18:47:00 +00:00
|
|
|
|
|
|
|
** Zetteldeft key bindings
|
2020-02-22 10:39:46 +00:00
|
|
|
Zetteldeft key bindings will appear in a few different places as follows:
|
2020-02-10 18:47:00 +00:00
|
|
|
|
|
|
|
*** Global
|
|
|
|
|
2020-06-28 21:25:04 +00:00
|
|
|
| Key binding | Description |
|
|
|
|
|-----------------------------+----------------------------------|
|
|
|
|
| ~SPC C z~ / ~SPC a r d z n~ | New zetteldeft file |
|
|
|
|
| ~SPC a r d n~ | Open deft (replaces ~SPC a r d~) |
|
|
|
|
| ~SPC a r d z T~ | Show tag buffer |
|
|
|
|
| ~SPC a r d z s~ | Zetteldeft search-at-point |
|
|
|
|
| ~SPC a r d z o~ | Zetteldeft find file |
|
2020-02-10 18:47:00 +00:00
|
|
|
|
|
|
|
*** Org-mode
|
|
|
|
|
|
|
|
| Key binding | Description |
|
|
|
|
|-------------+--------------------------------------------|
|
|
|
|
| ~SPC m z c~ | Search for id of current file |
|
|
|
|
| ~SPC m z f~ | Follow link |
|
|
|
|
| ~SPC m z t~ | Tag search with avy |
|
|
|
|
| ~SPC m z N~ | New file and insert link |
|
|
|
|
| ~SPC m z r~ | Rename file |
|
|
|
|
| ~SPC m z i~ | Find a file and insert link |
|
|
|
|
| ~SPC m z I~ | Find a file and insert link with full name |
|
|
|
|
| ~SPC m z s~ | Search at point |
|
|
|
|
| ~SPC m z l~ | Link search with avy |
|
|
|
|
| ~SPC m z F~ | File search with avy on window |
|
|
|
|
| ~SPC m z o~ | Find file |
|