Has a page

Crunch gets Crunchier with v2.0

Added on by Ryan Carney.

In early August I released Crunch, a easy way to perform calculations in Vim. I thought I had released a pretty complete plugin, and didn't feel it needed any improving. Marcelo Montu another member of the Vim community thought otherwise. He provided a lot of good ideas, and code to improve Crunch. More importantly he pushed me to make Crunch what it always should have been (better). Here's the short list of things we have accomplished in the transition from v1.0 to v2.0.


Sane Variables

In Crunch 1.0 variable declaration and usage involved the # symbol, and this was horrible to look at and use. Now the # has been removed and things work like you would expect. Below is a simple example showing the difference from 1.0 to 2.0.

Sane Crunch v2.0 Variables 

Sane Crunch v2.0 Variables 

Insane Crunch v1.0 Variables

Insane Crunch v1.0 Variables


Evaluate Inside Comments

Since Vim is mostly used for writing code, Crunch v2.0 allows you to evaluate math in your comments.

Since Vim is mostly used for writing code, Crunch v2.0 allows you to evaluate math in your comments.


Evaluate Blocks at a Time

If you find yourself wanting to evaluate a block of math the  CrunchBlock command, and <leader>cb mapping evaluates a paragraph

If you find yourself wanting to evaluate a block of math the  CrunchBlock command, and <leader>cb mapping evaluates a paragraph

If you are interested in Crunch or want to give it a try, head over to Crunch's GitHub page to learn more.