Today I Learned
Ask or search…
⌃K
Links
Comment on page

Sum column values in Vim

  1. 1.
    Visually select your column
  2. 2.
    Enter into command mode & enter
    :'<,'>!awk '{print; sum+=$1}; END {print "Total: "sum}'