I was using Typora, but now I use Zettlr. It's free for every desktop platform and open source.
You can even search multiple files in your directory from a sidebar while you type, it provides writing stats, has file tagging, exports to anything Pandoc supported, and it also has code highlighting.
Zettlr is so good. I'm pretty sure it's what you are looking for.