summaryrefslogtreecommitdiff
path: root/.nvimrc
blob: 745649ecde2a1b13748bae23aae9ec5f02d9d35d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
" insert fancy signifiers with abbrevs
iabbrev todo ·
iabbrev done ×

" select the task list and hit `gq` to sort and group by status
set formatprg=sort\ -V

" syntax highlighting
augroup JournalSyntax
    autocmd!
    autocmd BufReadPost * set filetype=journal

    autocmd BufReadPost * syntax match JournalAll /.*/                 " captures the entire buffer
    autocmd BufReadPost * syntax match JournalDone /^×.*/              " lines containing 'done' items:  ×
    autocmd BufReadPost * syntax match JournalTodo /^·.*/              " lines containing 'todo' items:  ·
    autocmd BufReadPost * syntax match JournalEvent /^o.*/             " lines containing 'event' items: o
    autocmd BufReadPost * syntax match JournalNote /^- .*/             " lines containing 'note' items:  -
    autocmd BufReadPost * syntax match JournalMoved /^>.*/             " lines containing 'moved' items: >
    autocmd BufReadPost * syntax match JournalHeader /^\<\u\+\>.*/     " lines starting with caps

    autocmd BufReadPost * highlight JournalAll    ctermfg=12
    autocmd BufReadPost * highlight JournalHeader ctermfg=12
    autocmd BufReadPost * highlight JournalDone   ctermfg=12
    autocmd BufReadPost * highlight JournalEvent  ctermfg=6               " cyan
    autocmd BufReadPost * highlight JournalMoved  ctermfg=5               " pink
    autocmd BufReadPost * highlight JournalNote   ctermfg=3               " yellow
    autocmd BufReadPost * highlight VertSplit     ctermfg=0  ctermbg=0    " hide vert splits
augroup END

augroup JournalHideUIElements
    autocmd!
    " hide junk
    autocmd VimEnter * set laststatus=0
    autocmd VimEnter * set noruler nonumber nocursorline nocursorcolumn norelativenumber

    " pin scrolling
    autocmd VimEnter * set scrollbind

augroup END

syntax on