Slacker News Slacker News logo featuring a lazy sloth with a folded newspaper hat
  • top
  • new
  • show
  • ask
  • jobs
Library
← Back to context

Comment by omnster

17 hours ago

You can perhaps use `strftime` instead of `trim(system('date ..))`:

   inoremap <Leader>date <C-r>=strftime("%a %B %e, %Y %H:%M:%S %p")<CR>
   nnoremap <Leader>date :put=strftime("%a %B %e, %Y %H:%M:%S %p")<CR>

I am also not sure if an `<esc>` is really necessary at the end of your normal mode map.

0 comments

omnster

Reply

No comments yet

Contribute on Hacker News ↗

Slacker News

Product

  • API Reference
  • Hacker News RSS
  • Source on GitHub

Community

  • Support Ukraine
  • Equal Justice Initiative
  • GiveWell Charities