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))
|
||||
|
||||
(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
|
||||
(setq todotxt-default-file (expand-file-name "~/Sync/todo/todo.txt")
|
||||
todotxt-default-archive-file (expand-file-name "~/Sync/todo/done.txt")
|
||||
todotxt-due-tag "due"
|
||||
(setq todotxt-due-tag "due"
|
||||
todotxt-mode-keywords
|
||||
'(("^x .*$" 0 '(:foreground "gray80" :strike-through t))
|
||||
("^(A) " 0 '(:foreground "red"))
|
||||
@ -364,7 +369,13 @@
|
||||
("#waiting" 0 '(:foreground "dark orange")) ; special tag
|
||||
("#\\w+" . font-lock-comment-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
|
||||
:bind (:map LaTeX-mode-map
|
||||
|
Loading…
Reference in New Issue
Block a user