I used to love Zim, it was almost feature perfect in my opinion. But if you're using it to store notes with code, check first to see if the formatting feature can be disabled, because that changes the stored note text. I had to stop using Zim due to that, though it was years and years ago so maybe this has been resolved since. Other than that show-stopper, it was a great app and it had a great developer.
If you are interested, these are two of the bugs that I filed on the subject. I might triage them again sometime, but if you are interested in ensuring that your code hasn't been affected you might want to look at them:
Also, I wanted a way to just show the markdown preview without also showing the source view.
The author has mentioned a planned WYSIWYG feature, so maybe that will solve these issues.
I wish zim had a proper Mac app!