Skip to content

Adding date time in vim.

Posted on:26 August 2023 at 10:46

Often times you need to add date time while you are authoring content or comments to your code. Vim ships with strftime method. You can use that while in insert-mode, C-r=strftime(%F %T)`

Thats it. You can always add a keyboard shortcut. Inserting

Link to further options strftime