Notes & TILs
Search…
Sum column values in Vim
  1. 1.
    Visually select your column
  2. 2.
    Enter into command mode & enter
    1
    :'<,'>!awk '{print; sum+=$1}; END {print "Total: "sum}'
    Copied!
Last modified 1mo ago
Copy link