Hacker News new | ask | show | jobs
by asimjalis 1764 days ago
I like this. Would love to see the details of how you do it. I too dislike adding dates to entries. My solution has been a vimscript snippet that inserts the current date. I have bound it to <C-l><C-d>

  fun! InsertDate()
    let l:line = getline('.')
    let l:date = strftime('%Y-%m-%d')
    call setline('.',strpart(l:line,0,col('.')).l:date.strpart(l:line,col('.')))
  endfun

  inoremap <C-l><C-d> <ESC>:call InsertDate()<CR>