Skip to content

Commit

Permalink
Initialized repo, added README, and first version of taskpaper.el (on…
Browse files Browse the repository at this point in the history
…ly features crude syntax highlightning for now)
  • Loading branch information
jedthehumanoid committed May 14, 2011
0 parents commit de350be
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Taskpaper major mode for emacs.

Put taskpaper.el file somewhere (for instance in ~/emacs.d/taskpaper.el)
In .emacs, add:
(load-file "~/taskpaper.el/taskpaper.el")
(require 'taskpaper-mode)
Load taskpaper-mode when you are in a buffer editing a taskpaper textfile

34 changes: 34 additions & 0 deletions taskpaper.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
(defvar taskpaper-mode-map nil "Keymap for taskpaper-mode")
(when (not taskpaper-mode-map)
(setq taskpaper-mode-map (make-sparse-keymap))
(define-key taskpaper-mode-map (kbd "<S-return>") 'taskpaper-focus-project)
)

(setq tpKeywords
'(
(".*@done.*" . font-lock-comment-face)
(".*:$" . font-lock-function-name-face)
("^ *[^- ].*[^:]$" . font-lock-comment-face)
("@.*" . font-lock-variable-name-face)

)
)
(defun taskpaper-mode ()
"Major mode for editing taskpaper styled files."
(interactive)
(kill-all-local-variables)

(setq major-mode 'taskpaper-mode)
(setq mode-name "Taskpaper") ; for display purposes in mode line
(use-local-map taskpaper-mode-map)

(setq font-lock-defaults '(tpKeywords))


(toggle-truncate-lines t)

;; ... other code here

(run-hooks 'taskpaper-mode-hook))

(provide 'taskpaper-mode)

0 comments on commit de350be

Please sign in to comment.