Skip to main content
added 81 characters in body
Source Link
JJoao
  • 581
  • 4
  • 10

One powerful function of vim is piping an area thru an external command.

(I think this is not what you are looking for, but, just for the record):

:%!awk -F: '{a=$2*60+$1} END {printf("\%d:\%d"\%02d",a/60,a\%60)}' 

\thanks{Wildcard} for pointing out the "10:09" problem and solution

One powerful function of vim is piping an area thru an external command.

(I think this is not what you are looking for, but, just for the record):

:%!awk -F: '{a=$2*60+$1} END {printf("\%d:\%d",a/60,a\%60)}' 

One powerful function of vim is piping an area thru an external command.

(I think this is not what you are looking for, but, just for the record):

:%!awk -F: '{a=$2*60+$1} END {printf("\%d:\%02d",a/60,a\%60)}' 

\thanks{Wildcard} for pointing out the "10:09" problem and solution

added 79 characters in body
Source Link
JJoao
  • 581
  • 4
  • 10

IOne powerful function of vim is piping an area thru an external command.

(I think this is not what you are looking for, but, just for the record):

:%!awk -F: '{a=$2*60+$1} END {printf("\%d:\%d",a/60,a\%60)}' 

I think this is not what you are looking for, but, just for the record:

:%!awk -F: '{a=$2*60+$1} END {printf("\%d:\%d",a/60,a\%60)}' 

One powerful function of vim is piping an area thru an external command.

(I think this is not what you are looking for, but, just for the record):

:%!awk -F: '{a=$2*60+$1} END {printf("\%d:\%d",a/60,a\%60)}' 
edited body
Source Link
JJoao
  • 581
  • 4
  • 10

I think this is not what you are looking frofor, but, just for the record:

:%!awk -F: '{a=$2*60+$1} END {printf("\%d:\%d",a/60,a\%60)}' 

I think this is not what you are looking fro, but, just for the record:

:%!awk -F: '{a=$2*60+$1} END {printf("\%d:\%d",a/60,a\%60)}' 

I think this is not what you are looking for, but, just for the record:

:%!awk -F: '{a=$2*60+$1} END {printf("\%d:\%d",a/60,a\%60)}' 
deleted 1 character in body
Source Link
JJoao
  • 581
  • 4
  • 10
Loading
Source Link
JJoao
  • 581
  • 4
  • 10
Loading