Update todotxt config
- new storage location - new binding - fix autoloads - function to open sub lists
This commit is contained in:
parent
408a9dfdde
commit
83c6ce3f2f
@ -345,10 +345,15 @@
|
|||||||
(smart-tabs-insinuate 'c 'c++ 'javascript))
|
(smart-tabs-insinuate 'c 'c++ 'javascript))
|
||||||
|
|
||||||
(use-package todotxt-mode
|
(use-package todotxt-mode
|
||||||
|
:commands (todotxt-open-file todotxt-mode)
|
||||||
|
:bind ("C-c t" . todotxt-open-file)
|
||||||
|
:init
|
||||||
|
(setq todotxt-base-path (expand-file-name "~/Documents/todo")
|
||||||
|
todotxt-default-file (concat todotxt-base-path "/todo.txt")
|
||||||
|
todotxt-default-archive-file (concat todotxt-base-path "/done.txt"))
|
||||||
|
(add-to-list 'auto-mode-alist `(,(concat todotxt-base-path "/.*\\.txt$") . todotxt-mode))
|
||||||
:config
|
:config
|
||||||
(setq todotxt-default-file (expand-file-name "~/Sync/todo/todo.txt")
|
(setq todotxt-due-tag "due"
|
||||||
todotxt-default-archive-file (expand-file-name "~/Sync/todo/done.txt")
|
|
||||||
todotxt-due-tag "due"
|
|
||||||
todotxt-mode-keywords
|
todotxt-mode-keywords
|
||||||
'(("^x .*$" 0 '(:foreground "gray80" :strike-through t))
|
'(("^x .*$" 0 '(:foreground "gray80" :strike-through t))
|
||||||
("^(A) " 0 '(:foreground "red"))
|
("^(A) " 0 '(:foreground "red"))
|
||||||
@ -364,7 +369,13 @@
|
|||||||
("#waiting" 0 '(:foreground "dark orange")) ; special tag
|
("#waiting" 0 '(:foreground "dark orange")) ; special tag
|
||||||
("#\\w+" . font-lock-comment-face)
|
("#\\w+" . font-lock-comment-face)
|
||||||
("-\\([a-zA-Z_-]+\\)" . font-lock-variable-name-face)
|
("-\\([a-zA-Z_-]+\\)" . font-lock-variable-name-face)
|
||||||
("^[0-9]+-[0-9]+-[0-9]+" 0 '(:foreground "gray90")))))
|
("^[0-9]+-[0-9]+-[0-9]+" 0 '(:foreground "gray90"))))
|
||||||
|
(defun todotxt-open-sub ()
|
||||||
|
"Opens the todotxt sub on current line"
|
||||||
|
(interactive)
|
||||||
|
(let ((line (thing-at-point 'line t)))
|
||||||
|
(string-match "\\([^ ]+\\)/:\\([.A-Za-z0-9_]+\\)" line)
|
||||||
|
(find-file (concat (match-string 1 line) "/" (match-string 2 line))))))
|
||||||
|
|
||||||
(use-package latex
|
(use-package latex
|
||||||
:bind (:map LaTeX-mode-map
|
:bind (:map LaTeX-mode-map
|
||||||
|
Loading…
Reference in New Issue
Block a user