journaling system cobbled together with nix, vim, coreutils
at main 1.8 kB view raw
1" insert fancy signifiers with abbrevs 2iabbrev todo · 3iabbrev done × 4 5" select the task list and hit `gq` to sort and group by status 6set formatprg=sort\ -V 7 8" syntax highlighting 9augroup JournalSyntax 10 autocmd! 11 autocmd BufReadPost * set filetype=journal 12 13 autocmd BufReadPost * syntax match JournalAll /.*/ " captures the entire buffer 14 autocmd BufReadPost * syntax match JournalDone /^×.*/ " lines containing 'done' items: × 15 autocmd BufReadPost * syntax match JournalTodo /^·.*/ " lines containing 'todo' items: · 16 autocmd BufReadPost * syntax match JournalEvent /^o.*/ " lines containing 'event' items: o 17 autocmd BufReadPost * syntax match JournalNote /^- .*/ " lines containing 'note' items: - 18 autocmd BufReadPost * syntax match JournalMoved /^>.*/ " lines containing 'moved' items: > 19 autocmd BufReadPost * syntax match JournalHeader /^\<\u\+\>.*/ " lines starting with caps 20 21 autocmd BufReadPost * highlight JournalAll ctermfg=12 22 autocmd BufReadPost * highlight JournalHeader ctermfg=12 23 autocmd BufReadPost * highlight JournalDone ctermfg=12 24 autocmd BufReadPost * highlight JournalEvent ctermfg=6 " cyan 25 autocmd BufReadPost * highlight JournalMoved ctermfg=5 " pink 26 autocmd BufReadPost * highlight JournalNote ctermfg=3 " yellow 27 autocmd BufReadPost * highlight VertSplit ctermfg=0 ctermbg=0 " hide vert splits 28augroup END 29 30augroup JournalHideUIElements 31 autocmd! 32 " hide junk 33 autocmd VimEnter * set laststatus=0 34 autocmd VimEnter * set noruler nonumber nocursorline nocursorcolumn norelativenumber 35 36 " pin scrolling 37 autocmd VimEnter * set scrollbind 38 39augroup END 40 41syntax on