Skip to content
A ChangeLog for Vim
HTML Python CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Hello, world! Aug 19, 2019
README.markdown
all.css Remove unused font Aug 20, 2019
gen.py Regen Aug 20, 2019
index.html Remove unused font Aug 20, 2019
tpl.html

README.markdown

Source code for https://arp242.net/vimlog

Add new patches to gen.py, change the HTML in tpl.html. The index.html file is generated and shouldn't be changed directly.

Also useful: https://github.com/tweekmonster/helpful.vim

Useful maps:

augroup gitlog
    au FileType git
            "\ Go to commit.
            \  nnoremap <Leader>g :exe printf(":!cd ~/src/vim && git diff %s^\\!", split(getline('.'), ' ')[1])<CR>
            "\ Delete commit.
            \| nnoremap <Leader>d :call search('^commit ', 'bc') \| :exe 'd' . (search('^commit ', 'n') - line('.'))<CR>
            "\ Format commit.
            \| nnoremap <Leader>f :call <SID>format_commit()<CR>
augroup end

fun! s:format_commit()
    call search('^commit ', 'bc')
    silent normal! ms4j^w"vdt:

    call search('Solution: ')
    silent normal! f:llm<
    call search('^$')
    silent normal! k$m>gv"dd
    let @d = substitute(@d, '[\r\n ]\+', ' ', 'g')
    let l:end = line('.')
    normal! 'sd
    silent exe 'd' . (l:end - line('.') - 1)

    call setline('.', printf("[\"%s\", ['%s'],", trim(@d), trim(@v)))
    call setline(line('.') + 1, "    ''' '''],")

    call search('^commit ', '')
endfun
You can’t perform that action at this time.