You can use Paredit Mode to keep the S-expressions balanced while you type. In Emacs this Mode also warns you if you have an unmatched expression in a file.
There is a vim plugin that provides a Paredit Mode for vim, take a look here: https://github.com/vim-scripts/paredit.vim.