Move to :ui

This commit is contained in:
Patrick Elliott 2018-08-27 15:37:29 +02:00
parent 1655e84de2
commit 8508e931ca
No known key found for this signature in database
GPG key ID: 7CA109C3974AF5FA
3 changed files with 3 additions and 3 deletions

View file

@ -0,0 +1,11 @@
#+TITLE: :ui deft
[[https://jblevins.org/projects/deft/][Deft]] is a major mode for browsing and filtering notes written in plain text
formats, such as org-mode, markdown, and LaTeX.
To use this module, in your config file set the value of the variable ~deft-directory~ to the folder in which you
want to keep your notes.
The default note format is org-mode. You can change this by setting the value of
the variable ~deft-default-extension~. Changing the value to ~"md"~ for example,
will change the default note format to markdown.

32
modules/ui/deft/config.el Normal file
View file

@ -0,0 +1,32 @@
;;; ui/deft/config.el -*- lexical-binding: t; -*-
(def-package! deft
:commands deft
:init
(setq deft-extensions '("org" "md" "tex" "txt")
deft-default-extension "org"
;; de-couples filename and note title:
deft-use-filename-as-title nil
deft-use-filter-string-for-filename t
deft-org-mode-title-prefix t
;; converts the filter string into a readable file-name using kebab-case:
deft-file-naming-rules
'((noslash . "-")
(nospace . "-")
(case-fn . downcase)))
:config
;; start filtering immediately
(add-hook! 'deft-mode-hook '((evil-insert-state nil)))
(map! :map deft-mode-map
:localleader
:n "RET" #'deft-new-file-named
:n "a" #'deft-archive-file
:n "c" #'deft-filter-clear
:n "d" #'deft-delete-file
:n "f" #'deft-find-file
:n "g" #'deft-refresh
:n "l" #'deft-filter
:n "n" #'deft-new-file
:n "r" #'deft-rename-file
:n "s" #'deft-toggle-sort-method
:n "t" #'deft-toggle-incremental-search))

View file

@ -0,0 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; ui/deft/packages.el
(package! deft)