How do I insert current time into a file using vim

前端 未结 3 1331
终归单人心
终归单人心 2021-01-01 03:42

I\'m just logging some work as I do it, each line being an action, I will be trying to do this every few minutes. Is there a trick way of inserting date/time something like

3条回答
  •  醉梦人生
    2021-01-01 04:13

    See here

    Press F5 in normal mode or in insert mode to insert the current datestamp:

    :nnoremap  "=strftime("%c")P
    :inoremap  =strftime("%c")
    

提交回复
热议问题