Skip to content

Instantly share code, notes, and snippets.

@seesleestak
Created February 17, 2018 16:37
Show Gist options
  • Save seesleestak/4ec88076f671295885b3cc63c2437702 to your computer and use it in GitHub Desktop.
Save seesleestak/4ec88076f671295885b3cc63c2437702 to your computer and use it in GitHub Desktop.
Convert time in git log timestamp to seconds vim macro

Description

Vim macro to take something like this:

Sun Feb 11 13:37:58 2018 -0800

And append the time as seconds at the end

Sun Feb 11 13:37:58 2018 -0800 49078

Macro

f ;;lve"jyf:lve"hy;lve"gyA <Ctrl-r>(@j*3600)+(@h*60)+(@g)<Ctrl-m>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment