Joined May 2011
·

Andrew Radev

DaWanda
·
Sofia, Bulgaria
·
·
·

It's a good idea to make these mappings local to the buffer:

" ~/.vim/ftplugin/closure/testbind.vim
nmap <buffer> <leader>;; :!lein midje<cr>

That way, if you're in a filetype that you haven't set up like this, you'll get an error instead of executing the wrong command. You can take this one step further by making a global mapping that shows a better error message, or doesn't error out at all:

" ~/.vimrc
nmap <leader>;; :echoerr "No testbind mapping for this buffer"<cr>
" or,
nmap <leader>;; :echomsg "No testbind mapping for this buffer"<cr>
Achievements
187 Karma
3,243 Total ProTip Views