Simple Text indentation support minor mode.
cd ~/.emacs.d
git clone [email protected]:izawa/log-mode.git
(let ((default-directory "~/.emacs.d/"))
(normal-top-level-add-subdirs-to-load-path))
(require 'log-mode)
If you want to bind Hot-keys, add setting lines like below.
; Shift-Tab: back indent level
(define-key log-mode-map [S-tab] 'log-mode-tab-back)
; Ctrl-Return: raw CR
(define-key log-mode-map [C-return] 'log-mode-raw-return)
; set indent prefix as you like.
(setq log-mode-indent-prefix-list [
"* " ; level 1
" + " ; level 2
" # " ; level 3
" - " ; level 4
" o " ; level 5
" * " ; level 6
])
If you using filladapt.el, you can use log-mode-hook to regist indent-prefix into filladapt-token-table as "bullet".
(add-hook 'log-mode-hook
(lambda ()
(filladapt-mode)
(let ((len (length log-mode-indent-prefix-list))
(i 0))
(while (< i len)
(pushnew (cons (aref log-mode-indent-prefix-list i) (cons 'bullet nil)) filladapt-token-table)
(setq i (1+ i))))))
type M-x log-mode
###key bindings:
- Tab: insert indent prefix, or increment indent level (like a PowerPoint).
- Shift-Tab: decrement indent level.
- C-c C-a: insert log-header.